Linux-parisc archive on lore.kernel.org
 help / color / Atom feed
* [PATCH net-next 0/6] vhost: accelerate metadata access
@ 2019-05-24  8:12 Jason Wang
  2019-05-24  8:12 ` [PATCH net-next 1/6] vhost: generalize adding used elem Jason Wang
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Jason Wang @ 2019-05-24  8:12 UTC (permalink / raw)
  To: mst, jasowang, kvm, virtualization, netdev
  Cc: linux-kernel, peterx, James.Bottomley, hch, davem, jglisse,
	linux-mm, linux-arm-kernel, linux-parisc, christophe.de.dinechin,
	jrdr.linux

Hi:

This series tries to access virtqueue metadata through kernel virtual
address instead of copy_user() friends since they had too much
overheads like checks, spec barriers or even hardware feature
toggling like SMAP. This is done through setup kernel address through
direct mapping and co-opreate VM management with MMU notifiers.

Test shows about 23% improvement on TX PPS. TCP_STREAM doesn't see
obvious improvement.

Thanks

Changes from RFC V3:
- rebase to net-next
- Tweak on the comments
Changes from RFC V2:
- switch to use direct mapping instead of vmap()
- switch to use spinlock + RCU to synchronize MMU notifier and vhost
  data/control path
- set dirty pages in the invalidation callbacks
- always use copy_to/from_users() friends for the archs that may need
  flush_dcache_pages()
- various minor fixes
Changes from V4:
- use invalidate_range() instead of invalidate_range_start()
- track dirty pages
Changes from V3:
- don't try to use vmap for file backed pages
- rebase to master
Changes from V2:
- fix buggy range overlapping check
- tear down MMU notifier during vhost ioctl to make sure
  invalidation request can read metadata userspace address and vq size
  without holding vq mutex.
Changes from V1:
- instead of pinning pages, use MMU notifier to invalidate vmaps
  and remap duing metadata prefetch
- fix build warning on MIPS

Jason Wang (6):
  vhost: generalize adding used elem
  vhost: fine grain userspace memory accessors
  vhost: rename vq_iotlb_prefetch() to vq_meta_prefetch()
  vhost: introduce helpers to get the size of metadata area
  vhost: factor out setting vring addr and num
  vhost: access vq metadata through kernel virtual address

 drivers/vhost/net.c   |   4 +-
 drivers/vhost/vhost.c | 850 ++++++++++++++++++++++++++++++++++++------
 drivers/vhost/vhost.h |  38 +-
 3 files changed, 766 insertions(+), 126 deletions(-)

-- 
2.18.1


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

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24  8:12 [PATCH net-next 0/6] vhost: accelerate metadata access Jason Wang
2019-05-24  8:12 ` [PATCH net-next 1/6] vhost: generalize adding used elem Jason Wang
2019-05-24  8:12 ` [PATCH net-next 2/6] vhost: fine grain userspace memory accessors Jason Wang
2019-05-24  8:12 ` [PATCH net-next 3/6] vhost: rename vq_iotlb_prefetch() to vq_meta_prefetch() Jason Wang
2019-05-24  8:12 ` [PATCH net-next 4/6] vhost: introduce helpers to get the size of metadata area Jason Wang
2019-05-24  8:12 ` [PATCH net-next 5/6] vhost: factor out setting vring addr and num Jason Wang
2019-05-24  8:12 ` [PATCH net-next 6/6] vhost: access vq metadata through kernel virtual address Jason Wang
2019-05-30 18:07 ` [PATCH net-next 0/6] vhost: accelerate metadata access David Miller
2019-05-30 18:13   ` Michael S. Tsirkin
2019-05-30 18:55     ` David Miller
2019-06-05 20:27 ` Michael S. Tsirkin
2019-06-10  3:50   ` Jason Wang

Linux-parisc archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-parisc/0 linux-parisc/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 linux-parisc linux-parisc/ https://lore.kernel.org/linux-parisc \
		linux-parisc@vger.kernel.org linux-parisc@archiver.kernel.org
	public-inbox-index linux-parisc


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-parisc


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