diff options
author | Brian Behlendorf <[email protected]> | 2012-08-18 11:06:21 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-08-27 12:00:55 -0700 |
commit | 500e95c884f711883e094b48b58450ce2d80f2ea (patch) | |
tree | 0e2a2b44f1e862cf10bd3fb4f228fd6b3fab2ea2 | |
parent | 617f79de6aff55213bf233cf90d4425507acf56e (diff) |
Revert "Disable vmalloc() direct reclaim"
This reverts commit 2092cf68d89a51eb0d6193aeadabb579dfc4b4a0. The
use of the PF_MEMALLOC flag was always a hack to work around memory
reclaim deadlocks. Those issues are believed to be resolved so this
workaround can be safely reverted.
Signed-off-by: Brian Behlendorf <[email protected]>
-rw-r--r-- | module/spl/spl-kmem.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 16eb4f884..e07e08c91 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -840,31 +840,11 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags) ASSERT(ISP2(size)); - if (skc->skc_flags & KMC_KMEM) { + if (skc->skc_flags & KMC_KMEM) ptr = (void *)__get_free_pages(flags, get_order(size)); - } else { - /* - * As part of vmalloc() an __pte_alloc_kernel() allocation - * may occur. This internal allocation does not honor the - * gfp flags passed to vmalloc(). This means even when - * vmalloc(GFP_NOFS) is called it is possible synchronous - * reclaim will occur. This reclaim can trigger file IO - * which can result in a deadlock. This issue can be avoided - * by explicitly setting PF_MEMALLOC on the process to - * subvert synchronous reclaim. The following bug has - * been filed at kernel.org to track the issue. - * - * https://bugzilla.kernel.org/show_bug.cgi?id=30702 - */ - if (!(flags & __GFP_FS)) - current->flags |= PF_MEMALLOC; - + else ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL); - if (!(flags & __GFP_FS)) - current->flags &= ~PF_MEMALLOC; - } - /* Resulting allocated memory will be page aligned */ ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); |