[PATCH 3/5] btrfs: add manual PSI accounting for compressed reads

Johannes Weiner hannes at cmpxchg.org
Wed Sep 14 21:46:54 AEST 2022


On Sat, Sep 10, 2022 at 08:50:56AM +0200, Christoph Hellwig wrote:
> 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 at lst.de>

Acked-by: Johannes Weiner <hannes at cmpxchg.org>


More information about the Linux-erofs mailing list