From: "zhaoyang.huang" <zhaoyang.huang@unisoc.com>
To: Mel Gorman <mgorman@techsingularity.net>,
Andrew Morton <akpm@linux-foundation.org>,
Zhaoyang Huang <huangzhaoyang@gmail.com>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>, <ke.wang@unisoc.com>
Subject: [RFC PATCH] mm: check global free_list if there is ongoing reclaiming when pcp fail
Date: Fri, 16 Sep 2022 18:58:12 +0800 [thread overview]
Message-ID: <1663325892-9825-1-git-send-email-zhaoyang.huang@unisoc.com> (raw)
From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
Check the global free list again even if rmqueue_bulk failed for pcp pages when
there is ongoing reclaiming, which could eliminate potential direct reclaim by
chance.
Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
---
mm/page_alloc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e008a3d..7e99f7d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3729,7 +3729,8 @@ struct page *rmqueue(struct zone *preferred_zone,
migratetype != MIGRATE_MOVABLE) {
page = rmqueue_pcplist(preferred_zone, zone, order,
gfp_flags, migratetype, alloc_flags);
- goto out;
+ if (page || !test_bit(ZONE_RECLAIM_ACTIVE, &zone->flags))
+ goto out;
}
}
--
1.9.1
next reply other threads:[~2022-09-16 10:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 10:58 zhaoyang.huang [this message]
2022-09-19 10:16 ` Mel Gorman
2022-09-20 1:45 ` Zhaoyang Huang
2022-09-20 8:45 ` Mel Gorman
2022-09-20 8:48 ` Zhaoyang Huang
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=1663325892-9825-1-git-send-email-zhaoyang.huang@unisoc.com \
--to=zhaoyang.huang@unisoc.com \
--cc=akpm@linux-foundation.org \
--cc=huangzhaoyang@gmail.com \
--cc=ke.wang@unisoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
/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