From: Uladzislau Rezki <urezki@gmail.com>
To: Roman Gushchin <guro@fb.com>
Cc: Uladzislau Rezki <urezki@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
Matthew Wilcox <willy@infradead.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Thomas Garnier <thgarnie@google.com>,
Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com>,
Steven Rostedt <rostedt@goodmis.org>,
Joel Fernandes <joelaf@google.com>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
Tejun Heo <tj@kernel.org>
Subject: Re: [RESEND PATCH 1/3] mm/vmap: keep track of free blocks for vmap allocation
Date: Thu, 4 Apr 2019 19:21:22 +0200 [thread overview]
Message-ID: <20190404172122.2u5g4eppkn7zcunh@pc636> (raw)
In-Reply-To: <20190404165240.GA9713@tower.DHCP.thefacebook.com>
> > >
> > > Do we need this change?
> > >
> > This patch does not tend to refactor the code. I have removed extra empty
> > lines because i touched the code around. I can either keep that change or
> > remove it. What is your opinion?
>
> Usually it's better to separate cosmetic changes from functional, if you're
> not touching directly these lines. Not a big deal, of course.
>
OK. I will keep it as it used to be. When it is a time for refactoring we can
fix that.
> > >
> > > The function looks much cleaner now, thank you!
> > >
> > > But if I understand it correctly, it returns a node (via parent)
> > > and a pointer to one of two links, so that the returned value
> > > is always == parent + some constant offset.
> > > If so, I wonder if it's cleaner to return a parent node
> > > (as rb_node*) and a bool value which will indicate if the left
> > > or the right link should be used.
> > >
> > > Not a strong opinion, just an idea.
> > >
> > I see your point. Yes, that is possible to return "bool" value that
> > indicates left or right path. After that we can detect the direction.
> >
> > From the other hand, we end up and access the correct link anyway during
> > the traversal the tree. In case of "bool" way, we will need to add on top
> > some extra logic that checks where to attach to.
>
> Sure, makes sense. I'd add some comments here then.
>
Will put some explanation and description.
Thank you!
--
Vlad Rezki
next prev parent reply other threads:[~2019-04-04 17:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 16:25 [RESEND PATCH 0/3] improve " Uladzislau Rezki (Sony)
2019-04-02 16:25 ` [RESEND PATCH 1/3] mm/vmap: keep track of free blocks for " Uladzislau Rezki (Sony)
2019-04-03 21:06 ` Roman Gushchin
2019-04-04 15:43 ` Uladzislau Rezki
2019-04-04 16:52 ` Roman Gushchin
2019-04-04 17:21 ` Uladzislau Rezki [this message]
2019-04-02 16:25 ` [RESEND PATCH 2/3] mm/vmap: add DEBUG_AUGMENT_PROPAGATE_CHECK macro Uladzislau Rezki (Sony)
2019-04-03 21:15 ` Roman Gushchin
2019-04-04 15:53 ` Uladzislau Rezki
2019-04-02 16:25 ` [RESEND PATCH 3/3] mm/vmap: add DEBUG_AUGMENT_LOWEST_MATCH_CHECK macro Uladzislau Rezki (Sony)
2019-04-03 21:10 ` Roman Gushchin
2019-04-02 19:26 ` [RESEND PATCH 0/3] improve vmap allocation Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190404172122.2u5g4eppkn7zcunh@pc636 \
--to=urezki@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=joelaf@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mingo@elte.hu \
--cc=oleksiy.avramchenko@sonymobile.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=thgarnie@google.com \
--cc=tj@kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox