linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Block layer use of __GFP flags
@ 2018-04-08  6:54 Matthew Wilcox
  2018-04-08 16:40 ` Bart Van Assche
  0 siblings, 1 reply; 11+ messages in thread
From: Matthew Wilcox @ 2018-04-08  6:54 UTC (permalink / raw)
  To: Bart Van Assche, Hannes Reinecke, Martin Steigerwald,
	Oleksandr Natalenko, Jens Axboe
  Cc: linux-block, linux-mm


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?

This changelog is woefully short on detail.  It says what you're doing,
but not why you're doing it.  And now I have no idea and I have to ask you
what you were thinking at the time.  Please be more considerate in future.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-04-09 17:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-08  6:54 Block layer use of __GFP flags Matthew Wilcox
2018-04-08 16:40 ` Bart Van Assche
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).