All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,yuzhao@google.com,yosry.ahmed@linux.dev,muchun.song@linux.dev,mhocko@suse.com,hannes@cmpxchg.org,hezhongkun.hzk@bytedance.com,akpm@linux-foundation.org
Subject: [folded-merged] mm-add-max-swappiness-arg-to-lru_gen-for-anonymous-memory-only-update.patch removed from -mm tree
Date: Mon, 12 May 2025 23:39:01 -0700	[thread overview]
Message-ID: <20250513063901.AA861C4CEE4@smtp.kernel.org> (raw)


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


                 reply	other threads:[~2025-05-13  6:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250513063901.AA861C4CEE4@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hezhongkun.hzk@bytedance.com \
    --cc=mhocko@suse.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=yosry.ahmed@linux.dev \
    --cc=yuzhao@google.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 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.