* [folded-merged] mm-add-max-swappiness-arg-to-lru_gen-for-anonymous-memory-only-update.patch removed from -mm tree
@ 2025-05-13 6:39 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-05-13 6:39 UTC (permalink / raw)
To: mm-commits, yuzhao, yosry.ahmed, muchun.song, mhocko, hannes,
hezhongkun.hzk, akpm
The quilt patch titled
Subject: mm: add max swappiness arg to lru_gen for anonymous memory only
has been removed from the -mm tree. Its filename was
mm-add-max-swappiness-arg-to-lru_gen-for-anonymous-memory-only-update.patch
This patch was dropped because it was folded into mm-add-max-swappiness-arg-to-lru_gen-for-anonymous-memory-only.patch
------------------------------------------------------
From: Zhongkun He <hezhongkun.hzk@bytedance.com>
Subject: mm: add max swappiness arg to lru_gen for anonymous memory only
Date: Wed, 7 May 2025 15:10:57 +0800
1) use strcmp instead of strncmp from Dan Carpenter
https://lore.kernel.org/all/aBHYT27M1tRxNLRj@stanley.mountain/
2) If swappiness is not set, use the default value.
Link: https://lkml.kernel.org/r/20250507071057.3184240-1-hezhongkun.hzk@bytedance.com
Signed-off-by: Zhongkun He <hezhongkun.hzk@bytedance.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Yosry Ahmed <yosry.ahmed@linux.dev>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vmscan.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/mm/vmscan.c~mm-add-max-swappiness-arg-to-lru_gen-for-anonymous-memory-only-update
+++ a/mm/vmscan.c
@@ -5592,7 +5592,7 @@ static ssize_t lru_gen_seq_write(struct
unsigned int memcg_id;
unsigned int nid;
unsigned long seq;
- unsigned int swappiness = -1;
+ unsigned int swappiness;
unsigned long opt = -1;
cur = skip_spaces(cur);
@@ -5606,8 +5606,10 @@ static ssize_t lru_gen_seq_write(struct
break;
}
- /* set by userspace for anonymous memory only */
- if (!strncmp("max", swap_string, sizeof("max"))) {
+ if (n == 4)
+ swappiness = -1;
+ else if (!strcmp("max", swap_string)) {
+ /* set by userspace for anonymous memory only */
swappiness = SWAPPINESS_ANON_ONLY;
} else {
err = kstrtouint(swap_string, 0, &swappiness);
_
Patches currently in -mm which might be from hezhongkun.hzk@bytedance.com are
mm-add-swappiness=max-arg-to-memoryreclaim-for-only-anon-reclaim.patch
mm-vmscan-add-more-comments-about-cache_trim_mode.patch
mm-add-max-swappiness-arg-to-lru_gen-for-anonymous-memory-only.patch
mm-using-swappiness_anon_only-in-mglru.patch
mm-cma-set-early_pfn-and-bitmap-as-a-union-in-cma_memrange.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-05-13 6:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 6:39 [folded-merged] mm-add-max-swappiness-arg-to-lru_gen-for-anonymous-memory-only-update.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.