[PATCH 01/05] mm fix __alloc_pages cpuset ALLOC_* flags
From: Paul Jackson (pj_at_sgi.com)
Date: 11/14/05
- Previous message: Paul Jackson: "[PATCH 02/05] mm simplify __alloc_pages cpuset ALLOC_* flags"
- Next in thread: Paul Jackson: "[PATCH 02/05] mm simplify __alloc_pages cpuset ALLOC_* flags"
- Reply: Paul Jackson: "[PATCH 02/05] mm simplify __alloc_pages cpuset ALLOC_* flags"
- Reply: Paul Jackson: "[PATCH 04/05] mm simplify __alloc_pages cpuset hardwall logic"
- Reply: Paul Jackson: "[PATCH 03/05] mm rationalize __alloc_pages ALLOC_* flag names"
- Reply: Paul Jackson: "[PATCH 05/05] mm GFP_ATOMIC comment"
- Reply: Nick Piggin: "Re: [PATCH 01/05] mm fix __alloc_pages cpuset ALLOC_* flags"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 13 Nov 2005 20:03:29 -0800 (PST) To: akpm@osdl.org, linux-kernel@vger.kernel.org
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Paul Jackson: "[PATCH 02/05] mm simplify __alloc_pages cpuset ALLOC_* flags"
- Next in thread: Paul Jackson: "[PATCH 02/05] mm simplify __alloc_pages cpuset ALLOC_* flags"
- Reply: Paul Jackson: "[PATCH 02/05] mm simplify __alloc_pages cpuset ALLOC_* flags"
- Reply: Paul Jackson: "[PATCH 04/05] mm simplify __alloc_pages cpuset hardwall logic"
- Reply: Paul Jackson: "[PATCH 03/05] mm rationalize __alloc_pages ALLOC_* flag names"
- Reply: Paul Jackson: "[PATCH 05/05] mm GFP_ATOMIC comment"
- Reply: Nick Piggin: "Re: [PATCH 01/05] mm fix __alloc_pages cpuset ALLOC_* flags"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: [PATCH 01/05] mm fix __alloc_pages cpuset ALLOC_* flags
... With this, cpuset confinement ... > flag entirely. ... Send
instant messages to your online friends http://au.messenger.yahoo.com ... send the line
"unsubscribe linux-kernel" in ... (Linux-Kernel) - Re: d_splice_alias() problem.
... After reading your comments below the semantics of the flag ... Suppose one
thread creates a disconnected dentry, ... When it is half way up another request
comes in for the same ... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - Re: Purpose of MMC_DATA_MULTI?
... without any immediate users, the MMC_DATA_MULTI flag. ... first case and change
their code to check the block count in the request? ... the command register. ...
send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - Re: [patch 2/2] cpusets: add interleave_over_allowed option
... The discussion involving that flag name was kinda mixed up;). ... Christoph
has a point when he cautions against breaking this kernel API. ... libnuma software
stack. ... from cpuset centric to system centric (if they asked for the ...
(Linux-Kernel) - Re: [patch 2/2] cpusets: add interleave_over_allowed option
... The discussion involving that flag name was kinda mixed up;). ... Christoph
has a point when he cautions against breaking this kernel API. ... libnuma software
stack. ... from cpuset centric to system centric (if they asked for the ...
(Linux-Kernel)