All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] vhost: set dirty log bits without pinning pages on x86
@ 2026-11-17  8:33 zhaoguohan
  2026-11-17  8:33 ` [PATCH v2 1/2] " zhaoguohan
  2026-11-17  8:33 ` [PATCH v2 2/2] tools/virtio: add a vhost dirty log test zhaoguohan
  0 siblings, 2 replies; 5+ messages in thread
From: zhaoguohan @ 2026-11-17  8:33 UTC (permalink / raw)
  To: mst, jasowang
  Cc: eperezma, xuanzhuo, tglx, mingo, bp, dave.hansen, x86, hpa, kvm,
	virtualization, netdev, linux-kernel, Khan Zhao

From: Khan Zhao <zhaoguohan@kylinos.cn>

This replaces my v1 with Michael's set_bit_user() from the RFC thread,
plus the userspace test from v1 extended with a cross-page case.

Patch 2 adds tools/virtio/vhost_log_test

Median of five runs of "vhost_log_test --bench", which pushes batches
of 128 descriptors through vhost_test and reports the time per
descriptor (lower is better). "logging enabled" sets
VHOST_VRING_F_LOG, so each descriptor logs two used ring writes (the
used element and used->idx); data buffer logging (VHOST_F_LOG_ALL) is
not exercised. baseline is the same tree without this series.

                      baseline      v2    change
  logging disabled      155.04  158.78     +2.4%
  logging enabled       287.58  189.20    -34.2%

Changes since v1:
 - Patch 1 is now Michael's set_bit_user() with scoped user access,
   replacing my cmpxchg loop and its GUP fallback. I added __label__
   for the efault label so it stays local to the macro.
 - Patch 2: add the cross-page case, use VHOST_PAGE_SIZE from the
   UAPI, and print the bitmap when the cross-page check fails.

v1:  https://lore.kernel.org/all/20261112085631.128819-1-zhaoguohan@kylinos.cn/
RFC: https://lore.kernel.org/all/af7f05bf637337d35fdd10f3e0dbb5e39d7780e7.1794480795.git.mst@redhat.com/

Khan Zhao (1):
  tools/virtio: add a vhost dirty log test

Michael S. Tsirkin (1):
  vhost: set dirty log bits without pinning pages on x86

 arch/x86/include/asm/uaccess.h  |  23 ++
 drivers/vhost/vhost.c           |   7 +
 tools/virtio/.gitignore         |   1 +
 tools/virtio/Makefile           |   7 +-
 tools/virtio/vhost_log_test.c   | 432 ++++++++++++++++++++++++++++++++
 tools/virtio/vhost_log_test.rst |  61 +++++
 6 files changed, 529 insertions(+), 2 deletions(-)
 create mode 100644 tools/virtio/vhost_log_test.c
 create mode 100644 tools/virtio/vhost_log_test.rst


base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
-- 
2.43.0


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

end of thread, other threads:[~2026-11-17  8:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17  8:33 [PATCH v2 0/2] vhost: set dirty log bits without pinning pages on x86 zhaoguohan
2026-11-17  8:33 ` [PATCH v2 1/2] " zhaoguohan
2026-11-17  8:44   ` sashiko-bot
2026-11-17  8:33 ` [PATCH v2 2/2] tools/virtio: add a vhost dirty log test zhaoguohan
2026-11-17  8:44   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.