]> git.proxmox.com Git - mirror_spl.git/commitdiff
Revert "Detect kernels that honor gfp flags passed to vmalloc()"
authorBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 18 Aug 2012 18:01:22 +0000 (11:01 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 27 Aug 2012 19:00:55 +0000 (12:00 -0700)
This reverts commit 36811b4430aaea8c8b91bbe7d812a26799865499.
Which is no longer required because there is now SPL code in
place to safely handle the deadlocks the kernel patch was designed
to address.  Therefore we can unconditionally use vmalloc() and
drop all the PF_MEMALLOC code.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
config/spl-build.m4
module/spl/spl-kmem.c
spl_config.h.in

index dad4c8ed24f1478ae29e0a3c50e879dce14d2ac9..b7ab54d32b1d9b2fb9db3d53772cd4d9b97b5139 100644 (file)
@@ -88,7 +88,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
        SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
        SPL_AC_SHRINK_CONTROL_STRUCT
        SPL_AC_RWSEM_SPINLOCK_IS_RAW
-       SPL_AC_PMD_ALLOC_WITH_MASK
 ])
 
 AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
@@ -2235,38 +2234,3 @@ AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [
        ])
        EXTRA_KCFLAGS="$tmp_flags"
 ])
-
-dnl #
-dnl # Proposed VM Subsystem Bug Fix
-dnl # https://bugs.gentoo.org/show_bug.cgi?id=416685
-dnl #
-dnl # Make __pte_alloc_kernel() honor gfp flags passed to vmalloc()
-dnl # This is detected by checking a macro that is changed to support this.
-dnl #
-AC_DEFUN([SPL_AC_PMD_ALLOC_WITH_MASK], [
-       AC_MSG_CHECKING([whether pmd_alloc_with_mask exists])
-       SPL_LINUX_TRY_COMPILE([
-               #if !defined(CONFIG_MMU)
-               #define CONFIG_MMU
-               #endif
-
-               #if defined(RCH_HAS_4LEVEL_HACK)
-               #undef RCH_HAS_4LEVEL_HACK
-               #endif
-
-               #include <linux/mm.h>
-       ],[
-               struct mm_struct init_mm;
-               pud_t *pud = NULL;
-               unsigned long addr = 0;
-               gfp_t gfp_mask = GFP_KERNEL;
-
-               pmd_alloc_with_mask(&init_mm, pud, addr, gfp_mask);
-       ],[
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_PMD_ALLOC_WITH_MASK, 1,
-                         [pmd_alloc_with_mask exists])
-       ],[
-               AC_MSG_RESULT(no)
-       ])
-])
index 4cf3b26ad0be4b0e5863dc1d547b63ffa89339a2..2d5f751b0610d7a5c5f5acb355a7d3e616694426 100644 (file)
@@ -843,9 +843,6 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags)
        if (skc->skc_flags & KMC_KMEM) {
                ptr = (void *)__get_free_pages(flags, get_order(size));
        } else {
-#ifdef HAVE_PMD_ALLOC_WITH_MASK
-               ptr = __vmalloc(size, flags|__GFP_HIGHMEM, PAGE_KERNEL);
-#else
                /*
                 * As part of vmalloc() an __pte_alloc_kernel() allocation
                 * may occur.  This internal allocation does not honor the
@@ -869,7 +866,6 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags)
                } else {
                        ptr = __vmalloc(size, flags|__GFP_HIGHMEM, PAGE_KERNEL);
                }
-#endif
        }
 
        /* Resulting allocated memory will be page aligned */
index 4ee1b33535d0238ee4cd5df7bbf6578154bd751f..29093c2e8a2c8655a469ea59c694d857542c776d 100644 (file)
 /* pgdat_list is available */
 #undef HAVE_PGDAT_LIST
 
-/* pmd_alloc_with_mask exists */
-#undef HAVE_PMD_ALLOC_WITH_MASK
-
 /* __put_task_struct() is available */
 #undef HAVE_PUT_TASK_STRUCT