From: Jens Axboe <axboe@kernel.dk>
To: Hugh Dickins <hughd@google.com>, Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] block/bio.c: use GFP_NOFS
Date: Mon, 16 Jun 2014 09:12:36 -0600 [thread overview]
Message-ID: <539F0964.5070002@kernel.dk> (raw)
In-Reply-To: <alpine.LSU.2.11.1406151720170.25654@eggly.anvils>
On 2014-06-15 18:28, Hugh Dickins wrote:
> On Sat, 14 Jun 2014, Fabian Frederick wrote:
>
>> Use GFP_NOFS instead of its definition.
>>
>> Cc: Jens Axboe <axboe@kernel.dk>
>> Signed-off-by: Fabian Frederick <fabf@skynet.be>
>> ---
>> block/bio.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/block/bio.c b/block/bio.c
>> index 8c2e55e..ec5d172 100644
>> --- a/block/bio.c
>> +++ b/block/bio.c
>> @@ -211,7 +211,7 @@ fallback:
>> bvl = mempool_alloc(pool, gfp_mask);
>> } else {
>> struct biovec_slab *bvs = bvec_slabs + *idx;
>> - gfp_t __gfp_mask = gfp_mask & ~(__GFP_WAIT | __GFP_IO);
>> + gfp_t __gfp_mask = gfp_mask & ~GFP_NOFS;
>>
>> /*
>> * Make this allocation restricted and don't dump info on
>> --
>> 1.8.4.5
>
> Please no. The original was fine, this just makes it harder to read.
I agree. GFP_NOFS is useful when it's used as a whole, but for this use
case, explicitly saying that we want to wait for mem and we allow IO is
much clearer. The fact that this just happens to be GFP_NOFS doesn't
really matter.
> (But I confess to hypocrisy in finding "& ~GFP_KERNEL" useful myself
> in the past somewhere.)
That's just sick, Hugh :-)
--
Jens Axboe
prev parent reply other threads:[~2014-06-16 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-14 20:57 [PATCH 1/1] block/bio.c: use GFP_NOFS Fabian Frederick
2014-06-16 0:28 ` Hugh Dickins
2014-06-16 15:12 ` Jens Axboe [this message]
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=539F0964.5070002@kernel.dk \
--to=axboe@kernel.dk \
--cc=fabf@skynet.be \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.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