From 1259de74b3c2eaa4ff0db04b7dfdcbf40ffb6fb8 Mon Sep 17 00:00:00 2001 From: jacob Date: Tue, 2 Dec 2003 19:28:34 +0000 Subject: [PATCH] b=2310 r=phil fix a missed case in the GFP_MEMALLOC patch which can cause ksocknald to block on kswapd (which is bad) --- lustre/kernel_patches/patches/gfp_memalloc-2.4.20-rh.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lustre/kernel_patches/patches/gfp_memalloc-2.4.20-rh.patch b/lustre/kernel_patches/patches/gfp_memalloc-2.4.20-rh.patch index 3f37e44..79caa76 100644 --- a/lustre/kernel_patches/patches/gfp_memalloc-2.4.20-rh.patch +++ b/lustre/kernel_patches/patches/gfp_memalloc-2.4.20-rh.patch @@ -32,6 +32,17 @@ Index: linux-2.4.20-rh-20.9/mm/page_alloc.c /* * Are we dealing with a higher order allocation? * +@@ -583,7 +583,9 @@ + + /* XXX: is pages_min/4 a good amount to reserve for this? */ + min += z->pages_min / 4; +- if (z->free_pages > min || ((current->flags & PF_MEMALLOC) && !in_interrupt())) { ++ if (z->free_pages > min || ++ (((current->flags & PF_MEMALLOC) || (gfp_mask & __GFP_MEMALLOC)) ++ && !in_interrupt())) { + page = rmqueue(z, order); + if (page) + return page; Index: linux-2.4.20-rh-20.9/include/linux/slab.h =================================================================== --- linux-2.4.20-rh-20.9.orig/include/linux/slab.h 2003-11-13 17:35:48.000000000 +0300 -- 1.8.3.1