On Sat, Sep 10, 2022 at 08:50:54AM +0200, Christoph Hellwig wrote:
> @@ -480,11 +487,14 @@ static inline int ra_alloc_folio(struct
> readahead_control *ractl, pgoff_t index,
> if (index == mark)
> folio_set_readahead(folio);
> err = filemap_add_folio(ractl->mapping,
On 9/10/22 12:50 AM, Christoph Hellwig wrote:
> @@ -2390,8 +2392,13 @@ static int filemap_read_folio(struct file *file,
> filler_t filler,
>* fails.
>*/
> folio_clear_error(folio);
> +
> /* Start the actual read. The read will unlock the page. */
> + if
On 9/10/22 12:50 AM, Christoph Hellwig wrote:
> Hi all,
>
> currently the VM tries to abuse the block layer submission path for
> the page cache PSI annotations. This series instead annotates the
> ->read_folio and ->readahead calls in the core VM code, and then
> only deals with the odd direct
PSI accounting is now done by the VM code, where it should have been
since the beginning.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 8
block/blk-core.c | 17 -
fs/direct-io.c| 2 --
include/linux/blk_types.h | 1 -
4 files
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
erofs uses an additional address space for compressed data read from disk
in addition to the one directly associated with the inode. Reading into
the lower address space is open coded using add_to_page_cache_lru instead
of using the filemap.c helper for page allocation micro-optimizations,
which
To properly account for all refaults from file system logic, file systems
need to call psi_memstall_enter directly, so export it.
Signed-off-by: Christoph Hellwig
---
kernel/sched/psi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
index
Hi all,
currently the VM tries to abuse the block layer submission path for
the page cache PSI annotations. This series instead annotates the
->read_folio and ->readahead calls in the core VM code, and then
only deals with the odd direct add_to_page_cache_lru calls manually.
Diffstat:
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