netfs: Use a bvecq chain position abstraction
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v17 Latest8 patches 0 repliesNew
- v168 patches 0 repliesSuperseded
- v158 patches 0 repliesSuperseded
Earlier versions · 15
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v14 | 8 patches | 0 replies | Superseded | |
| v13 | 8 patches | 0 replies | Superseded | |
| v12 | 8 patches | 0 replies | Superseded | |
| v11 | 36 patches | 1 reply | Superseded | |
| v10 | 35 patches | 3 replies | Superseded | |
| v9 | 26 patches | 4 replies | Superseded | |
| v8 | 25 patches | 1 reply | Applied | |
| v7 | 29 patches | 0 replies | Superseded | |
| v6 | 24 patches | 0 replies | Superseded | |
| v5 posting 2/2 | 21 patches | 0 replies | Superseded | |
| v5 posting 1/2 | 6 of 21 patches | 1 reply | Superseded | |
| v4 | 30 patches | 3 replies | Superseded | |
| v3 | 22 patches | 0 replies | Superseded | |
| v2 | 21 patches | 8 replies | Superseded | |
| v1 | 26 patches | 19 replies | Superseded |
Patches in v17 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | mm: Make readahead store folio count in readahead_controlinclude/ mm/ | +15 | 0 replies | |
| 2/8 | netfs: Add a function to extract from an iter into a bvecqfs/ include/ | +146 | 0 replies | |
| 3/8 | netfs: Make unbuffered/DIO read and write use bvecqfs/ fs/ fs/ +2 more | +40 | 0 replies | |
| 4/8 | netfs: Add some tools for managing a position in a bvecq chainfs/ include/ | +451 | 0 replies | |
| 5/8 | netfs: Provide a func to load the readahead buffers into a bvecq chainfs/ include/ | +61 | 0 replies | |
| 6/8 | netfs: Use bvecq_pos to hold the buffer positionsfs/ fs/ fs/ +17 more | +585 | 0 replies | |
| 7/8 | netfs: Remove the rolling_buffer implementationfs/ include/ | +0 | 0 replies | |
| 8/8 | netfs: Remove netfs_extract_user_iter()fs/ include/ | +0 | 0 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Paulo Alcantara (Red Hat) |
|---|---|
| 1/8 | R-b |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v17 0/8] netfs: Use a bvecq chain position abstraction
Hi Christian,
Could you pull these patches please into your vfs-7.4.netfs branch? This is the fourth of five batches. The primary purpose of this batch is to add an abstraction for a position in a bvecq chain and make use of it.
With that in mind, this patchset does the following:
(1) Add a struct, bvecq_pos, to refer to a position in a bvecq chain. This is a tuple of ( bvecq pointer, slot and offset } and the position struct holds (for now) a ref on the bvecq pointed to.
(2) Change unbuffered/DIO to extract the supplied user buffers into a bvecq chain rather than a bio_vec[] up front. This means that netfslib then uses bvecq chains for everything.
(3) Add a folio count to the readahead_control struct and then makes readahead pre-create its buffer using that count to determine how many slots are required.
(4) Change netfslib to use the bvecq_pos struct to keep track of the whole request buffer and various points in it where loading, dispatch and collection are taking place and to also keep track of the slice given to each subrequest.
This was split from v11 of a larger netfslib series[1].
The patches can also be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-next-4
Thanks,
David
Changes
=======
ver #17)
- Fixed issues brought up by sashiko[5]:
- In bvecq_slice(), return 0 immediately if max_size or max_slots are 0.
- Make sure that sreq_max_{len,segs} are initialised before calling prepare_read.
- Fixed an issue brought up by the kernel test robot[6]:
- In netfs_read_gaps(), use umax() rather than max() when comparing a signed and an unsigned int.
ver #16)
- Fixed issues brought up by sashiko[4]:
- In bvecq_pos_nudge(), recheck the old bvecq, not the new one.
- In bvecq_slice(), recheck the old bvecq.
- In bvecq_pos_step(), don't assume the new bvecq has slots, but rather check it.
ver #15)
- In netfs_extract_iter(), set BVECQ_MEM_EXTERNAL rather than BVECQ_MEM_PAGECACHE for unpinned memory.
- In netfs_clear_unread_dio(), don't need to update subreq->transferred as the caller overwrites it after.
- Fixed issues brought up by sashiko[3]:
- In netfs_extract_iter(), remove redundant max_len check.
- In bvecq_pos_nudge(), make sure the recheck is checking the old bvecq, not the new.
- In netfs_unlock_abandoned_read_pages(), start from collect_cursor.slot, not from slot zero.
- In netfs_pgpriv2_copy_to_cache(), cancel the caching also if we fail to allocate a bvecq.
- In netfs_retry_write_stream(), use the same superfluity detection as the read side.
- In netfs_write_subrequest_terminated(), only set the RETRY flag on short uploads, not short cache writes.
ver #14)
- Fixed issues brought up by sashiko[2]:
- In netfs_extract_iter(), limit the number of slots per bvecq to what will fit inside a 4KiB allocation.
- In netfs_rreq_assess_dio(), only set the page dirty if it's from GUP or it's from the pagecache.
- In bvecq_zero(), skip the call to bvec_zero() if part == 0.
- In bvecq_delete_spent(), prefer returning true because more slots got added to returning false because we hit the chain end.
- In netfs_read_gaps(), fix a leak of already allocated sink folios if we get OOM when allocating a sink folios.
- In netfs_clear_unread_dio(), fix double call to iov_iter_zero().
ver #13)
- Rebased on -rc6 to account for some conflicting fixes.
- Fixed a bug in netfs_prepare_read_iterator() where comparison was being made against the wrong thing when limiting a subreq's size.
ver #12)
- Split from v11 of "netfs: Keep track of folios in a segmented bio_vec[] chain"[1]
[1] https://lore.kernel.org/r/[email protected]/
[2] https://sashiko.dev/#/patchset/20261006205947.608356-1-dhowells%40redhat.com
[3] https://sashiko.dev/#/patchset/20261007142001.851620-1-dhowells%40redhat.com
[4] https://sashiko.dev/#/patchset/20261008074346.936909-1-dhowells%40redhat.com
[5] https://sashiko.dev/#/patchset/20261008084722.963948-1-dhowells%40redhat.com
[6] https://lore.kernel.org/oe-kbuild-all/[email protected]/
David Howells (8):
mm: Make readahead store folio count in readahead_control
netfs: Add a function to extract from an iter into a bvecq
netfs: Make unbuffered/DIO read and write use bvecq
netfs: Add some tools for managing a position in a bvecq chain
netfs: Provide a func to load the readahead buffers into a bvecq chain
netfs: Use bvecq_pos to hold the buffer positions
netfs: Remove the rolling_buffer implementation
netfs: Remove netfs_extract_user_iter()
fs/afs/dir.c | 5 +- fs/afs/symlink.c | 6 +- fs/cachefiles/io.c | 12 - fs/netfs/Makefile | 1 - fs/netfs/buffered_read.c | 182 ++++++++------- fs/netfs/bvecq.c | 327 +++++++++++++++++++++++++++ fs/netfs/direct_read.c | 81 +++---- fs/netfs/direct_write.c | 67 +++--- fs/netfs/internal.h | 4 +- fs/netfs/iterator.c | 398 ++++++++++----------------------- fs/netfs/misc.c | 18 -- fs/netfs/objects.c | 16 +- fs/netfs/read_collect.c | 106 +++++---- fs/netfs/read_pgpriv2.c | 88 +++++--- fs/netfs/read_retry.c | 87 ++++--- fs/netfs/read_single.c | 19 +- fs/netfs/rolling_buffer.c | 182 --------------- fs/netfs/write_collect.c | 73 +++--- fs/netfs/write_issue.c | 166 +++++++++----- fs/netfs/write_retry.c | 73 +++--- include/linux/bvecq.h | 185 +++++++++++++++ include/linux/netfs.h | 25 ++- include/linux/pagemap.h | 10 + include/linux/rolling_buffer.h | 47 ---- include/trace/events/netfs.h | 32 ++- mm/readahead.c | 5 + 26 files changed, 1264 insertions(+), 951 deletions(-) delete mode 100644 fs/netfs/rolling_buffer.c delete mode 100644 include/linux/rolling_buffer.h