linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mempolicy: Clarify what RECLAIM_ZONE means
@ 2025-07-25 17:35 Joshua Hahn
  2025-07-25 21:44 ` SeongJae Park
  2025-07-28  1:44 ` Huang, Ying
  0 siblings, 2 replies; 9+ messages in thread
From: Joshua Hahn @ 2025-07-25 17:35 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand, Johannes Weiner
  Cc: Zi Yan, Matthew Brost, Rakie Kim, Byungchul Park, Gregory Price,
	Ying Huang, Alistair Popple, linux-kernel, linux-mm, kernel-team

The zone_reclaim_mode API controls reclaim behavior when a node runs out of
memory. Contrary to its user-facing name, it is internally referred to as
"node_reclaim_mode". This is slightly confusing but there is not much we can
do given that it has already been exposed to userspace (since at least 2.6).

However, what we can do is to make sure the internal description of what the
bits inside zone_reclaim_mode aligns with what it does in practice.
Setting RECLAIM_ZONE does indeed run shrink_inactive_list, but a more holistic
description would be to explain that zone reclaim modulates whether page
allocation (and khugepaged collapsing) prefers reclaiming & attempting to
allocate locally or should fall back to the next node in the zonelist.

Change the description to clarify what zone reclaim entails.

Signed-off-by: Joshua Hahn <joshua.hahnjy@gmail.com>
---
 include/uapi/linux/mempolicy.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/mempolicy.h b/include/uapi/linux/mempolicy.h
index 1f9bb10d1a47..24083809d920 100644
--- a/include/uapi/linux/mempolicy.h
+++ b/include/uapi/linux/mempolicy.h
@@ -69,7 +69,7 @@ enum {
  * These bit locations are exposed in the vm.zone_reclaim_mode sysctl
  * ABI.  New bits are OK, but existing bits can never change.
  */
-#define RECLAIM_ZONE	(1<<0)	/* Run shrink_inactive_list on the zone */
+#define RECLAIM_ZONE	(1<<0)	/* Prefer reclaiming & allocating locally */
 #define RECLAIM_WRITE	(1<<1)	/* Writeout pages during reclaim */
 #define RECLAIM_UNMAP	(1<<2)	/* Unmap pages during reclaim */
 

base-commit: 25fae0b93d1d7ddb25958bcb90c3c0e5e0e202bd
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-07-31 18:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25 17:35 [PATCH] mempolicy: Clarify what RECLAIM_ZONE means Joshua Hahn
2025-07-25 21:44 ` SeongJae Park
2025-07-26  1:24   ` Joshua Hahn
2025-07-28  1:44 ` Huang, Ying
2025-07-28 14:51   ` Joshua Hahn
2025-07-29  0:58     ` Huang, Ying
2025-07-30 20:19       ` Joshua Hahn
2025-07-31  1:48         ` Huang, Ying
2025-07-31 18:45           ` SeongJae Park

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).