• Mike Christie's avatar
    vhost: Allow worker switching while work is queueing · 228a27cf
    Mike Christie authored
    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.
    Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
    Message-Id: <20230626232307.97930-18-michael.christie@oracle.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    228a27cf
vhost.c 69.6 KB