]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add manual PSI accounting for compressed reads
authorChristoph Hellwig <hch@lst.de>
Thu, 15 Sep 2022 09:41:58 +0000 (10:41 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 20 Sep 2022 14:24:38 +0000 (08:24 -0600)
commit4088a47e78f95a5fea683cf67e0be006b13831fd
tree08246485b7e6b1e1847ad759f7986625dca24f78
parent527eb453bbfe65e5a55a90edfb1f30b477e36b8c
btrfs: add manual PSI accounting for compressed reads

btrfs compressed reads try to always read the entire compressed chunk,
even if only a subset is requested.  Currently this is covered by the
magic PSI accounting underneath submit_bio, but that is about to go
away. Instead add manual psi_memstall_{enter,leave} annotations.

Note that for readahead this really should be using readahead_expand,
but the additionals reads are also done for plain ->read_folio where
readahead_expand can't work, so this overall logic is left as-is for
now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David Sterba <dsterba@suse.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lore.kernel.org/r/20220915094200.139713-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/btrfs/compression.c