Re: [PATCH] mm/madvise: add cond_resched() in THP branch of madvise_cold_or_pageout_pte_range()
From: Gregory Price
Date: Mon Oct 12 2026 - 10:04:23 EST
On Mon, Oct 12, 2026 at 01:58:18PM +0100, Lorenzo Stoakes (ARM) wrote:
> On Sat, Oct 10, 2026 at 10:26:33AM -0400, Gregory Price wrote:
> > On Sat, Oct 10, 2026 at 10:40:42AM +0800, albin_yang@xxxxxxx wrote:
> >
> > This same improvement came naturally from refactoring the entire
> > function into a proper pagewalk structure:
> >
> > https://lore.kernel.org/linux-mm/20260922235830.2350770-10-gourry@xxxxxxxxxx/
> >
> > this function is really nasty.
>
> Nice!
>
> And thank you for looking at this horror show of a function.
>
> But yeah as Andrew said, need something for the backport, then your work can
> help eliminate the source of such things! :)
>
Oh yeah totally reasonable, just pointing out that two separate efforts
came to the same conclusion.
~Gregory