Re: [PATCH v8 17/17] vhost: Allow worker switching while work is queueing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/12/23 8:32 PM, Mike Christie wrote:
> This patch drops the requirement that we can only switch workers if work
> has not been queued by using RCU for the vq based queueing paths and a
> mutex for the device wide flush.
> 
> We can also use this to support SIGKILL properly in the future where we
> should exit almost immediately after getting that signal. With this
> patch, when get_signal returns true, we can set the vq->worker to NULL
> and do a synchronize_rcu to prevent new work from being queued to the
> vhost_task that has been killed.
> 

Hey Jason and Stefano, just an update on why we now have this extra
patch.

Jason, in one of the last reviews you were asking about supporting
switching workers when works are queueing and I had said it's probably
not worth it, because it adds come complexity that might not be used.

Stefano, it sounded like you preferred RCU to handle when we are
adding the initial worker while vsock is possibly queueing works.

It turns out the signal/fork developers added some hacks to their code
for the vhost_task patches to support SIGKILL but I think they want us to
eventually remove them. To do that, we need a way to handle where the
vhost_worker/vhost_task exits while work is being queued. To do this we
need the same as the above (instead of a new worker it would be NULL
though).

So to handle all these requests, I ended up adding this last patch.
I wasn't sure if you wanted it to go in at the same time as the
initial multiple worker patches since it changes the behavior the
interface can support or separate when I fix up the SIGKILL code.

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux