From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: SeungHun Lee <waydi1@gmail.com>
Cc: linux-mm@kvack.org, kosaki.motohiro@gmail.com
Subject: Re: [PATCH 2/2] mm: page_alloc: Add unlikely for MAX_ORDER check
Date: Mon, 29 Jul 2013 14:44:26 -0400 [thread overview]
Message-ID: <51F6B80A.3040805@gmail.com> (raw)
In-Reply-To: <1375022906-1164-1-git-send-email-waydi1@gmail.com>
(7/28/13 10:48 AM), SeungHun Lee wrote:
> "order >= MAX_ORDER" case is occur rarely.
>
> So I add unlikely for this check.
> ---
> mm/page_alloc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index b8475ed..e644cf5 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2408,7 +2408,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
> * be using allocators in order of preference for an area that is
> * too large.
> */
> - if (order >= MAX_ORDER) {
> + if (unlikely(order >= MAX_ORDER)) {
> WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
> return NULL;
I don't think this improve any performance because here is a slowpath. However
I also don't find any issue to have this hint.
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
--
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>
next prev parent reply other threads:[~2013-07-29 18:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-28 14:48 [PATCH 2/2] mm: page_alloc: Add unlikely for MAX_ORDER check SeungHun Lee
2013-07-29 18:44 ` KOSAKI Motohiro [this message]
2013-07-29 22:11 ` David Rientjes
2013-07-29 22:26 ` zhouxinxing
2013-07-29 22:45 ` Dave Hansen
2013-07-30 0:36 ` Cody P Schafer
2013-07-30 0:41 ` Cody P Schafer
2013-07-30 1:20 ` Cody P Schafer
2013-07-30 16:43 ` Dave Hansen
2013-07-31 14:45 ` 이승훈
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=51F6B80A.3040805@gmail.com \
--to=kosaki.motohiro@gmail.com \
--cc=linux-mm@kvack.org \
--cc=waydi1@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.