lkml.org 
[lkml]   [2012]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: don't invoke __alloc_pages_direct_compact when order 0
On Sat, Jul 07, 2012 at 01:58:24AM +0900, JoonSoo Kim wrote:
> 2012/7/7 Minchan Kim <minchan@kernel.org>:
> > Hi Joonsoo,
> >
> > On Sat, Jul 07, 2012 at 12:28:41AM +0900, Joonsoo Kim wrote:
> >> __alloc_pages_direct_compact has many arguments so invoking it is very costly.
> >
> > It's already slow path so it's pointless for such optimization.
>
> I know this is so minor optimization.
> But why don't we do such a one?
> Is there any weak point?

Let's think about it.
You are adding *new rule* for minor optimization.
If new users uses __alloc_pages_direct_compact in future, they always have to
check whether order is zero not not. So it could increase code size as well as
bad for readbility. Even, I'm not sure adding branch is always win than
just passing the some arguement in all architecures.

>
> >> And in almost invoking case, order is 0, so return immediately.
> >
> > You can't make sure it.
>
> Okay.
>
> >>
> >> Let's not invoke it when order 0
> >
> > Let's not ruin git blame.
>
> Hmm...
> When I do git blame, I can't find anything related to this.

I mean if we merge the pointless patch, it could be showed firstly instead of
meaningful patch when we do git blame. It makes us bothering when we find blame-patch.

>
> Thanks for comments



\
 
 \ /
  Last update: 2012-07-07 03:01    [W:0.049 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site