From: Yifan Ji <412752700jyf@gmail.com>
To: linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Vlastimil Babka <vbabka@suse.cz>,
Matthew Wilcox <willy@infradead.org>
Subject: [DISCUSS] Proposal: move slab shrinking into a dedicated kernel thread to improve reclaim efficiency
Date: Tue, 21 Oct 2025 10:52:41 +0800 [thread overview]
Message-ID: <CA+9cq0kkbk2Bpgyah=9bU2+=QNM2L1GfYLgMK6OuRhda-B80cg@mail.gmail.com> (raw)
Hi all,
We've been profiling memory reclaim performance on mobile systems and found
that slab shrinking can dominate reclaim time, particularly when multiple
shrinkers are active. In some cases, shrink_slab() introduces noticeable
latency in both direct reclaim and kswapd contexts.
We are exploring an approach to move slab shrinking into a dedicated kernel
thread, decoupling it from direct reclaim and kswapd. The goal is to perform
slab reclaim asynchronously under controlled conditions such as idle periods
or vmpressure triggers.
Motivation:
- Reduce latency in direct reclaim paths.
- Improve reclaim efficiency by separating page and slab reclaim.
- Provide more flexible scheduling for slab shrinking.
Proposed direction:
- Introduce a kernel thread that periodically or conditionally calls
shrink_slab().
We'd appreciate feedback on:
- Whether this decoupling aligns with the design of the current reclaim model.
- Possible implications on fairness, concurrency, and memcg behavior.
Thanks for your time and input.
Best regards,
Yifan Ji
next reply other threads:[~2025-10-21 2:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 2:52 Yifan Ji [this message]
2025-10-21 5:25 ` Christoph Hellwig
2025-10-24 0:47 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2025-10-20 2:22 Yifan Ji
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='CA+9cq0kkbk2Bpgyah=9bU2+=QNM2L1GfYLgMK6OuRhda-B80cg@mail.gmail.com' \
--to=412752700jyf@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/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