From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "hare@suse.com" <hare@suse.com>,
"martin@lichtvoll.de" <martin@lichtvoll.de>,
"oleksandr@natalenko.name" <oleksandr@natalenko.name>,
"willy@infradead.org" <willy@infradead.org>,
"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: Block layer use of __GFP flags
Date: Sun, 8 Apr 2018 16:40:59 +0000 [thread overview]
Message-ID: <aea2f6bcae3fe2b88e020d6a258706af1ce1a58b.camel@wdc.com> (raw)
In-Reply-To: <20180408065425.GD16007@bombadil.infradead.org>
On Sat, 2018-04-07 at 23:54 -0700, Matthew Wilcox wrote:
> Please explain:
>
> commit 6a15674d1e90917f1723a814e2e8c949000440f7
> Author: Bart Van Assche <bart.vanassche@wdc.com>
> Date: Thu Nov 9 10:49:54 2017 -0800
>
> block: Introduce blk_get_request_flags()
>
> A side effect of this patch is that the GFP mask that is passed to
> several allocation functions in the legacy block layer is changed
> from GFP_KERNEL into __GFP_DIRECT_RECLAIM.
>
> Why was this thought to be a good idea? I think gfp.h is pretty clear:
>
> * Useful GFP flag combinations that are commonly used. It is recommended
> * that subsystems start with one of these combinations and then set/clear
> * __GFP_FOO flags as necessary.
>
> Instead, the block layer now throws away all but one bit of the
> information being passed in by the callers, and all it tells the allocator
> is whether or not it can start doing direct reclaim. I can see that
> you may well be in a situation where you don't want to start more I/O,
> but your caller knows that! Why make the allocator work harder than
> it has to? In particular, why isn't the page allocator allowed to wake
> up kswapd to do reclaim in non-atomic context, but is when the caller
> is in atomic context?
__GFP_KSWAPD_RECLAIM wasn't stripped off on purpose for non-atomic
allocations. That was an oversight.
Do you perhaps want me to prepare a patch that makes blk_get_request() again
respect the full gfp mask passed as third argument to blk_get_request()?
Bart.
next prev parent reply other threads:[~2018-04-08 16:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-08 6:54 Matthew Wilcox
2018-04-08 16:40 ` Bart Van Assche [this message]
2018-04-08 19:08 ` Matthew Wilcox
2018-04-09 4:46 ` Bart Van Assche
2018-04-09 6:53 ` Hannes Reinecke
2018-04-09 8:26 ` Christoph Hellwig
2018-04-09 15:11 ` Matthew Wilcox
2018-04-09 15:15 ` Bart Van Assche
2018-04-09 9:00 ` Michal Hocko
2018-04-09 15:03 ` Bart Van Assche
2018-04-09 17:31 ` Michal Hocko
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=aea2f6bcae3fe2b88e020d6a258706af1ce1a58b.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=martin@lichtvoll.de \
--cc=oleksandr@natalenko.name \
--cc=willy@infradead.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