mm: Add readahead support for IOCB_NOWAIT
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 23 repliesIn review
Changes from the cover letter
- fs: Add a new flag RWF_IOWAIT for preadv2(2)
https://lore.kernel.org/linux-fsdevel/[email protected]/ [0]
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm: Add memalloc_nowait_{save,restore}include/ | +30 | 34 replies | |
| 2/2 | mm: allow read-ahead with IOCB_NOWAIT setinclude/ mm/ | +6 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Yafang Shao | Christoph Hellwig |
|---|---|---|
| 1/2 | A-b | A-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] mm: Add readahead support for IOCB_NOWAIT
We have use cases where we want to trigger readahead in preadv2(2) with RWF_NOWAIT set [0].
Readahead support was originally added for IOCB_NOWAIT in commit 2e85abf053b9 ("mm: allow read-ahead with IOCB_NOWAIT set"). However, this behavior was modified in commit efa8480a8316 ("fs: RWF_NOWAIT should imply IOCB_NOIO") due to concerns about potential blocking during memory reclamation.
To prevent blocking on memory reclamation, we can utilize memalloc_nowait_{save,restore} to ensure non-blocking behavior. By restoring the original behavior, we can allow preadv2(IOCB_NOWAIT) to read data directly from disk if it's not already in the page cache.
Changes:
- fs: Add a new flag RWF_IOWAIT for preadv2(2)
https://lore.kernel.org/linux-fsdevel/[email protected]/ [0]
Yafang Shao (2):
mm: Add memalloc_nowait_{save,restore}
mm: allow read-ahead with IOCB_NOWAIT set
include/linux/fs.h | 1 - include/linux/sched/mm.h | 30 ++++++++++++++++++++++++++++++ mm/filemap.c | 6 ++++++ 3 files changed, 36 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.5