public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Gregory Haskins <ghaskins@novell.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Davide Libenzi <davidel@xmailserver.org>,
	mtosatti@redhat.com, Mark McLoughlin <markmc@redhat.com>
Subject: Re: [KVM PATCH v4 3/3] kvm: add iosignalfd support
Date: Wed, 27 May 2009 15:11:04 +0300	[thread overview]
Message-ID: <4A1D2DD8.2050709@redhat.com> (raw)
In-Reply-To: <4A1D285C.9050008@novell.com>

Gregory Haskins wrote:
>
>> What happens if you register to iosignalfds for the same address but
>> with different cookies (a very practical scenario)?
>>     
>
> This is really only supported at the iosignal interface level.  Today,
> you can do this and the registration will succeed, but at run-time an
> IO-exit will stop at the first in_range() hit it finds.  Therefore, you
> will only get service on the first/lowest registered range.
>
> I knew this was a limitation of the current io_bus, but I put the
> feature into iosignalfd anyway so that the user/kern interface was
> robust enough to support the notion should we ever need it (and can thus
> patch io_bus at that time).  Perhaps that is short-sighted because
> userspace would never know its ranges weren't really registered properly.
>
> I guess its simple enough to have io_bus check all devices for a match
> instead of stopping on the first.  Should I just make a patch to fix
> this, or should I fix iosignalfd to check for in_range matches and fail
> if it finds overlap?  (We could then add a CAP_OVERLAP_IO bit in the
> future if we finally fix the io_bus capability).  I am inclined to lean
> towards option 2, since its not known whether this will ever be useful,
> and io_bus scanning is in a hot-path.
>
> Thinking about it some more, I wonder if we should just get rid of the
> notion of overlap to begin with.  Its a slippery slope (should we also
> return to userspace after scanning and matching io_bus to see if it has
> any overlap too?).  I am not sure if it would ever be used (real
> hardware doesn't have multiple devices at the same address), and we can
> always have multiple end-points mux from one iosignalfd if we really
> need that.  Thoughts?
>   

Multiple cookies on the same address are required by virtio.  You can't 
mux since the data doesn't go anywhere.

Virtio can survive by checking all rings on a notify, and we can later 
add a mechanism that has a distinct address for each ring, but let's see 
if we can cope with multiple cookies.  Mark?

You could search existing iosignalfds for the same address and re-use 
the same iodevice.  I don't want to search the entire list since that 
precludes tricks like using hashtables or sorting the list by frequency 
of access.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2009-05-27 12:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 19:15 [KVM PATCH v4 0/3] iosignalfd Gregory Haskins
2009-05-26 19:15 ` [KVM PATCH v4 1/3] eventfd: export eventfd interfaces for module use Gregory Haskins
2009-05-27  8:57   ` Avi Kivity
2009-05-27 11:53     ` Gregory Haskins
2009-05-26 19:15 ` [KVM PATCH v4 2/3] kvm: make io_bus interface more robust Gregory Haskins
2009-05-27  8:54   ` Avi Kivity
2009-05-27 11:26     ` Gregory Haskins
2009-05-26 19:15 ` [KVM PATCH v4 3/3] kvm: add iosignalfd support Gregory Haskins
2009-05-27  9:03   ` Avi Kivity
2009-05-27 11:47     ` Gregory Haskins
2009-05-27 12:11       ` Avi Kivity [this message]
2009-05-27 12:54         ` Gregory Haskins
2009-05-27 17:25         ` Mark McLoughlin
2009-05-27 17:40           ` Gregory Haskins
2009-05-27 17:48             ` Mark McLoughlin
2009-05-27 20:45               ` Gregory Haskins
2009-05-28  9:09                 ` Mark McLoughlin
2009-05-28 12:12                   ` Gregory Haskins
2009-05-31  9:11                     ` Avi Kivity
2009-06-01 12:14                       ` Gregory Haskins
2009-06-03 22:04               ` Gregory Haskins
2009-06-04 13:20                 ` Mark McLoughlin

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=4A1D2DD8.2050709@redhat.com \
    --to=avi@redhat.com \
    --cc=davidel@xmailserver.org \
    --cc=ghaskins@novell.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markmc@redhat.com \
    --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