Open techiepriyansh opened 1 year ago
Thank you for the analysis! If you have time and interest to start this work, go ahead, otherwise we'll do it later because it would be a great cleanup.
Yes, I'll get to it in a few days.
Hey i see this hasn't been picked up in quite some time. If no one is picking this up shall i do it?
@ramyak-mehra great! yes please, go head.
IIUC @techiepriyansh is busy, but feel free to ping us if the situation is changed.
Currently, the
VhostUserVsockBackend
handles both TX and RX in a single thread. It would be nice to have two separate threads handling TX and RX.Implementing this would involve the following:
VhostUserVsockBackend
with the appropriatequeue_mask
s:1
for the RX thread and2
for the TX thread.BACKEND_EVENT
s by callingset_vring_worker
during initialization instart_backend_server
.VhostUserVsockBackend::handle_event
depending on thethread_id
.backend_rxq
contained inVsockThreadBackend
to be accessible by both the threads (maybe over anRwLock
).