From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Robert P. J. Day" <rpjday@mindspring.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
schwidefsky@de.ibm.com, Andrew Morton <akpm@osdl.org>,
linux-mm@kvack.org
Subject: Re: [PATCH] S390: Replace calls to __get_free_pages() with __get_dma_pages().
Date: Wed, 6 Jun 2007 02:35:39 +0530 [thread overview]
Message-ID: <a781481a0706051405n5af19f2t52bd1760f216fd59@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0706051650110.19661@localhost.localdomain>
Hi,
On 6/6/07, Robert P. J. Day <rpjday@mindspring.com> wrote:
>
> Replace a number of calls to __get_free_pages() with the corresponding
> calls to __get_dma_pages().
> [...]
> once the __GFP_DMA argument is removed, it does look weird to see
> the first argument of just 0. should that be filled in with
> GFP_ATOMIC as christopher lameter suggested?
Yes, I suppose so ... GFP_ATOMIC can dip into the emergency
pools so would also make this code a bit more "robust" than using
"0" (== GFP_NOWAIT) and it's not that GFP_ATOMIC "waits" on
anything either ...
> - (void *)__get_free_pages(__GFP_DMA,
> + (void *)__get_dma_pages(0,
GFP_NOWAIT == 0, so the macro GFP_NOWAIT is the one to
use if you really don't want any change in behaviour (and as the
comment above GFP_NOWAIT says, it's much better to use that
name than simply specify "0").
Off-topic, but I wonder what are the valid usage cases / scenarios
for GFP_NOWAIT? The obvious answer is somebody might want to
be a way-too-polite citizen and stay off the emergency pools even
from atomic context, but why would anybody want to do /that/ ...
[ BTW there are 3 users of GFP_NOWAIT in kernel code, but there
could be more that simply specify "0" to get same behaviour. ]
Satyam
--
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>
parent reply other threads:[~2007-06-05 21:05 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <Pine.LNX.4.64.0706051650110.19661@localhost.localdomain>]
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=a781481a0706051405n5af19f2t52bd1760f216fd59@mail.gmail.com \
--to=satyam.sharma@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rpjday@mindspring.com \
--cc=schwidefsky@de.ibm.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