Re: [PATCH] mm: prevent RCU stalls in kswapd by adding cond_resched()

From: Matthew Wilcox
Date: Sat Aug 09 2025 - 13:53:55 EST


On Sat, Aug 09, 2025 at 10:38:45AM -0700, Andrew Morton wrote:
> On Sat, 9 Aug 2025 16:09:12 +0100 Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> > 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.
>
> tglx's email was sent two years ago.

... and there has been much progress since then. Most recently,
https://lore.kernel.org/all/20250225035516.26443-1-boqun.feng@xxxxxxxxx/

This report is not from a recent kernel. Subrata was good enough to
include:

Based on: v6.1.128

and I think it is very much on them to prove that this is still a
problem in 2025.