Netdev List
 help / color / mirror / Atom feed
* [PATCH v3 0/3] hv: vmbus: make rings and host-visible buffers survive buddy fragmentation
@ 2026-11-24 21:40 Emerson Busson
  2026-11-24 21:40 ` [PATCH v3 1/3] hv: vmbus: encapsulate buffer and GPADL state in struct vmbus_buffer Emerson Busson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Emerson Busson @ 2026-11-24 21:40 UTC (permalink / raw)
  To: Wei Liu, Haiyang Zhang, Dexuan Cui, Greg Kroah-Hartman
  Cc: Michael Kelley, Easwar Hariharan, Kameron Carr, Andrew Lunn,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	linux-hyperv, netdev, linux-kernel

Opening new VMBus channels or subchannels can fail with -ENOMEM under
memory fragmentation even when plenty of order-0 pages are free, because
vmbus_alloc_ring() asks for a single high-order contiguous block (order-7
for a 512 KiB ring) and vmbus_alloc_requestor() uses contiguous
allocations for its request array and bitmap.

Based on Michael Kelley's review of v1 and the v2 feedback from Wei Liu
and Michael Kelley, v3 goes back to the core VMBus allocation path. It
groups buffer and GPADL state into struct vmbus_buffer, allocates ring
buffers through vmbus_alloc_buffer(), drops struct vmbus_gpadl along
with the duplicate decrypt/re-encrypt paths, and switches requestor
metadata to kvcalloc().

Changes since v2:
- Dropped the reclaim workqueue, UIO page-pinning layer, and KUnit tests
  to keep this series focused on VMBus buffer and ring allocation.
- Split the hv_netvsc fixes and allocations out for separate net /
  net-next submissions.
- Preserved hv_netvsc's revoke-failure leak guard before GPADL teardown.
- Rebased onto hyperv-next.

v1: https://lore.kernel.org/linux-hyperv/20260918014017.2536753-1-emersonbusson@gmail.com/
v2: https://lore.kernel.org/linux-hyperv/20261007190752.336426-1-emersonbusson@gmail.com/

Tested with x86_64 (W=1 C=2) and i386 builds, a local QEMU/KVM boot with
lockdep enabled, and a backport onto 6.18.64.1 running live on Hyper-V
x86_64 (85 VMBus channels, 12 netvsc queues, uio_hv_generic loaded).
Confidential VM paths (SEV-SNP, TDX, Arm64 CCA) were compile-tested and
reviewed by inspection only.

Emerson Busson (3):
  hv: vmbus: encapsulate buffer and GPADL state in struct vmbus_buffer
  hv: vmbus: allocate ring buffers via vmbus_alloc_buffer()
  hv: vmbus: allocate requestor metadata with kvcalloc()

 drivers/hv/channel.c            | 363 +++++++++++++++-----------------
 drivers/hv/hyperv_vmbus.h       |   4 +-
 drivers/hv/ring_buffer.c        |  17 +-
 drivers/net/hyperv/hyperv_net.h |  10 +-
 drivers/net/hyperv/netvsc.c     |  64 +++---
 drivers/uio/uio_hv_generic.c    |  97 ++++-----
 include/linux/hyperv.h          |  43 ++--
 7 files changed, 271 insertions(+), 327 deletions(-)


base-commit: eab80895d447ec164a1d91a1ab377bd3a9dc9044
-- 
2.43.0


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

end of thread, other threads:[~2026-11-24 21:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 21:40 [PATCH v3 0/3] hv: vmbus: make rings and host-visible buffers survive buddy fragmentation Emerson Busson
2026-11-24 21:40 ` [PATCH v3 1/3] hv: vmbus: encapsulate buffer and GPADL state in struct vmbus_buffer Emerson Busson
2026-11-24 21:40 ` [PATCH v3 2/3] hv: vmbus: allocate ring buffers via vmbus_alloc_buffer() Emerson Busson
2026-11-24 21:40 ` [PATCH v3 3/3] hv: vmbus: allocate requestor metadata with kvcalloc() Emerson Busson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox