linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/05] mm fix __alloc_pages cpuset ALLOC_* flags
@ 2005-11-14  4:03 Paul Jackson
  2005-11-14  4:03 ` [PATCH 02/05] mm simplify " Paul Jackson
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Paul Jackson @ 2005-11-14  4:03 UTC (permalink / raw)
  To: akpm, linux-kernel
  Cc: Nick Piggin, linux-mm, Simon Derr, Christoph Lameter, Rohit,
	Seth, Paul Jackson

Two changes to the setting of the ALLOC_CPUSET flag in
mm/page_alloc.c:__alloc_pages()

 1) A bug fix - the "ignoring mins" case should not be honoring
    ALLOC_CPUSET.  This case of all cases, since it is handling a
    request that will free up more memory than is asked for (exiting
    tasks, e.g.) should be allowed to escape cpuset constraints
    when memory is tight.

 2) A logic change to make it simpler.  Honor cpusets even on
    GFP_ATOMIC (!wait) requests.  With this, cpuset confinement
    applies to all requests except ALLOC_NO_WATERMARKS, so that
    in a subsequent cleanup patch, I can remove the ALLOC_CPUSET
    flag entirely.  Since I don't know any real reason this
    logic has to be either way, I am choosing the path of the
    simplest code.

Signed-off-by: Paul Jackson <pj@sgi.com>

---

 mm/page_alloc.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

--- 2.6.14-mm2.orig/mm/page_alloc.c	2005-11-12 22:25:03.305301135 -0800
+++ 2.6.14-mm2/mm/page_alloc.c	2005-11-12 22:27:30.519813285 -0800
@@ -933,8 +933,7 @@ restart:
 		alloc_flags |= ALLOC_HARDER;
 	if (gfp_mask & __GFP_HIGH)
 		alloc_flags |= ALLOC_HIGH;
-	if (wait)
-		alloc_flags |= ALLOC_CPUSET;
+	alloc_flags |= ALLOC_CPUSET;
 
 	/*
 	 * Go through the zonelist again. Let __GFP_HIGH and allocations
@@ -956,7 +955,7 @@ restart:
 nofail_alloc:
 			/* go through the zonelist yet again, ignoring mins */
 			page = get_page_from_freelist(gfp_mask, order,
-				zonelist, ALLOC_NO_WATERMARKS|ALLOC_CPUSET);
+				zonelist, ALLOC_NO_WATERMARKS);
 			if (page)
 				goto got_pg;
 			if (gfp_mask & __GFP_NOFAIL) {

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2005-11-15 19:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-14  4:03 [PATCH 01/05] mm fix __alloc_pages cpuset ALLOC_* flags Paul Jackson
2005-11-14  4:03 ` [PATCH 02/05] mm simplify " Paul Jackson
2005-11-14  4:03 ` [PATCH 03/05] mm rationalize __alloc_pages ALLOC_* flag names Paul Jackson
2005-11-15  9:00   ` Nick Piggin
2005-11-15  9:03     ` Andrew Morton
2005-11-15  9:55       ` Nick Piggin
2005-11-15 19:20         ` Paul Jackson
2005-11-15  9:59       ` Arjan van de Ven
2005-11-15  9:18     ` Paul Jackson
2005-11-14  4:04 ` [PATCH 04/05] mm simplify __alloc_pages cpuset hardwall logic Paul Jackson
2005-11-14  4:04 ` [PATCH 05/05] mm GFP_ATOMIC comment Paul Jackson
2005-11-15  8:52 ` [PATCH 01/05] mm fix __alloc_pages cpuset ALLOC_* flags Nick Piggin
2005-11-15  9:50   ` Paul Jackson

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