[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A23C642.7010002@novell.com>
Date: Mon, 01 Jun 2009 08:14:58 -0400
From: Gregory Haskins <ghaskins@...ell.com>
To: Avi Kivity <avi@...hat.com>
CC: Mark McLoughlin <markmc@...hat.com>,
Gregory Haskins <gregory.haskins@...il.com>,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Davide Libenzi <davidel@...ilserver.org>, mtosatti@...hat.com
Subject: Re: [KVM PATCH v4 3/3] kvm: add iosignalfd support
Avi Kivity wrote:
> Gregory Haskins wrote:
>> This is closer to how the original series worked, but Avi asked for a
>> data-match token and thus the cookie was born. I think the rationale is
>> that we can't predict whether the same eventfd will be registered more
>> than once, and thus we need a way to further qualify it. However, to
>> your point, I cannot think of a valid use case for having the same fd
>> registered to the same address more than once, so perhaps your fd/addr
>> tuple is sufficient and we can drop the cookie (or, really, rename it to
>> "trigger" ;)
>>
>> Avi?
>>
>
> This is just how virtio works. To kick ring N of device X, it writes
> N to a port specific to X.
>
> If we lose N, then we don't know which ring was kicked and have to
> check them all.
>
> May we can rename cookie to data_match to make it explicit. If the
> data doesn't match, the eventfd isn't kicked.
>
> (Mark, same as we have arbitrary ring->MSI mappings (allowing one MSI
> to notify multiple rings), perhaps we should have the same capability
> for the other direction? So the guest could kick mulitple rings with
> one write, or just one ring, according to personal preference.
>
I think we are all on the same page here, actually (more or less). I
think the confusion was my own when you initially asked for a data-match
token, and I gave you "cookie". "cookie" as I implemented it was really
only used to match up the eventfd during de-assign, not the actual
signal event. I think what you are talking about here is the same as
what Mark and I have been calling "trigger". I agree that we need this
interface to be able to properly sort something like virtio, and I will
be including this in the next release.
OTOH, what I was proposing above is that my misguided attempt at
"cookie" for deassign is redundant with simply looking at the
eventfd/addr tuple. We can simply key off of those items to match up
the iosignalfd to close, and therefore lets get rid of the cookie field.
Sorry for the confusion. Let me know if you still think this isn't right.
-Greg
Download attachment "signature.asc" of type "application/pgp-signature" (267 bytes)
Powered by blists - more mailing lists