Linux-mm Archive on
 help / color / Atom feed
From: Konstantin Khlebnikov <>
To:, Andrew Morton <>,
	Michal Hocko <>,
Subject: [PATCH RFC] mm: do not start node_reclaim for page order > MAX_ORDER
Date: Thu, 01 Nov 2018 20:37:52 +0300
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 <>
 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)
 	 * Node reclaim reclaims unmapped file backed pages and
 	 * slab pages if we are over the defined limits.

             reply index

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 ` 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:

* 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 \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mm Archive on

Archives are clonable:
	git clone --mirror linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ \
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone