From: Vlastimil Babka <vbabka@suse.cz>
To: Abel Wu <wuyun.abel@bytedance.com>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@kernel.org>,
Mel Gorman <mgorman@techsingularity.net>,
Muchun Song <songmuchun@bytedance.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/page_alloc: only search higher order when fallback
Date: Wed, 3 Aug 2022 10:15:31 +0200 [thread overview]
Message-ID: <6ac42cd6-9f93-e80c-0bd3-d0c9439cf327@suse.cz> (raw)
In-Reply-To: <20220803025121.47018-1-wuyun.abel@bytedance.com>
On 8/3/22 04:51, Abel Wu wrote:
> It seems unnecessary to search pages with order < alloc_order in
> fallback allocation.
This can currently happen with ALLOC_NOFRAGMENT and alloc_order >
pageblock_order, so add a test to prevent it.
> Signed-off-by: Abel Wu <wuyun.abel@bytedance.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/page_alloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index e008a3df0485..0abafc2fc3e0 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2934,7 +2934,7 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype,
> * i.e. orders < pageblock_order. If there are no local zones free,
> * the zonelists will be reiterated without ALLOC_NOFRAGMENT.
> */
> - if (alloc_flags & ALLOC_NOFRAGMENT)
> + if (order < pageblock_order && alloc_flags & ALLOC_NOFRAGMENT)
> min_order = pageblock_order;
>
> /*
next prev parent reply other threads:[~2022-08-03 8:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 2:51 Abel Wu
2022-08-03 8:15 ` Vlastimil Babka [this message]
2022-08-04 5:36 ` Muchun Song
2022-08-04 9:39 ` 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=6ac42cd6-9f93-e80c-0bd3-d0c9439cf327@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=songmuchun@bytedance.com \
--cc=wuyun.abel@bytedance.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