KVM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH RFC v2 0/2] vhost: ring format independence
@ 2019-10-12 19:18 Michael S. Tsirkin
  2019-10-12 19:18 ` [PATCH RFC v2 1/2] vhost: option to fetch descriptors through an independent struct Michael S. Tsirkin
  2019-10-12 19:18 ` [PATCH RFC v2 2/2] vhost: batching fetches Michael S. Tsirkin
  0 siblings, 2 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2019-10-12 19:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: kvm, virtualization, netdev, Jason Wang

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.

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.

This seems to perform exactly the same as the original
code already based on a microbenchmark.
More testing would be very much appreciated.

Biggest TODO before this first step is ready to go in is to
batch indirect descriptors as well.

Integrating into vhost-net is basically
s/vhost_get_vq_desc/vhost_get_vq_desc_batch/ -
or add a module parameter like I did in the test module.


Changes from v1:
	- typo fixes

Michael S. Tsirkin (2):
  vhost: option to fetch descriptors through an independent struct
  vhost: batching fetches

 drivers/vhost/test.c  |  19 ++-
 drivers/vhost/vhost.c | 333 +++++++++++++++++++++++++++++++++++++++++-
 drivers/vhost/vhost.h |  20 ++-
 3 files changed, 365 insertions(+), 7 deletions(-)

-- 
MST


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-12 19:18 [PATCH RFC v2 0/2] vhost: ring format independence Michael S. Tsirkin
2019-10-12 19:18 ` [PATCH RFC v2 1/2] vhost: option to fetch descriptors through an independent struct Michael S. Tsirkin
2019-10-12 19:18 ` [PATCH RFC v2 2/2] vhost: batching fetches Michael S. Tsirkin

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org
	public-inbox-index kvm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.kvm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git