+ mm-list_lru-split-the-lock-to-per-cgroup-scope-fix.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm-list_lru-split-the-lock-to-per-cgroup-scope-fix
has been added to the -mm mm-unstable branch.  Its filename is
     mm-list_lru-split-the-lock-to-per-cgroup-scope-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-list_lru-split-the-lock-to-per-cgroup-scope-fix.patch

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

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 the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Kairui Song <ryncsn@xxxxxxxxx>
Subject: mm-list_lru-split-the-lock-to-per-cgroup-scope-fix
Date: Mon, 28 Oct 2024 01:26:30 +0800

Thanks for the report. I converted list_lru_walk callback to keep the
list unlocked when LRU_RETRY and LRU_REMOVED_RETRY is returned, but
didn't notice shrink_memcg_cg in zswap.c could return LRU_STOP after
it unlocked the list.

Link: https://lkml.kernel.org/r/CAMgjq7D_OA=vYf5SnNnKXjppPFhDqsbYF--6=cOayKiadxuwrQ@xxxxxxxxxxxxxx
Signed-off-by: Kairui Song <ryncsn@xxxxxxxxx>
Reported-by: Usama Arif <usamaarif642@xxxxxxxxx>
Closes: https://lkml.kernel.org/r/7334b158-8567-4c66-8176-57b879ff8882@xxxxxxxxx
Cc: Chengming Zhou <zhouchengming@xxxxxxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Kairui Song <kasong@xxxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Muchun Song <muchun.song@xxxxxxxxx>
Cc: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
Cc: Roman Gushchin <roman.gushchin@xxxxxxxxx>
Cc: Shakeel Butt <shakeel.butt@xxxxxxxxx>
Cc: Waiman Long <longman@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/list_lru.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- a/mm/list_lru.c~mm-list_lru-split-the-lock-to-per-cgroup-scope-fix
+++ a/mm/list_lru.c
@@ -298,9 +298,9 @@ restart:
 		ret = isolate(item, l, &l->lock, cb_arg);
 		switch (ret) {
 		/*
-		 * LRU_RETRY and LRU_REMOVED_RETRY will drop the lru lock,
-		 * the list traversal will be invalid and have to restart from
-		 * scratch.
+		 * LRU_RETRY, LRU_REMOVED_RETRY and LRU_STOP will drop the lru
+		 * lock, the list traversal will be invalid and have to restart
+		 * from scratch.
 		 */
 		case LRU_RETRY:
 			goto restart;
@@ -318,14 +318,13 @@ restart:
 		case LRU_SKIP:
 			break;
 		case LRU_STOP:
-			assert_spin_locked(&l->lock);
 			goto out;
 		default:
 			BUG();
 		}
 	}
-out:
 	unlock_list_lru(l, irq_off);
+out:
 	return isolated;
 }
 
_

Patches currently in -mm which might be from ryncsn@xxxxxxxxx are

mm-list_lru-split-the-lock-to-per-cgroup-scope-fix.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux