[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 4 Apr 2019 19:21:22 +0200
From: Uladzislau Rezki <urezki@...il.com>
To: Roman Gushchin <guro@...com>
Cc: Uladzislau Rezki <urezki@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>,
Matthew Wilcox <willy@...radead.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Garnier <thgarnie@...gle.com>,
Oleksiy Avramchenko <oleksiy.avramchenko@...ymobile.com>,
Steven Rostedt <rostedt@...dmis.org>,
Joel Fernandes <joelaf@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>, Tejun Heo <tj@...nel.org>
Subject: Re: [RESEND PATCH 1/3] mm/vmap: keep track of free blocks for vmap
allocation
> > >
> > > 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
Powered by blists - more mailing lists