RFC vhost: ring format independence
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 RFC Latest11 patches 4 repliesIn review
- v47 patches 1 replySuperseded
- v38 patches 6 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 8 patches | 4 replies | Superseded | |
| v1 | 6 patches | 8 replies | Superseded |
Changes in v9 from the cover letter
- fixes fetch_descs returning "no descriptors available" when only few descriptors were available, stalling the communications.
- minor syntax errors in intermediate commits.
- skipping checking for sane max_descs if vhost device is not going to use worker like vDPA devices.
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | vhost: option to fetch descriptors through an independent structdrivers/ drivers/ | +320 | 0 replies | |
| 2/11 | vhost: use batched get_vq_desc versiondrivers/ drivers/ drivers/ | +61 | 2 replies | |
| 3/11 | vhost/net: pass net specific struct pointerdrivers/ | +7 | 0 replies | |
| 4/11 | vhost: reorder functionsdrivers/ | +13 | 0 replies | |
| 5/11 | vhost: format-independent API for used buffersdrivers/ drivers/ | +79 | 0 replies | |
| 6/11 | vhost/net: convert to new API: heads->bufsdrivers/ | +82 | 0 replies | |
| 7/11 | vhost/net: avoid iov length mathdrivers/ | +3 | 0 replies | |
| 8/11 | vhost/test: convert to the buf APIdrivers/ | +11 | 0 replies | |
| 9/11 | vhost/scsi: switch to buf APIsdrivers/ | +44 | 1 reply | |
| 10/11 | vhost/vsock: switch to the buf APIdrivers/ | +18 | 1 reply | |
| 11/11 | vhost: drop head based APIsdrivers/ drivers/ | +4 | 0 replies |
Reviews trailers per patch
2 of 11 patches have a Reviewed-by or Acked-by.
| Patch | Stefan Hajnoczi |
|---|---|
| 1/11 | |
| 2/11 | |
| 3/11 | |
| 4/11 | |
| 5/11 | |
| 6/11 | |
| 7/11 | |
| 8/11 | |
| 9/11 | R-b |
| 10/11 | R-b |
| 11/11 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC v9 00/11] vhost: ring format independence
This adds infrastructure required for supporting
multiple ring formats.
The idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later.
Used ring is similar: we fetch into an independent struct first, convert that to IOV later.
The point is that we have a tight loop that fetches descriptors, which is good for cache utilization. This will also allow all kind of batching tricks - e.g. it seems possible to keep SMAP disabled while we are fetching multiple descriptors.
For used descriptors, this allows keeping track of the buffer length without need to rescan IOV.
This seems to perform better on UDP stream tests, but a little bit worse on RR tests and TCP streams, based on a microbenchmark.
More testing would be very much appreciated.
changes from v8:
- fixes fetch_descs returning "no descriptors available" when only few descriptors were available, stalling the communications.
- minor syntax errors in intermediate commits.
- skipping checking for sane max_descs if vhost device is not going to use worker like vDPA devices.
changes from v7:
- squashed in fixes. no longer hangs but still known to cause data corruption for some people. under debug.
changes from v6:
- fixes some bugs introduced in v6 and v5
changes from v5:
- addressed comments by Jason: squashed API changes, fixed up discard
changes from v4:
- added used descriptor format independence
- addressed comments by jason
- fixed a crash detected by the lkp robot.
changes from v3:
- fixed error handling in case of indirect descriptors
- add BUG_ON to detect buffer overflow in case of bugs in response to comment by Jason Wang
- minor code tweaks
Changes from v2:
- fixed indirect descriptor batching
reported by Jason Wang
Changes from v1:
- typo fixes
Michael S. Tsirkin (11):
vhost: option to fetch descriptors through an independent struct
vhost: use batched get_vq_desc version
vhost/net: pass net specific struct pointer
vhost: reorder functions
vhost: format-independent API for used buffers vhost/net: convert to new API: heads->bufs
vhost/net: avoid iov length math
vhost/test: convert to the buf API
vhost/scsi: switch to buf APIs
vhost/vsock: switch to the buf API
vhost: drop head based APIs
drivers/vhost/net.c | 174 ++++++++++---------- drivers/vhost/scsi.c | 73 +++++---- drivers/vhost/test.c | 22 +-- drivers/vhost/vhost.c | 372 +++++++++++++++++++++++++++--------------- drivers/vhost/vhost.h | 44 +++-- drivers/vhost/vsock.c | 30 ++-- 6 files changed, 435 insertions(+), 280 deletions(-)
Signature · 1 line
2.18.1