Thread (6 messages) 6 messages, 4 authors, 2025-10-01

Re: [v2 PATCH] mm: hugetlb: avoid soft lockup when mprotect to large memory area

From: "Christoph Lameter (Ampere)" <cl@gentwo.org>
Date: 2025-09-30 18:43:18
Also in: linux-mm, lkml

On Tue, 30 Sep 2025, Yang Shi wrote:
quoted
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.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help