Re: [RFC PATCH] VFIO: Add a parameter to force nonthread IRQ

From: Paolo Bonzini
Date: Wed Oct 28 2015 - 14:29:12 EST




On 28/10/2015 18:50, Yunhong Jiang wrote:
> > No, I don't think you can use raw_spinlock there. The problem is not
> > just eventfd_signal, it is especially wake_up_locked_poll. You cannot
> > convert the whole workqueue infrastructure to use raw_spinlock.
>
> You mean the waitqueue, instead of workqueue, right?

Yes.

> One choice is to change
> the eventfd to use simple wait queue, which is raw_spinlock. But use simple
> waitqueue on eventfd may in fact impact real time latency if not in this
> scenario.

Userspace can put an arbitrary amount of tasks on the work queue, so
it's not possible to use a simple wait queue. It would also touch
multiple subsystems, so it's much better to bypass the eventfd completely.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/