public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] Fix halted scanning of swap-cache folios
@ 2026-04-27 10:35 Thomas Hellström
  2026-04-27 10:35 ` [RFC PATCH 1/1] mm: vmscan: keep anon scanning enabled when swapcache folios are present Thomas Hellström
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Hellström @ 2026-04-27 10:35 UTC (permalink / raw)
  To: intel-xe
  Cc: Thomas Hellström, Andrew Morton, David Hildenbrand,
	Michal Hocko, Qi Zheng, Shakeel Butt, Lorenzo Stoakes,
	Axel Rasmussen, Yuanchu Xie, Wei Xu, Brian Geffon, Steven Barrett,
	Oleksandr Natalenko, linux-mm, linux-kernel

While experimenting with an interface for inserting isolated dirty
GPU folios directly into the swap-cache for backup, I noticed that
when the number of swap entries were almost exhausted, scanning
and freeing of these pages already inserted into the swapc-cache
stopped.

Apparently there are guards that stop LRU scanning of anonymous
pages when the number of free swap entries are low. However that
also blocks pages already present in the swap cache from being
scanned and freed.

Not sure whether that is intentional, but anyway I'm sending
a patch that implements one (crude) way of fixing the problem.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Yuanchu Xie <yuanchu@google.com>
Cc: Wei Xu <weixugc@google.com>
Cc: Brian Geffon <bgeffon@google.com>
Cc: Steven Barrett <steven@liquorix.net>
Cc: Oleksandr Natalenko <oleksandr@natalenko.name>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org

Thomas Hellström (1):
  mm: vmscan: keep anon scanning enabled when swapcache folios are
    present

 mm/vmscan.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

-- 
2.53.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-27 10:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 10:35 [RFC PATCH 0/1] Fix halted scanning of swap-cache folios Thomas Hellström
2026-04-27 10:35 ` [RFC PATCH 1/1] mm: vmscan: keep anon scanning enabled when swapcache folios are present Thomas Hellström

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox