From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jean-Philippe Menil <jean-philippe.menil@univ-nantes.fr>
Cc: netdev@vger.kernel.org, kvm@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: Re: Bug inkvm_set_irq
Date: Thu, 17 Mar 2011 10:21:59 +0200 [thread overview]
Message-ID: <20110317082159.GB6459@redhat.com> (raw)
In-Reply-To: <4D81BF9E.5090503@univ-nantes.fr>
On Thu, Mar 17, 2011 at 09:00:30AM +0100, Jean-Philippe Menil wrote:
> >>Are you running a preemptible kernel?
> >>Does the following help at all?
> >>
> >>diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
> >>index 2ca4535..cdf51c9 100644
> >>--- a/virt/kvm/eventfd.c
> >>+++ b/virt/kvm/eventfd.c
> >>@@ -90,7 +90,7 @@ irqfd_shutdown(struct work_struct *work)
> >> * We know no new events will be scheduled at this point, so block
> >> * until all previously outstanding events have completed
> >> */
> >>- flush_work(&irqfd->inject);
> >>+ flush_work_sync(&irqfd->inject);
> >>
> >> /*
> >> * It is now safe to release the object's resources
> >>
> >Hi,
> >
> >thanks for the response.
> >
> >root@ayrshire:~# zcat /proc/config.gz | grep -i preempt
> ># CONFIG_PREEMPT_RCU is not set
> >CONFIG_PREEMPT_NOTIFIERS=y
> >CONFIG_PREEMPT_NONE=y
> ># CONFIG_PREEMPT_VOLUNTARY is not set
> ># CONFIG_PREEMPT is not set
> >
> >It does not seem to be a preemptible kernel.
> >
> >I will test tour patch, and report the result.
> >
> >Regards.
> >
> Hi,
>
> i reboot the host with the "flush_work_sync", yesterday at lunchtime.
> I haven't see "Eventfd bug detected" or "Wakeup bug detected" until now.
>
> The modification seem to do the trick.
>
> So, if my understand is correct, flush_work flush the last irqfd,
> but in my case, antoher irqfd was still queued to a cpu?
> Is that right?
>
> Regards.
Yes, it says:
* flush_work - wait for a work to finish executing the last queueing instance
* @work: the work to flush
*
* Wait until @work has finished execution. This function considers
* only the last queueing instance of @work. If @work has been
* enqueued across different CPUs on a non-reentrant workqueue or on
* multiple workqueues, @work might still be executing on return on
* some of the CPUs from earlier queueing.
*
* If @work was queued only on a non-reentrant, ordered or unbound
* workqueue, @work is guaranteed to be idle on return if it hasn't
* been requeued since flush started.
kvm uses the default workqueue which is non-reentrant.
Thanks to Gleb for the suggestion!
--
MST
next prev parent reply other threads:[~2011-03-17 8:22 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 9:07 Bug inkvm_set_irq Jean-Philippe Menil
2011-02-25 10:36 ` Gleb Natapov
2011-02-25 10:36 ` Gleb Natapov
2011-02-27 17:00 ` Michael S. Tsirkin
2011-02-28 8:56 ` Jean-Philippe Menil
2011-02-28 8:56 ` Jean-Philippe Menil
2011-02-28 10:11 ` Michael S. Tsirkin
2011-02-28 10:40 ` Jean-Philippe Menil
2011-02-28 11:39 ` Michael S. Tsirkin
2011-02-28 15:13 ` Jean-Philippe Menil
2011-02-28 15:13 ` Jean-Philippe Menil
2011-02-28 22:34 ` Jean-Philippe Menil
2011-03-01 7:03 ` Michael S. Tsirkin
2011-03-01 7:03 ` Michael S. Tsirkin
2011-03-01 14:39 ` Jean-Philippe Menil
2011-03-03 14:47 ` Michael S. Tsirkin
2011-03-03 15:26 ` Jean-Philippe Menil
2011-03-03 15:26 ` Jean-Philippe Menil
2011-03-03 15:55 ` Michael S. Tsirkin
2011-03-03 15:55 ` Michael S. Tsirkin
2011-03-04 9:22 ` Jean-Philippe Menil
2011-03-04 9:35 ` Michael S. Tsirkin
2011-03-04 9:39 ` Jean-Philippe Menil
2011-03-08 11:13 ` Michael S. Tsirkin
2011-03-09 12:28 ` Jean-Philippe Menil
2011-03-09 12:28 ` Jean-Philippe Menil
2011-03-09 13:00 ` Michael S. Tsirkin
2011-03-09 13:12 ` Jean-Philippe Menil
2011-03-09 13:12 ` Jean-Philippe Menil
2011-03-09 13:59 ` Michael S. Tsirkin
2011-03-09 13:59 ` Michael S. Tsirkin
2011-03-10 8:42 ` Jean-Philippe Menil
2011-03-15 14:32 ` Michael S. Tsirkin
2011-03-15 14:58 ` Jean-Philippe Menil
2011-03-15 14:58 ` Jean-Philippe Menil
2011-03-17 8:00 ` Jean-Philippe Menil
2011-03-17 8:21 ` Michael S. Tsirkin
2011-03-17 8:21 ` Michael S. Tsirkin [this message]
2011-03-17 8:00 ` Jean-Philippe Menil
2011-03-15 14:32 ` Michael S. Tsirkin
2011-03-10 8:42 ` Jean-Philippe Menil
2011-03-09 13:00 ` Michael S. Tsirkin
2011-03-08 11:13 ` Michael S. Tsirkin
2011-03-04 9:39 ` Jean-Philippe Menil
2011-03-04 9:35 ` Michael S. Tsirkin
2011-03-04 9:22 ` Jean-Philippe Menil
2011-03-03 14:47 ` Michael S. Tsirkin
2011-03-01 14:39 ` Jean-Philippe Menil
2011-02-28 22:34 ` Jean-Philippe Menil
2011-02-28 11:39 ` Michael S. Tsirkin
2011-02-28 10:40 ` Jean-Philippe Menil
2011-02-28 10:11 ` Michael S. Tsirkin
2011-02-27 17:00 ` Michael S. Tsirkin
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=20110317082159.GB6459@redhat.com \
--to=mst@redhat.com \
--cc=jean-philippe.menil@univ-nantes.fr \
--cc=kvm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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.