Re: [PATCH] hugetlb: add cond_resched() to __unmap_hugepage_range()
From: Michal Hocko
Date: Wed Aug 19 2026 - 05:04:38 EST
On Wed 19-08-26 10:54:11, David Hildenbrand wrote:
> On 8/19/26 10:50, Michal Hocko wrote:
> > On Wed 19-08-26 09:53:25, David Hildenbrand wrote:
> >> On 8/18/26 20:55, Andrew Morton wrote:
> >>>
> >>>
> >>> Not understanding.
> >>>
> >>> Maybe you refer to adding a patch to -stable but not to -linus? That's
> >>> against the -stable rules
> >>> (Documentation/process/stable-kernel-rules.rst).
> >>
> >> It's tricky: if a problem only exists in stable (there is nothing to fix in
> >> Linus' tree), then a stable-only fix is acceptable.
> >
> > The crucial quiestion is whether this is something that needs a code fix
> > or a configuration fix. Really fighting for low latencies with
> > PREEMPT_NONE is a kinda lost battle. You might want to play whack a
> > mole...
>
> Yes, I read your comment on the other thread afterwards and I agree.
>
> The whole reason we added cond_resched() all over the place over the years was
> to avoid splats from false detected hung tasks (e.g., 30s ...).
>
> Not to optimize latency in the ms range.
Exactly, they aimed to provide reasonable upper boundary of
no-preemption with non-preemptive scheduling. And those are on decline
which is a reason to keep bar for adding new ones high and also
optimizing low latencies fundamentally makes no sense for those models.
So even more reason to not add them in these cases. This will just add
more future work when non-preemptive models are gone which will
eventually happen AFAIU.
--
Michal Hocko
SUSE Labs