All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	Gleb Natapov <gleb@redhat.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Carsten Otte <cotte@de.ibm.com>, Alexander Graf <agraf@suse.de>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	"Michael S. Tsirkin" <mst@redhat.com>, KVM <kvm@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>,
	qemu-devel <qemu-devel@nongnu.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH v4 3/6] KVM: Initialize irqfd from kvm_init().
Date: Wed, 3 Apr 2013 13:32:26 +0200	[thread overview]
Message-ID: <20130403133226.6d92c671@gondolin> (raw)
In-Reply-To: <515B7A95.6020800@oracle.com>

On Tue, 02 Apr 2013 20:40:53 -0400
Sasha Levin <sasha.levin@oracle.com> 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 <cornelia.huck@de.ibm.com>
> 
> 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]  [<ffffffff811074fb>] warn_slowpath_common+0x8b/0xc0
> [    6.766436]  [<ffffffff81107545>] warn_slowpath_null+0x15/0x20
> [    6.766947]  [<ffffffff8112ca7f>] destroy_workqueue+0x1df/0x3d0
> [    6.768631]  [<ffffffff8100d880>] kvm_irqfd_exit+0x10/0x20
> [    6.770000]  [<ffffffff81004dbb>] kvm_init+0x2ab/0x310
> [    6.770607]  [<ffffffff86183dc0>] ? cpu_has_kvm_support+0x4d/0x4d
> [    6.771241]  [<ffffffff86183fb4>] vmx_init+0x1f4/0x437
> [    6.771709]  [<ffffffff86183dc0>] ? cpu_has_kvm_support+0x4d/0x4d
> [    6.772266]  [<ffffffff810020f2>] do_one_initcall+0xb2/0x1b0
> [    6.772995]  [<ffffffff86180021>] kernel_init_freeable+0x15d/0x1ef
> [    6.773857]  [<ffffffff8617f801>] ? loglevel+0x31/0x31
> [    6.774609]  [<ffffffff83d51230>] ? rest_init+0x140/0x140
> [    6.775551]  [<ffffffff83d51239>] kernel_init+0x9/0xf0
> [    6.776162]  [<ffffffff83dbf37c>] ret_from_fork+0x7c/0xb0
> [    6.776662]  [<ffffffff83d51230>] ? 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
> 

WARNING: multiple messages have this Message-ID (diff)
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: Carsten Otte <cotte@de.ibm.com>, KVM <kvm@vger.kernel.org>,
	Gleb Natapov <gleb@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Alexander Graf <agraf@suse.de>,
	qemu-devel <qemu-devel@nongnu.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Tejun Heo <tj@kernel.org>
Subject: Re: [Qemu-devel] [PATCH v4 3/6] KVM: Initialize irqfd from kvm_init().
Date: Wed, 3 Apr 2013 13:32:26 +0200	[thread overview]
Message-ID: <20130403133226.6d92c671@gondolin> (raw)
In-Reply-To: <515B7A95.6020800@oracle.com>

On Tue, 02 Apr 2013 20:40:53 -0400
Sasha Levin <sasha.levin@oracle.com> 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 <cornelia.huck@de.ibm.com>
> 
> 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]  [<ffffffff811074fb>] warn_slowpath_common+0x8b/0xc0
> [    6.766436]  [<ffffffff81107545>] warn_slowpath_null+0x15/0x20
> [    6.766947]  [<ffffffff8112ca7f>] destroy_workqueue+0x1df/0x3d0
> [    6.768631]  [<ffffffff8100d880>] kvm_irqfd_exit+0x10/0x20
> [    6.770000]  [<ffffffff81004dbb>] kvm_init+0x2ab/0x310
> [    6.770607]  [<ffffffff86183dc0>] ? cpu_has_kvm_support+0x4d/0x4d
> [    6.771241]  [<ffffffff86183fb4>] vmx_init+0x1f4/0x437
> [    6.771709]  [<ffffffff86183dc0>] ? cpu_has_kvm_support+0x4d/0x4d
> [    6.772266]  [<ffffffff810020f2>] do_one_initcall+0xb2/0x1b0
> [    6.772995]  [<ffffffff86180021>] kernel_init_freeable+0x15d/0x1ef
> [    6.773857]  [<ffffffff8617f801>] ? loglevel+0x31/0x31
> [    6.774609]  [<ffffffff83d51230>] ? rest_init+0x140/0x140
> [    6.775551]  [<ffffffff83d51239>] kernel_init+0x9/0xf0
> [    6.776162]  [<ffffffff83dbf37c>] ret_from_fork+0x7c/0xb0
> [    6.776662]  [<ffffffff83d51230>] ? 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
> 

  reply	other threads:[~2013-04-03 11:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28  9:22 [PATCH v4 0/6] kvm: Make ioeventfd usable on s390 Cornelia Huck
2013-02-28  9:22 ` [PATCH v4 1/6] virtio_ccw: pass a cookie value to kvm hypercall Cornelia Huck
2013-02-28  9:22 ` [PATCH v4 2/6] KVM: s390: Export virtio-ccw api Cornelia Huck
2013-02-28  9:22 ` [PATCH v4 3/6] KVM: Initialize irqfd from kvm_init() Cornelia Huck
2013-04-03  0:40   ` Sasha Levin
2013-04-03  0:40     ` [Qemu-devel] " Sasha Levin
2013-04-03 11:32     ` Cornelia Huck [this message]
2013-04-03 11:32       ` Cornelia Huck
2013-02-28  9:22 ` [PATCH v4 4/6] KVM: Introduce KVM_VIRTIO_CCW_NOTIFY_BUS Cornelia Huck
2013-02-28  9:22 ` [PATCH v4 5/6] KVM: ioeventfd for virtio-ccw devices Cornelia Huck
2013-02-28  9:22 ` [PATCH v4 6/6] KVM: s390: Wire up ioeventfd Cornelia Huck
2013-02-28  9:50   ` Michael S. Tsirkin
2013-02-28 10:20     ` Cornelia Huck
2013-02-28 10:24       ` Gleb Natapov
2013-02-28 11:15         ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130403133226.6d92c671@gondolin \
    --to=cornelia.huck@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=gleb@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sasha.levin@oracle.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.