From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [RFC PATCH] VFIO: Add a parameter to force nonthread IRQ Date: Wed, 28 Oct 2015 19:28:57 +0100 Message-ID: <563113E9.2040608@redhat.com> References: <1445908801-14732-1-git-send-email-yunhong.jiang@linux.intel.com> <1445917034.8018.220.camel@redhat.com> <20151027063501.GA22054@jnakajim-build> <562F43F8.1040101@redhat.com> <20151027212648.GA22916@jnakajim-build> <56301A87.9030907@redhat.com> <20151028175013.GA21961@jnakajim-build> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Alex Williamson , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt To: Yunhong Jiang Return-path: In-Reply-To: <20151028175013.GA21961@jnakajim-build> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 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