From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754062AbbJ1S3I (ORCPT ); Wed, 28 Oct 2015 14:29:08 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34919 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750731AbbJ1S3F (ORCPT ); Wed, 28 Oct 2015 14:29:05 -0400 Subject: Re: [RFC PATCH] VFIO: Add a parameter to force nonthread IRQ To: Yunhong Jiang 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> Cc: Alex Williamson , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt From: Paolo Bonzini Message-ID: <563113E9.2040608@redhat.com> Date: Wed, 28 Oct 2015 19:28:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151028175013.GA21961@jnakajim-build> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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