diff options
| author | Liu Shixin <[email protected]> | 2024-03-22 09:35:55 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-04-26 03:56:07 +0000 |
| commit | 5c46d5319bde73075c5f2cefd555426848eb506f (patch) | |
| tree | 7a3bf0df6f60b43db4c0832d091b3b7df1061822 /mm/vmalloc.c | |
| parent | mm/readahead: break read-ahead loop if filemap_add_folio return -ENOMEM (diff) | |
| download | kernel-5c46d5319bde73075c5f2cefd555426848eb506f.tar.gz kernel-5c46d5319bde73075c5f2cefd555426848eb506f.zip | |
mm/filemap: don't decrease mmap_miss when folio has workingset flag
If there are too many folios that are recently evicted in a file, then
they will probably continue to be evicted. In such situation, there is no
positive effect to read-ahead this file since it is only a waste of IO.
The mmap_miss is increased in do_sync_mmap_readahead() and decreased in
both do_async_mmap_readahead() and filemap_map_pages(). In order to skip
read-ahead in above scenario, the mmap_miss have to increased exceed
MMAP_LOTSAMISS. This can be done by stop decreased mmap_miss when folio
has workingset flag. The async path is not to care because in above
scenario, it's hard to run into the async path.
[[email protected]: add comments]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Liu Shixin <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Jinjiang Tu <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/vmalloc.c')
0 files changed, 0 insertions, 0 deletions
