DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 0/1] Memory hotplug fix
@ 2025-05-29 12:31 Danylo Vodopianov
  2025-05-29 12:31 ` [PATCH v1 1/1] vhost: handle virtqueue locking for memory hotplug Danylo Vodopianov
  0 siblings, 1 reply; 3+ messages in thread
From: Danylo Vodopianov @ 2025-05-29 12:31 UTC (permalink / raw)
  To: thomas, aman.deep.singh, yuying.zhang, orika, mcoqueli, ckm,
	matan, david.marchand, mko-plv, sil-plv
  Cc: stephen, dev

Hi everyone.
We detected an issue with the memory hotplug feature and virtio devices while working with vitrio
in DPDK.In general, the issue is around the user request VHOST_USER_SET_MEM_TABLE and
locking queues for this request
(https://git.dpdk.org/dpdk-stable/tree/lib/vhost/vhost_user.c#n1512)
When the vhost_user receives the request VHOST_USER_SET_MEM_TABLE, it locks queues only
when the flag lock_all_qps is true(it is always true), AND the flag
VIRTIO_DEV_VDPA_CONFIGURED is not set.
https://git.dpdk.org/dpdk-stable/tree/lib/vhost/vhost_user.c#n3181
In the case of a memory hot plug, the flag VIRTIO_DEV_VDPA_CONFIGURED is always set,
and due to this, the queues are never locked while they are expected to be locked.
https://git.dpdk.org/dpdk-stable/tree/lib/vhost/vhost_user.c#n1512.
The quick solution is to add the check for request type and do lock queues always
if we have request VHOST_USER_SET_MEM_TABLE. Something like this, in general
https://git.dpdk.org/dpdk-stable/tree/lib/vhost/vhost_user.c#n3179

 if (!(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED) ||
 request == VHOST_USER_SET_MEM_TABLE) {
 ...

Danylo Vodopianov (1):
  vhost: handle virtqueue locking for memory hotplug

 lib/vhost/vhost_user.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
2.43.5


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH v1 0/1] Memory hotplug fix
@ 2025-05-29 12:32 Danylo Vodopianov
  2025-05-29 12:32 ` [PATCH v1 1/1] vhost: handle virtqueue locking for memory hotplug Danylo Vodopianov
  0 siblings, 1 reply; 3+ messages in thread
From: Danylo Vodopianov @ 2025-05-29 12:32 UTC (permalink / raw)
  To: thomas, aman.deep.singh, yuying.zhang, orika, mcoqueli, ckm,
	matan, david.marchand, mko-plv, sil-plv
  Cc: stephen, dev

Hi everyone.
We detected an issue with the memory hotplug feature and virtio devices while working with vitrio
in DPDK.In general, the issue is around the user request VHOST_USER_SET_MEM_TABLE and
locking queues for this request
(https://git.dpdk.org/dpdk-stable/tree/lib/vhost/vhost_user.c#n1512)
When the vhost_user receives the request VHOST_USER_SET_MEM_TABLE, it locks queues only
when the flag lock_all_qps is true(it is always true), AND the flag
VIRTIO_DEV_VDPA_CONFIGURED is not set.
https://git.dpdk.org/dpdk-stable/tree/lib/vhost/vhost_user.c#n3181
In the case of a memory hot plug, the flag VIRTIO_DEV_VDPA_CONFIGURED is always set,
and due to this, the queues are never locked while they are expected to be locked.
https://git.dpdk.org/dpdk-stable/tree/lib/vhost/vhost_user.c#n1512.
The quick solution is to add the check for request type and do lock queues always
if we have request VHOST_USER_SET_MEM_TABLE. Something like this, in general
https://git.dpdk.org/dpdk-stable/tree/lib/vhost/vhost_user.c#n3179

 if (!(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED) ||
 request == VHOST_USER_SET_MEM_TABLE) {
 ...

Danylo Vodopianov (1):
  vhost: handle virtqueue locking for memory hotplug

 lib/vhost/vhost_user.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
2.43.5


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

end of thread, other threads:[~2025-05-29 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-29 12:31 [PATCH v1 0/1] Memory hotplug fix Danylo Vodopianov
2025-05-29 12:31 ` [PATCH v1 1/1] vhost: handle virtqueue locking for memory hotplug Danylo Vodopianov
2025-05-29 12:32 [PATCH v1 0/1] Memory hotplug fix Danylo Vodopianov
2025-05-29 12:32 ` [PATCH v1 1/1] vhost: handle virtqueue locking for memory hotplug Danylo Vodopianov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).