On Sat, Sep 10, 2022 at 08:50:54AM +0200, Christoph Hellwig wrote: > PSI tries to account for the cost of bringing back in pages discarded by > the MM LRU management. Currently the prime place for that is hooked into > the bio submission path, which is a rather bad place: > > - it does not actually account I/O for non-block file systems, of which > we have many > - it adds overhead and a layering violation to the block layer > > Add the accounting into the two places in the core MM code that read > pages into an address space by calling into ->read_folio and ->readahead > so that the entire file system operations are covered, to broaden > the coverage and allow removing the accounting in the block layer going > forward. > > As psi_memstall_enter can deal with nested calls this will not lead to > double accounting even while the bio annotations are still present. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> This is much cleaner. With the fixlet Willy pointed out: Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>