From: Paul Jackson <pj@sgi.com>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
linux-mm@kvack.org, Simon Derr <Simon.Derr@bull.net>,
Christoph Lameter <clameter@sgi.com>,
"Rohit, Seth" <rohit.seth@intel.com>, Paul Jackson <pj@sgi.com>
Subject: [PATCH] mm redo ALLOC_* flag names again
Date: Tue, 15 Nov 2005 11:22:47 -0800 (PST) [thread overview]
Message-ID: <20051115192247.4210.22639.sendpatchset@jackhammer.engr.sgi.com> (raw)
More consistent mm/page_alloc.c ALLOC_* flag names.
Signed-off-by: Paul Jackson <pj@sgi.com>
---
mm/page_alloc.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
--- 2.6.14-mm2.orig/mm/page_alloc.c 2005-11-13 10:32:33.090792563 -0800
+++ 2.6.14-mm2/mm/page_alloc.c 2005-11-15 11:00:30.967888018 -0800
@@ -755,10 +755,10 @@ buffered_rmqueue(struct zone *zone, int
return page;
}
-#define ALLOC_DONT_DIP 0x01 /* don't dip into memory reserves */
-#define ALLOC_DIP_SOME 0x02 /* dip into reserves some */
-#define ALLOC_DIP_ALOT 0x04 /* dip into reserves further */
-#define ALLOC_MUSTHAVE 0x08 /* ignore all constraints */
+#define ALLOC_DIP_NONE 0x01 /* don't dip into memory reserves */
+#define ALLOC_DIP_LESS 0x02 /* dip into reserves some */
+#define ALLOC_DIP_MORE 0x04 /* dip into reserves further */
+#define ALLOC_DIP_FULL 0x08 /* ignore all constraints */
/*
* Return 1 if free pages are above 'mark'. This takes into account the order
@@ -771,9 +771,9 @@ int zone_watermark_ok(struct zone *z, in
long min = mark, free_pages = z->free_pages - (1 << order) + 1;
int o;
- if (alloc_flags & ALLOC_DIP_SOME)
+ if (alloc_flags & ALLOC_DIP_LESS)
min -= min / 2;
- if (alloc_flags & ALLOC_DIP_ALOT)
+ if (alloc_flags & ALLOC_DIP_MORE)
min -= min / 4;
if (free_pages <= min + z->lowmem_reserve[classzone_idx])
@@ -814,8 +814,8 @@ get_page_from_freelist(gfp_t gfp_mask, u
* See also cpuset_zone_allowed() comment in kernel/cpuset.c.
*/
do {
- if (!(alloc_flags & ALLOC_MUSTHAVE)) {
- if (alloc_flags == ALLOC_DONT_DIP)
+ if (!(alloc_flags & ALLOC_DIP_FULL)) {
+ if (alloc_flags == ALLOC_DIP_NONE)
gfp_mask |= __GFP_HARDWALL;
if (!cpuset_zone_allowed(*z, gfp_mask))
continue;
@@ -911,7 +911,7 @@ __alloc_pages(gfp_t gfp_mask, unsigned i
}
restart:
page = get_page_from_freelist(gfp_mask, order,
- zonelist, ALLOC_DONT_DIP);
+ zonelist, ALLOC_DIP_NONE);
if (page)
goto got_pg;
@@ -927,13 +927,13 @@ restart:
* The caller may dip into page reserves a bit more if the caller
* cannot run direct reclaim, or if the caller has realtime scheduling
* policy or is asking for __GFP_HIGH memory. GFP_ATOMIC requests will
- * set both ALLOC_DIP_ALOT (!wait) and ALLOC_DIP_SOME (__GFP_HIGH).
+ * set both ALLOC_DIP_MORE (!wait) and ALLOC_DIP_LESS (__GFP_HIGH).
*/
alloc_flags = 0;
if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait)
- alloc_flags |= ALLOC_DIP_ALOT;
+ alloc_flags |= ALLOC_DIP_MORE;
if (gfp_mask & __GFP_HIGH)
- alloc_flags |= ALLOC_DIP_SOME;
+ alloc_flags |= ALLOC_DIP_LESS;
page = get_page_from_freelist(gfp_mask, order, zonelist, alloc_flags);
if (page)
@@ -947,7 +947,7 @@ restart:
nofail_alloc:
/* go through the zonelist yet again, ignoring mins */
page = get_page_from_freelist(gfp_mask, order,
- zonelist, ALLOC_MUSTHAVE);
+ zonelist, ALLOC_DIP_FULL);
if (page)
goto got_pg;
if (gfp_mask & __GFP_NOFAIL) {
@@ -991,7 +991,7 @@ rebalance:
* under heavy pressure.
*/
page = get_page_from_freelist(gfp_mask, order,
- zonelist, ALLOC_DONT_DIP);
+ zonelist, ALLOC_DIP_NONE);
if (page)
goto got_pg;
--
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>
reply other threads:[~2005-11-15 19:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051115192247.4210.22639.sendpatchset@jackhammer.engr.sgi.com \
--to=pj@sgi.com \
--cc=Simon.Derr@bull.net \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--cc=rohit.seth@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox