linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: zbestahu@aliyun.com
Cc: akpm@linux-foundation.org, vbabka@suse.cz, mhocko@suse.com,
	hannes@cmpxchg.org, minchan@kernel.org, linux-mm@kvack.org,
	Yue Hu <huyue2@coolpad.com>
Subject: Re: [PATCH] mm/page_alloc.c: improve allocation fast path
Date: Sat, 8 Jul 2017 20:47:39 +0100	[thread overview]
Message-ID: <20170708194739.chisy47mz4c2c2ye@techsingularity.net> (raw)
In-Reply-To: <1499477319-1395-1-git-send-email-zbestahu@aliyun.com>

On Sat, Jul 08, 2017 at 09:28:39AM +0800, zbestahu@aliyun.com wrote:
> From: Yue Hu <huyue2@coolpad.com>
> 
> We currently is taking time to check if the watermark is safe when
> alloc_flags is setting with ALLOC_NO_WATERMARK in slowpath, the check
> to alloc_flags is faster check which should be first check option
> compared to the slow check of watermark, it could benefit to urgency
> allocation request in slowpath, it also almost has no effect for
> allocation with successful watermark check.
> 
> Signed-off-by: Yue Hu <huyue2@coolpad.com>

NAK. Was this measured as being a benefit to anything?

ALLOC_NO_WATERMARKS is rare so it's in the slow path. Even though the
watermark check is redundent when watermarks should be ignored, your patch
adds a branch that is rarely true to the common case. The comment you move
even gives a hint as to why it's located there!

-- 
Mel Gorman
SUSE Labs

--
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:[~2017-07-08 19:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-08  1:28 zbestahu
2017-07-08 19:47 ` Mel Gorman [this message]

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=20170708194739.chisy47mz4c2c2ye@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=huyue2@coolpad.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=zbestahu@aliyun.com \
    /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