From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH RFC] mm: do not start node_reclaim for page order > MAX_ORDER
Date: Thu, 01 Nov 2018 20:37:52 +0300 [thread overview]
Message-ID: <154109387197.925352.10499549042420271600.stgit@buzz> (raw)
Page allocator has check in __alloc_pages_slowpath() but nowdays
there is earlier entry point into reclimer without such check:
get_page_from_freelist() -> node_reclaim().
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
---
mm/vmscan.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 62ac0c488624..52f672420f0b 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4117,6 +4117,12 @@ int node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned int order)
{
int ret;
+ /*
+ * Do not scan if allocation will never succeed.
+ */
+ if (order >= MAX_ORDER)
+ return NODE_RECLAIM_NOSCAN;
+
/*
* Node reclaim reclaims unmapped file backed pages and
* slab pages if we are over the defined limits.
next reply other threads:[~2018-11-01 17:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 17:37 Konstantin Khlebnikov [this message]
2018-11-02 8:55 ` [PATCH RFC] mm: do not start node_reclaim for page order > MAX_ORDER Michal Hocko
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=154109387197.925352.10499549042420271600.stgit@buzz \
--to=khlebnikov@yandex-team.ru \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.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;
as well as URLs for NNTP newsgroup(s).