Please explain: commit 6a15674d1e90917f1723a814e2e8c949000440f7 Author: Bart Van Assche <bart.vanass...@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.