RFC vhost: format independence
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest13 patches 21 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | vhost: option to fetch descriptors through an independent structdrivers/ drivers/ | +312 | 4 replies | |
| 2/13 | vhost: use batched version by defaultdrivers/ drivers/ | +2 | 1 reply | |
| 3/13 | vhost: batching fetchesdrivers/ drivers/ drivers/ | +47 | 6 replies | |
| 4/13 | vhost: cleanup fetch_buf return code handlingdrivers/ | +16 | 2 replies | |
| 5/13 | vhost/net: pass net specific struct pointerdrivers/ | +7 | 0 replies | |
| 6/13 | vhost: reorder functionsdrivers/ | +20 | 0 replies | |
| 7/13 | vhost: format-independent API for used buffersdrivers/ drivers/ | +58 | 4 replies | |
| 8/13 | vhost/net: convert to new API: heads->bufsdrivers/ | +81 | 2 replies | |
| 9/13 | vhost/net: avoid iov length mathdrivers/ | +3 | 0 replies | |
| 10/13 | vhost/test: convert to the buf APIdrivers/ | +11 | 0 replies | |
| 11/13 | vhost/scsi: switch to buf APIsdrivers/ | +44 | 1 reply | |
| 12/13 | vhost/vsock: switch to the buf APIdrivers/ | +18 | 1 reply | |
| 13/13 | vhost: drop head based APIsdrivers/ drivers/ | +8 | 0 replies |
Reviews trailers per patch
2 of 13 patches have a Reviewed-by or Acked-by.
| Patch | Stefan Hajnoczi |
|---|---|
| 1/13 | |
| 2/13 | |
| 3/13 | |
| 4/13 | |
| 5/13 | |
| 6/13 | |
| 7/13 | |
| 8/13 | |
| 9/13 | |
| 10/13 | |
| 11/13 | R-b |
| 12/13 | R-b |
| 13/13 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH RFC 00/13] vhost: format independence
We let the specifics of the ring format seep through to vhost API callers - mostly because there was only one format so it was hard to imagine what an independent API would look like. Now that there's an alternative in form of the packed ring, it's easier to see the issues, and fixing them is perhaps the cleanest way to add support for more formats.
This patchset does this by indtroducing two new structures: vhost_buf to represent a buffer and vhost_desc to represent a descriptor. Descriptors aren't normally of interest to devices but do occationally get exposed e.g. for logging.
Perhaps surprisingly, the higher level API actually makes things a bit easier for callers, as well as allows more freedom for the vhost core. The end result is basically unchanged performance (based on preliminary testing) even though we are forced to go through a format conversion.
The conversion also exposed (more) bugs in vhost scsi - which isn't really surprising, that driver needs a lot more love than it's getting.
Very lightly tested. Would appreciate feedback and testing.
Michael S. Tsirkin (13):
vhost: option to fetch descriptors through an independent struct
vhost: use batched version by default
vhost: batching fetches
vhost: cleanup fetch_buf return code handling 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 | 173 +++++++++---------- drivers/vhost/scsi.c | 73 ++++---- drivers/vhost/test.c | 22 +-- drivers/vhost/vhost.c | 375 +++++++++++++++++++++++++++--------------- drivers/vhost/vhost.h | 46 ++++-- drivers/vhost/vsock.c | 30 ++-- 6 files changed, 436 insertions(+), 283 deletions(-)
Signature · 1 line
MST