All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-shmem-assign-a-lock-class-to-the-unused-huge-shrinklist.patch added to mm-new branch
@ 2026-10-11  5:36 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-10-11  5:36 UTC (permalink / raw)
  To: mm-commits, yi1.lai, usama.arif, hughd, baolin.wang, qi.zheng,
	akpm


The patch titled
     Subject: mm: shmem: assign a lock class to the unused huge shrinklist
has been added to the -mm mm-new branch.  Its filename is
     mm-shmem-assign-a-lock-class-to-the-unused-huge-shrinklist.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-shmem-assign-a-lock-class-to-the-unused-huge-shrinklist.patch

This patch will later appear in the mm-new branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews.  Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved
into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: Qi Zheng <qi.zheng@linux.dev>
Subject: mm: shmem: assign a lock class to the unused huge shrinklist
Date: Sun, 11 Oct 2026 12:59:56 +0800

The unused huge shrinklist shares the default list_lru lock class with the
dentry LRU.  Although they use distinct lock instances, lockdep conflates
their dependencies and reports a circular locking dependency:

	WARNING: possible circular locking dependency detected

Give the unused huge shrinklist a dedicated lock class to fix this
false-positive lockdep warning.

Link: https://lore.kernel.org/20261011045956.30277-1-qi.zheng@linux.dev
Fixes: b9b1861d4f7a ("mm: shmem: make unused huge shrinker memcg aware")
Signed-off-by: Qi Zheng <qi.zheng@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: kernel test robot <yi1.lai@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202610091403.d1d8080b-lkp@intel.com
Cc: Hugh Dickins <hughd@google.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Usama Arif <usama.arif@linux.dev>
---

 mm/shmem.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/mm/shmem.c~mm-shmem-assign-a-lock-class-to-the-unused-huge-shrinklist
+++ a/mm/shmem.c
@@ -5161,6 +5161,9 @@ static const struct dentry_operations sh
 
 static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
 {
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+	static struct lock_class_key shmem_unused_huge_lock_key;
+#endif
 	struct shmem_options *ctx = fc->fs_private;
 	struct inode *inode;
 	struct shmem_sb_info *sbinfo;
@@ -5239,7 +5242,8 @@ static int shmem_fill_super(struct super
 		goto failed;
 
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
-	if (list_lru_init_memcg(&sbinfo->shrinklist, sb->s_shrink))
+	if (list_lru_init_memcg_key(&sbinfo->shrinklist, sb->s_shrink,
+				    &shmem_unused_huge_lock_key))
 		goto failed;
 #endif
 
_

Patches currently in -mm which might be from qi.zheng@linux.dev are

mm-shmem-assign-a-lock-class-to-the-unused-huge-shrinklist.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-11  5:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-11  5:36 + mm-shmem-assign-a-lock-class-to-the-unused-huge-shrinklist.patch added to mm-new branch 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.