Re: [PATCH] blk-wbt: do not throttle swap write on processes other than kswapd

From: Christoph Hellwig
Date: Thu Aug 11 2022 - 10:09:24 EST


On Thu, Aug 11, 2022 at 07:32:25PM +0800, Hongchen Zhang wrote:
> + if (current_is_kswapd() ||
> + (bio->bi_end_io != end_swap_bio_write))
> + flags |= WBT_TRACKED;

Why can't this just use REQ_SWAP instead of doing strange poking into
deep kernel internals?