[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <52A899AB.3010506@citrix.com>
Date: Wed, 11 Dec 2013 16:58:19 +0000
From: David Vrabel <david.vrabel@...rix.com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Len Brown <lenb@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
<linux-acpi@...r.kernel.org>,
xen-devel <xen-devel@...ts.xenproject.org>,
Dietmar Hahn <dietmar.hahn@...fujitsu.com>
Subject: vunmap() on large regions may trigger soft lockup warnings
Andrew,
Dietmar Hahn reported an issue where calling vunmap() on a large (50 GB)
region would trigger soft lockup warnings.
The following patch would resolve this (by adding a cond_resched() call
to vunmap_pmd_range()). Almost calls of vunmap(), unmap_kernel_range()
are from process context (as far as I could tell) except for an ACPI
driver (drivers/acpi/apei/ghes.c) calls unmap_kernel_range_noflush()
from an interrupt and NMI contexts.
Can you advise on a preferred solution?
For example, an unmap_kernel_page() function (callable from atomic
context) could be provided since the GHES driver only maps/unmaps a
single page.
8<-------------------------
mm/vmalloc: avoid soft lockup warnings when vunmap()'ing large ranges
From: David Vrabel <david.vrabel@...rix.com>
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.
Reported-by: Dietmar Hahn <dietmar.hahn@...fujitsu.com>
Signed-off-by: David Vrabel <david.vrabel@...rix.com>
---
mm/vmalloc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 0fdf968..b1b5b39 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -75,6 +75,7 @@ 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);
+ cond_resched();
} while (pmd++, addr = next, addr != end);
}
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists