+ mm-vmalloc-avoid-soft-lockup-warnings-when-vunmaping-large-ranges.patch added to -mm tree

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

 



Subject: + mm-vmalloc-avoid-soft-lockup-warnings-when-vunmaping-large-ranges.patch added to -mm tree
To: david.vrabel@xxxxxxxxxx,dietmar.hahn@xxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Tue, 11 Mar 2014 12:47:34 -0700


The patch titled
     Subject: mm/vmalloc: avoid soft lockup warnings when vunmap()'ing large ranges
has been added to the -mm tree.  Its filename is
     mm-vmalloc-avoid-soft-lockup-warnings-when-vunmaping-large-ranges.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-vmalloc-avoid-soft-lockup-warnings-when-vunmaping-large-ranges.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-vmalloc-avoid-soft-lockup-warnings-when-vunmaping-large-ranges.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: David Vrabel <david.vrabel@xxxxxxxxxx>
Subject: mm/vmalloc: avoid soft lockup warnings when vunmap()'ing large ranges

If vunmap() is used to unmap a large (e.g., 50 GB) region, it may take
sufficiently long that it triggers soft lockup warnings.

Add a cond_resched() into vunmap_pmd_range() so the calling task may be
resheduled after unmapping each PMD entry.  This is how zap_pmd_range()
fixes the same problem for userspace mappings.

All callers may sleep except for the APEI GHES driver (apei/ghes.c) which
calls unmap_kernel_range_no_flush() from NMI and IRQ contexts.  This
driver only unmaps a single pages so don't call cond_resched() if the
unmap doesn't cross a PMD boundary.

Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
Reported-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/vmalloc.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN mm/vmalloc.c~mm-vmalloc-avoid-soft-lockup-warnings-when-vunmaping-large-ranges mm/vmalloc.c
--- a/mm/vmalloc.c~mm-vmalloc-avoid-soft-lockup-warnings-when-vunmaping-large-ranges
+++ a/mm/vmalloc.c
@@ -77,6 +77,8 @@ static void vunmap_pmd_range(pud_t *pud,
 		if (pmd_none_or_clear_bad(pmd))
 			continue;
 		vunmap_pte_range(pmd, addr, next);
+		if (next != end)
+			cond_resched();
 	} while (pmd++, addr = next, addr != end);
 }
 
_

Patches currently in -mm which might be from david.vrabel@xxxxxxxxxx are

mm-vmalloc-avoid-soft-lockup-warnings-when-vunmaping-large-ranges.patch
mm-vmalloc-avoid-soft-lockup-warnings-when-vunmaping-large-ranges-fix.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux