linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kaiyang2@cs.cmu.edu
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Kaiyang Zhao <kaiyang2@cs.cmu.edu>,
	hannes@cmpxchg.org, ziy@nvidia.com, dskarlat@cs.cmu.edu
Subject: [RFC PATCH 2/7] Disallows high-order movable allocations in other zones if ZONE_MOVABLE is populated
Date: Wed, 20 Mar 2024 02:42:13 +0000	[thread overview]
Message-ID: <20240320024218.203491-3-kaiyang2@cs.cmu.edu> (raw)
In-Reply-To: <20240320024218.203491-1-kaiyang2@cs.cmu.edu>

From: Kaiyang Zhao <kaiyang2@cs.cmu.edu>

Use ZONE_MOVABLE exclusively for non-0 order allocations

Signed-off-by: Kaiyang Zhao <zh_kaiyang@hotmail.com>
---
 mm/page_alloc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 47421bedc12b..9ad9357e340a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3403,6 +3403,16 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 		struct page *page;
 		unsigned long mark;
 
+		/*
+		 * Disallows high-order movable allocations in other zones if
+		 * ZONE_MOVABLE is populated on this node.
+		 */
+		if (ac->highest_zoneidx >= ZONE_MOVABLE &&
+			order > 0 &&
+			zone_idx(zone) != ZONE_MOVABLE &&
+			populated_zone(&(zone->zone_pgdat->node_zones[ZONE_MOVABLE])))
+				continue;
+
 		if (cpusets_enabled() &&
 			(alloc_flags & ALLOC_CPUSET) &&
 			!__cpuset_zone_allowed(zone, gfp_mask))
-- 
2.40.1



  parent reply	other threads:[~2024-03-20  2:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20  2:42 [RFC PATCH 0/7] mm: providing ample physical memory contiguity by confining unmovable allocations kaiyang2
2024-03-20  2:42 ` [RFC PATCH 1/7] sysfs interface for the boundary of movable zone kaiyang2
2024-03-20  2:42 ` kaiyang2 [this message]
2024-03-20  2:42 ` [RFC PATCH 3/7] compaction accepts a destination zone kaiyang2
2024-03-20  2:42 ` [RFC PATCH 4/7] vmstat counter for pages migrated across zones kaiyang2
2024-03-20  2:42 ` [RFC PATCH 5/7] proactively move pages out of unmovable zones in kcompactd kaiyang2
2024-03-20  2:42 ` [RFC PATCH 6/7] pass gfp mask of the allocation that waked kswapd to track number of pages scanned on behalf of each alloc type kaiyang2
2024-03-20  2:42 ` [RFC PATCH 7/7] exports the number of pages scanned on behalf of movable/unmovable allocations kaiyang2
2024-03-20  2:47 ` [RFC PATCH 0/7] mm: providing ample physical memory contiguity by confining unmovable allocations Zi Yan
2024-03-20  2:57 ` kaiyang2

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=20240320024218.203491-3-kaiyang2@cs.cmu.edu \
    --to=kaiyang2@cs.cmu.edu \
    --cc=dskarlat@cs.cmu.edu \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ziy@nvidia.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