From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"David Hildenbrand" <david@kernel.org>,
"Michal Hocko" <mhocko@kernel.org>,
"Qi Zheng" <zhengqi.arch@bytedance.com>,
"Shakeel Butt" <shakeel.butt@linux.dev>,
"Lorenzo Stoakes" <ljs@kernel.org>,
"Axel Rasmussen" <axelrasmussen@google.com>,
"Yuanchu Xie" <yuanchu@google.com>, "Wei Xu" <weixugc@google.com>,
"Brian Geffon" <bgeffon@google.com>,
"Steven Barrett" <steven@liquorix.net>,
"Oleksandr Natalenko" <oleksandr@natalenko.name>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/1] Fix halted scanning of swap-cache folios
Date: Mon, 27 Apr 2026 12:35:31 +0200 [thread overview]
Message-ID: <20260427103532.5623-1-thomas.hellstrom@linux.intel.com> (raw)
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
next reply other threads:[~2026-04-27 10:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 10:35 Thomas Hellström [this message]
2026-04-27 10:35 ` [RFC PATCH 1/1] mm: vmscan: keep anon scanning enabled when swapcache folios are present Thomas Hellström
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=20260427103532.5623-1-thomas.hellstrom@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=bgeffon@google.com \
--cc=david@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@kernel.org \
--cc=oleksandr@natalenko.name \
--cc=shakeel.butt@linux.dev \
--cc=steven@liquorix.net \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=zhengqi.arch@bytedance.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox