linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: JoonSoo Kim <js1304@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>,
	akpm@linux-foundation.org, Pekka Enberg <penberg@kernel.org>,
	Christoph Lameter <cl@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: don't invoke __alloc_pages_direct_compact when order 0
Date: Sat, 7 Jul 2012 09:38:19 +0900	[thread overview]
Message-ID: <20120707003819.GA2041@barrios> (raw)
In-Reply-To: <CAAmzW4N+-xS65-NDJF2V9nzGDBTFC=20sZ8LJx5wCZ8=t7SpTQ@mail.gmail.com>

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2012-07-07  0:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06 15:28 [PATCH] mm: don't invoke __alloc_pages_direct_compact when order 0 Joonsoo Kim
2012-07-06 15:59 ` Minchan Kim
2012-07-06 16:58   ` JoonSoo Kim
2012-07-07  0:38     ` Minchan Kim [this message]
2012-07-08  2:29       ` JoonSoo Kim
2012-07-07  8:40 ` David Rientjes
2012-07-08  2:33   ` JoonSoo Kim
2012-07-08 22:53     ` David Rientjes
2012-07-09 14:13       ` JoonSoo Kim
2012-07-09 21:10         ` David Rientjes
2012-07-09 22:41         ` Andrew Morton
2012-07-10 10:47     ` Mel Gorman
2012-07-10 15:24       ` JoonSoo Kim
2012-07-10 15:48         ` Mel Gorman

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=20120707003819.GA2041@barrios \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.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;
as well as URLs for NNTP newsgroup(s).