From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNLvj-0001rK-M2 for qemu-devel@nongnu.org; Wed, 03 Apr 2013 07:32:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNLvh-0008A0-OR for qemu-devel@nongnu.org; Wed, 03 Apr 2013 07:32:39 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:43257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNLvh-000896-Go for qemu-devel@nongnu.org; Wed, 03 Apr 2013 07:32:37 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Apr 2013 12:28:07 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 19D161B08066 for ; Wed, 3 Apr 2013 12:32:32 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r33BWMtx52494590 for ; Wed, 3 Apr 2013 11:32:22 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r33BWUfo002260 for ; Wed, 3 Apr 2013 05:32:31 -0600 Date: Wed, 3 Apr 2013 13:32:26 +0200 From: Cornelia Huck Message-ID: <20130403133226.6d92c671@gondolin> In-Reply-To: <515B7A95.6020800@oracle.com> References: <1362043352-56889-1-git-send-email-cornelia.huck@de.ibm.com> <1362043352-56889-4-git-send-email-cornelia.huck@de.ibm.com> <515B7A95.6020800@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 3/6] KVM: Initialize irqfd from kvm_init(). List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sasha Levin Cc: Carsten Otte , KVM , Gleb Natapov , "Michael S. Tsirkin" , linux-s390 , Marcelo Tosatti , Heiko Carstens , Alexander Graf , qemu-devel , Christian Borntraeger , Martin Schwidefsky , Tejun Heo On Tue, 02 Apr 2013 20:40:53 -0400 Sasha Levin wrote: > On 02/28/2013 04:22 AM, Cornelia Huck wrote: > > Currently, eventfd introduces module_init/module_exit functions > > to initialize/cleanup the irqfd workqueue. This only works, however, > > if no other module_init/module_exit functions are built into the > > same module. > > > > Let's just move the initialization and cleanup to kvm_init and kvm_exit. > > This way, it is also clearer where kvm startup may fail. > > > > Signed-off-by: Cornelia Huck > > I'm seeing this during boot: > > [ 6.763302] ------------[ cut here ]------------ > [ 6.763763] WARNING: at kernel/workqueue.c:4204 destroy_workqueue+0x1df/0x3d0() > [ 6.764507] Modules linked in: > [ 6.764792] Pid: 1, comm: swapper/0 Tainted: G W 3.9.0-rc5-next-20130402-sasha-00015-g3522ec5 #324 > [ 6.765654] Call Trace: > [ 6.765875] [] warn_slowpath_common+0x8b/0xc0 > [ 6.766436] [] warn_slowpath_null+0x15/0x20 > [ 6.766947] [] destroy_workqueue+0x1df/0x3d0 > [ 6.768631] [] kvm_irqfd_exit+0x10/0x20 > [ 6.770000] [] kvm_init+0x2ab/0x310 > [ 6.770607] [] ? cpu_has_kvm_support+0x4d/0x4d > [ 6.771241] [] vmx_init+0x1f4/0x437 > [ 6.771709] [] ? cpu_has_kvm_support+0x4d/0x4d > [ 6.772266] [] do_one_initcall+0xb2/0x1b0 > [ 6.772995] [] kernel_init_freeable+0x15d/0x1ef > [ 6.773857] [] ? loglevel+0x31/0x31 > [ 6.774609] [] ? rest_init+0x140/0x140 > [ 6.775551] [] kernel_init+0x9/0xf0 > [ 6.776162] [] ret_from_fork+0x7c/0xb0 > [ 6.776662] [] ? rest_init+0x140/0x140 > [ 6.777241] ---[ end trace 10bba684ced4346a ]--- > > And I think it has something to do with this patch. What this patch does is move initialization of the workqueue - the code called should be indentical. The workqueue created/destroyed should not have been touched (no irqfds yet), but the new workqueue code seems to encounter something unexpected. I'd expect destroy_workqueue() to be callable after a successful create_singlethread_workqueue(). Tejun? > > > Thanks, > Sasha >