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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/11/20 10:16 AM, Andrew Morton wrote:
On Fri,  7 Aug 2020 13:29:33 +0530 "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxx> wrote:

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux