Re: [PATCH] mm/vunmap: Add cond_resched() in vunmap_pmd_range

From
Andrew Morton <akpm@linux-foundation.org>
Date
2020-08-11 04:46:58
Reply to
Aneesh Kumar K.V, 2020-08-07
On Fri,  7 Aug 2020 13:29:33 +0530 "Aneesh Kumar K.V" [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Like zap_pte_range add cond_resched so that we can avoid softlockups as reported
below. On non-preemptible kernel with large I/O map region (like the one we get
when using persistent memory with sector mode), an unmap of the namespace can report
below softlockups.

...
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -102,6 +102,8 @@ static void vunmap_pmd_range(pud_t *pud, unsigned long addr, unsigned long end,
 		if (pmd_none_or_clear_bad(pmd))
 			continue;
 		vunmap_pte_range(pmd, addr, next, mask);
+
+		cond_resched();
 	} while (pmd++, addr = next, addr != end);
 }
That looks sane.  I'll aim for merging it in 5.9-rc2ish, with a
cc:stable, OK?

Thread (3 messages) 3 messages, 2 authors, last reply 2020-08-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help