Re: [PATCH] mm: prevent RCU stalls in kswapd by adding cond_resched()
From: Matthew Wilcox
Date: Sat Aug 09 2025 - 11:09:24 EST
On Sat, Aug 09, 2025 at 11:59:16AM +0000, Subrata Nath (Nokia) wrote:
> Fix this by adding cond_resched() after all spinlock release points
> in page_vma_mapped_walk() and in the main loop of shrink_zones().
> These calls, placed outside spinlock-held sections, allow voluntary
> scheduling and ensure timely quiescent state reporting, avoiding
> prolonged RCU stalls.
No. We're removing cond_resched(). See
https://lore.kernel.org/linux-mm/87cyyfxd4k.ffs@tglx/
and many many other emails over the past few years.