Re: [PATCH 4/6] sched/isolation: Drain per-CPU LRU batches when CPUs become isolated

From: Frederic Weisbecker

Date: Tue Nov 03 2026 - 12:04:12 EST


Le Tue, Nov 03, 2026 at 08:59:38PM +1300, Matthew Ruffell a écrit :
> From: Caron Wills <caron.wills@xxxxxxxxxx>
>
> Isolated CPUs no longer batch folios in their per-CPU LRU caches, so
> that __lru_add_drain_all() never has to queue work on them. Boot time
> isolation (isolcpus=, nohz_full=) takes effect before any folio is
> batched, but a cpuset isolated partition can be created at runtime and
> the affected CPUs may still hold folios in their batches from before.
> Those would linger until the CPU happens to drain locally, and the next
> lru_add_drain_all() would fall back to queueing work on the now isolated
> CPU, which is exactly what must be avoided.
>
> Drain all batches once from housekeeping_update(), right after the
> HK_TYPE_DOMAIN mask has been updated and next to the vmstat and memcg
> workqueue flushes that exist for the same reason, so that newly isolated
> CPUs start out with empty batches.
>
> Link: https://bugs.launchpad.net/bugs/2165410
> Signed-off-by: Caron Wills <caron.wills@xxxxxxxxxx>
> Signed-off-by: Matthew Ruffell <matthew.ruffell@xxxxxxxxxxxxx>

There was this patchset:
https://lore.kernel.org/lkml/20260519012754.240804-1-leobras.c@xxxxxxxxx/

Leonardo, do you plan a v5?

Thanks.

--
Frederic Weisbecker
SUSE Labs