Re: [RFC v3 4/5] KVM: add ioregionfd context

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

 



On Tue, 2021-03-09 at 09:01 +0100, Paolo Bonzini wrote:
> On 09/03/21 08:54, Jason Wang wrote:
> > > +        return;
> > > +
> > > +    spin_lock(&ctx->wq.lock);
> > > +    wait_event_interruptible_exclusive_locked(ctx->wq, !ctx-
> > > >busy);
> > 
> > Any reason that a simple mutex_lock_interruptible() can't work
> > here?
> 
> Or alternatively why can't the callers just take the spinlock.
> 
I'm not sure I understand your question. Do you mean why locked version
of wait_event() is used?

> Paolo
> 
> > Thanks
> > 
> > 
> > > +    ctx->busy = true;
> > > +    spin_unlock(&ctx->wq.lock); 




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux