mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fix BUG_ON(!PageSlab) from fallback_alloc
@ 2007-01-04 17:49 Hugh Dickins
  2007-01-04 18:23 ` Pekka Enberg
  2007-01-04 18:41 ` Christoph Lameter
  0 siblings, 2 replies; 8+ messages in thread
From: Hugh Dickins @ 2007-01-04 17:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Christoph Lameter, Pekka J Enberg, linux-kernel

pdflush hit the BUG_ON(!PageSlab(page)) in kmem_freepages called from
fallback_alloc: cache_grow already freed those pages when alloc_slabmgmt
failed.  But it wouldn't have freed them if __GFP_NO_GROW, so make sure
fallback_alloc doesn't waste its time on that case.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
___
Fixes a CONFIG_NUMA regression introduced in 2.6.20-rc1.  Or you may
feel it's cleaner for cache_grow to skip its kmem_freepages when objp
is input: patch below is slightly simpler, but I've no strong feeling.

 mm/slab.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 2.6.20-rc3/mm/slab.c	2007-01-01 10:30:46.000000000 +0000
+++ linux/mm/slab.c	2007-01-04 17:30:11.000000000 +0000
@@ -3281,7 +3281,7 @@ retry:
 					flags | GFP_THISNODE, nid);
 	}
 
-	if (!obj) {
+	if (!obj && !(flags & __GFP_NO_GROW)) {
 		/*
 		 * This allocation will be performed within the constraints
 		 * of the current cpuset / memory policy requirements.
@@ -3310,7 +3310,7 @@ retry:
 					 */
 					goto retry;
 			} else {
-				kmem_freepages(cache, obj);
+				/* cache_grow already freed obj */
 				obj = NULL;
 			}
 		}

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-01-04 20:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-04 17:49 [PATCH] fix BUG_ON(!PageSlab) from fallback_alloc Hugh Dickins
2007-01-04 18:23 ` Pekka Enberg
2007-01-04 18:43   ` Christoph Lameter
2007-01-04 20:51     ` Pekka J Enberg
2007-01-04 20:57       ` Christoph Lameter
2007-01-04 18:57   ` Hugh Dickins
2007-01-04 19:20     ` Pekka Enberg
2007-01-04 18:41 ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®