From: Paul Jackson <pj@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: nickpiggin@yahoo.com.au, rohit.seth@intel.com, torvalds@osdl.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: Cleanup of __alloc_pages
Date: Sat, 12 Nov 2005 23:47:10 -0800 [thread overview]
Message-ID: <20051112234710.3d567e21.pj@sgi.com> (raw)
In-Reply-To: <20051112231211.372be3a9.akpm@osdl.org>
> Yes, the fact that GFP_ATOMIC also implies "use the emergency pool" is
> unfortunate, and perhaps the two should always have been separated out, at
> least to make the programmer think about whether the code really needs
> access to the emergency pools. Usually it does.
Ah - now it makes more sense.
The key invisible fact in the gfp.h line:
#define GFP_ATOMIC (__GFP_VALID | __GFP_HIGH)
is that __GFP_WAIT is *not* set (making it mean don't sleep).
All the other commonly used GFP_* flags do have __GFP_WAIT.
I have no issue with ATOMIC also meaning "use emergency pool".
That's an appropriate simplication, that fits the usage well.
I just had a mental block on the invisible unset __GFP_WAIT bit.
Would you look kindly on a patch that did:
--- 2.6.14-mm2.orig/include/linux/gfp.h 2005-11-12 23:36:57.258103418 -0800
+++ 2.6.14-mm2/include/linux/gfp.h 2005-11-12 23:42:35.287219455 -0800
@@ -58,6 +58,7 @@ struct vm_area_struct;
__GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
__GFP_NOMEMALLOC|__GFP_HARDWALL)
+/* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */
#define GFP_ATOMIC (__GFP_VALID | __GFP_HIGH)
#define GFP_NOIO (__GFP_VALID | __GFP_WAIT)
#define GFP_NOFS (__GFP_VALID | __GFP_WAIT | __GFP_IO)
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
--
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>
next prev parent reply other threads:[~2005-11-13 7:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-08 1:43 Rohit, Seth
2005-11-08 1:53 ` Andrew Morton
2005-11-08 2:16 ` Rohit Seth
2005-11-08 2:44 ` Andrew Morton
2005-11-08 3:47 ` Nick Piggin
2005-11-08 5:44 ` Paul Jackson
2005-11-08 6:00 ` Nick Piggin
2005-11-08 6:22 ` Paul Jackson
2005-11-08 18:17 ` Rohit Seth
2005-11-08 19:54 ` Paul Jackson
2005-11-09 2:52 ` Nick Piggin
2005-11-13 5:09 ` Paul Jackson
2005-11-13 5:14 ` Paul Jackson
2005-11-13 7:00 ` Nathan Scott
2005-11-13 7:12 ` Andrew Morton
2005-11-13 7:47 ` Paul Jackson [this message]
2005-11-08 3:07 ` Paul Jackson
2005-11-08 5:31 ` Nick Piggin
2005-11-09 0:17 ` Paul Jackson
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=20051112234710.3d567e21.pj@sgi.com \
--to=pj@sgi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--cc=rohit.seth@intel.com \
--cc=torvalds@osdl.org \
/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