[v2 PATCH] mm: hugetlb: avoid soft lockup when mprotect to large memory area
Christoph Lameter (Ampere)
cl at gentwo.org
Tue Sep 30 11:43:12 PDT 2025
On Tue, 30 Sep 2025, Yang Shi wrote:
> > Does it make sense to also do cond_resched() in the huge_pmd_unshare()
> > branch?
> > That also amounts to clearing a page. And I can see for example,
> > zap_huge_pmd()
> > and change_huge_pmd() consume a cond_resched().
>
> Thanks for raising this. I did think about it. But I didn't convince myself
> because shared pmd should be not that common IMHO (If I'm wrong, please feel
> free to correct me). At least PMD can't be shared if the memory is tagged
> IIRC. So I'd like to keep the patch minimal for now and defer adding
> cond_resched() until it is hit by some real life workload.
It would be good to send out a second path that covers the other cases
for discussion.
More information about the linux-arm-kernel
mailing list