RFC Tiny optimization for large read operations
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | mm/filemap: Do not use is_partially_uptodate for entire foliomm/ | +3 | 0 replies | |
| 2/3 | mm/filemap: Avoid modifying iocb->ki_flags for AIO in filemap_get_pages()mm/ | +13 | 2 replies | |
| 3/3 | mm/filemap: Skip non-uptodate folio when folios are availablemm/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/3] Tiny optimization for large read operations
From: Chi Zhiling <[email protected]>
Fine-Tuned Optimization for Large IO Read Operations
When reading data exceeding the maximum IO size, the operation is split into multiple IO requests, but the data isn't immediately copied to user space after IO completion. For example, when reading 2560k data from a device with 1280k maximum IO size, the following sequence occurs:
1. read 1280k
2. copy 31 pages to user buffer
3. copy 10 pages and issue read ahead for next 1280k
4. copy 31 pages to user buffer
5. wait the next 1280k
6. copy 8 pages to user buffer
7. copy 20 folios(64k) to user buffer
The 8 pages in step 6 are copied after the second 1280k completes due to waiting for non-uptodate folio in filemap_update_page. After applying the patch, these 8 pages will be copied before the next IO completes:
1. read 1280k
2. copy 31 pages to user buffer
3. copy 10 pages and issue read ahead for next 1280k
4. copy 31 pages to user buffer
5. copy 8 pages to user buffer
6. wait the next 1280k
7. copy 20 folios(64k) to user buffer
Chi Zhiling (3):
mm/filemap: Do not use is_partially_uptodate for entire folio mm/filemap: Avoid modifying iocb->ki_flags for AIO in
filemap_get_pages()
mm/filemap: Skip non-uptodate folio when folios are available
mm/filemap.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
Signature · 1 line
2.43.0