]> nv-tegra.nvidia Code Review - linux-3.10.git/commitdiff
[IA64] re-enable preempt before page allocation for pgtable quicklist
authorMartin Hicks <mort@sgi.com>
Tue, 26 Apr 2005 16:04:31 +0000 (09:04 -0700)
committerTony Luck <aegl@agluck-lia64.sc.intel.com>
Tue, 26 Apr 2005 16:04:31 +0000 (09:04 -0700)
This is a fix to the pgtable_quicklist code.  There is a GFP_KERNEL
allocation in pgtable_quicklist_alloc(), which spews the usual warnings
if the kernel is under heavy VM pressure and the reclaim code is
invoked.  re-enable preempt before we allocate the new page.

This patch is against 2.6.12-rc2-mm2

Signed-off-by: Martin Hicks <mort@sgi.com>
Signed-off-by: Tony Luck <tony.luckintel.com>
include/asm-ia64/pgalloc.h

index 2b7127330ae137f087892ecd77b30a6e5f0f1857..a5f214554afd278830788f5e0673ac2d91fbba04 100644 (file)
@@ -49,12 +49,12 @@ static inline void *pgtable_quicklist_alloc(void)
                pgtable_quicklist = (unsigned long *)(*ret);
                ret[0] = 0;
                --pgtable_quicklist_size;
                pgtable_quicklist = (unsigned long *)(*ret);
                ret[0] = 0;
                --pgtable_quicklist_size;
+               preempt_enable();
        } else {
        } else {
+               preempt_enable();
                ret = (unsigned long *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
        }
 
                ret = (unsigned long *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
        }
 
-       preempt_enable();
-
        return ret;
 }
 
        return ret;
 }