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

From
Aneesh Kumar K.V <hidden>
Date
2020-08-11 08:47:51
Reply to
Andrew Morton, 2020-08-11
On 8/11/20 10:16 AM, Andrew Morton wrote:
On Fri,  7 Aug 2020 13:29:33 +0530 "Aneesh Kumar K.V" [off-list ref] wrote:
quoted
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?
Sure. I was not so particular about stable because it was only a softlockup warning.

-aneesh
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