public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	kvm@vger.kernel.org, Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear
Date: Thu, 19 Jul 2012 12:33:29 +0300	[thread overview]
Message-ID: <20120719093329.GA10182@redhat.com> (raw)
In-Reply-To: <20120719092107.GS26120@redhat.com>

On Thu, Jul 19, 2012 at 12:21:07PM +0300, Gleb Natapov wrote:
> On Thu, Jul 19, 2012 at 12:17:19PM +0300, Michael S. Tsirkin wrote:
> > On Thu, Jul 19, 2012 at 10:53:37AM +0300, Gleb Natapov wrote:
> > > On Thu, Jul 19, 2012 at 01:11:53AM +0300, Michael S. Tsirkin wrote:
> > > > This creates a way to detect when kvm_set_irq(...,0) was run
> > > > twice with the same source id by returning 0 in this case.
> > > > 
> > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > > ---
> > > > 
> > > > This is on top of my bugfix patch.  Uncompiled and untested.  Alex, I
> > > > think something like this patch will make it possible for you to simply
> > > > do
> > > > 	if (kvm_set_irq(...., 0))
> > > > 		eventfd_signal()
> > > > 
> > > Why caller can't track line state?
> > 
> > Why duplicate information? As we are finding it's not trivial to keep
> > the two in sync. Think about migration etc ...
> > 
> We do not migrate irq_states. The caller already have to have enough
> information to recreate its state and it should migrate the info, so why
> should we go all the way down the call chain to find something that is
> already known?

Hmm it's an interesting point. Looks like irqfds for level lose state
across migration. Of course Alex wants to use them for assignment which
currently disables migration, but we are talking about a generic API,
so it's a problem that there's no way to retrieve the state.


Also migration is only one example. Duplicated state is generally
nasty.  We would need extra locking too which is not nice.

> --
> 			Gleb.

  reply	other threads:[~2012-07-19  9:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 22:11 [PATCH RFC untested] kvm_set_irq: report coalesced for clear Michael S. Tsirkin
2012-07-18 22:40 ` Alex Williamson
2012-07-18 22:51   ` Michael S. Tsirkin
2012-07-19  7:53 ` Gleb Natapov
2012-07-19  9:17   ` Michael S. Tsirkin
2012-07-19  9:21     ` Gleb Natapov
2012-07-19  9:33       ` Michael S. Tsirkin [this message]
2012-07-19  9:41         ` Gleb Natapov
2012-07-19 10:26           ` Michael S. Tsirkin
2012-07-19 10:54             ` Gleb Natapov
2012-07-19 11:12               ` Michael S. Tsirkin
2012-07-19 11:18                 ` Michael S. Tsirkin
2012-07-19 11:25                 ` Gleb Natapov
2012-07-19 11:57                   ` Michael S. Tsirkin
2012-07-19 16:38                     ` Alex Williamson
2012-07-19 16:51                       ` 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=20120719093329.GA10182@redhat.com \
    --to=mst@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox