[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250807152720.62032-1-ryncsn@gmail.com>
Date: Thu, 7 Aug 2025 23:27:17 +0800
From: Kairui Song <ryncsn@...il.com>
To: linux-mm@...ck.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Jann Horn <jannh@...gle.com>,
Pedro Falcato <pfalcato@...e.de>,
Matthew Wilcox <willy@...radead.org>,
Hugh Dickins <hughd@...gle.com>,
David Hildenbrand <david@...hat.com>,
Chris Li <chrisl@...nel.org>,
Barry Song <baohua@...nel.org>,
Baoquan He <bhe@...hat.com>,
Nhat Pham <nphamcs@...il.com>,
Kemeng Shi <shikemeng@...weicloud.com>,
linux-kernel@...r.kernel.org,
Kairui Song <kasong@...cent.com>
Subject: [RFC PATCH 0/3] mm/mincore: clean up swap cache helper and PTL
From: Kairui Song <kasong@...cent.com>
There is a swap cache helper that is only used by mincore. It was
seperated out from mincore some time ago to be shared with other users,
but now mincore is the only user again. So it can be easily merged back
to simplify the code.
Patch 1 clean this up, but I'm not very sure about Patch 2 and 3:
Realizing that the PTL seems only useful for stablizing the swap
cache space now, by grabbing the swap device before looking up the swap
cache space (patch 2), we can drop the PTL locking (patch 3).
Let me know if I'm missing something. With mmap lock, the mincore result
should be reliable enough without the PTL.
Kairui Song (3):
mm/mincore, swap: consolidate swap cache checking for mincore
mm/mincore: use a helper for checking the swap cache
mm/mincore: avoid touching the PTL
mm/mincore.c | 53 ++++++++++++++++++++++++++++++++++++++-----------
mm/swap.h | 10 ----------
mm/swap_state.c | 38 -----------------------------------
3 files changed, 41 insertions(+), 60 deletions(-)
--
2.50.1
Powered by blists - more mailing lists