From: Sasha Levin <levinsasha928@gmail.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Marcelo Tosatti <mtosatti@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Pekka Enberg <penberg@kernel.org>
Subject: Re: [PATCH] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_PIPE
Date: Wed, 06 Jul 2011 07:37:53 +0300 [thread overview]
Message-ID: <1309927073.2222.6.camel@sasha> (raw)
In-Reply-To: <4E11D540.6020003@redhat.com>
On Mon, 2011-07-04 at 17:59 +0300, Avi Kivity wrote:
> On 07/04/2011 05:52 PM, Sasha Levin wrote:
> > >
> > > I can't really see that as useful. eventfds destroy information;
> > > without datamatch, you have no idea what value was written. Even with
> > > datamatch, you have no idea how many times it was written. With a
> > > range, you also have no idea which address was written. It's pretty
> > > meaningless.
> > >
> >
> > It is pretty useless, but I didn't want the ioctl to behave differently
> > when passing a socket or an eventfd.
> >
> > If we do go for a new ioctl as you suggested then yes, problem solved.
> >
>
> Yes. I guess it depends on the numbers of if () s introduced into the
> code. If it starts to feel dirty, split it into a separate ioctl (they
> can both call common helpers).
>
> It's fine to allow size > 8 for eventfds. Yes it's meaningless, but
> it's not harmful and I can't see it breaking anything. Note that we may
> need to change the way we do matches - currently 'size' means the access
> size, with an exact match on the address, but the new meaning is 'any
> address from start to start+size-1'.
>
Looks like there was no need for a new ioctl. I've tried going further
with adding 'meaningless' features to the existing implementation so
that the sockets could be added without needing a new mechanism.
I've added a user configurable 'read' flag which is supposed to trigger
an event when the memory is read and a 'nowrite' flag which won't
trigger an event on a write. This makes it possible to add sockets while
keeping the code pretty much the same.
Instead of making these flags user configurable, they could be
implicitly defined according to the choice of eventfd or socket, I
couldn't decide which method was better so just went with the first one.
--
Sasha.
next prev parent reply other threads:[~2011-07-06 4:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-03 17:04 [PATCH] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_PIPE Sasha Levin
2011-07-03 17:16 ` Avi Kivity
2011-07-03 17:44 ` Sasha Levin
2011-07-03 17:57 ` Pekka Enberg
2011-07-04 10:27 ` Avi Kivity
2011-07-04 10:49 ` Michael S. Tsirkin
2011-07-04 10:57 ` Avi Kivity
2011-07-04 14:38 ` Sasha Levin
2011-07-04 14:45 ` Avi Kivity
2011-07-04 14:52 ` Sasha Levin
2011-07-04 14:59 ` Avi Kivity
2011-07-06 4:37 ` Sasha Levin [this message]
2011-07-06 11:30 ` Avi Kivity
2011-07-04 10:32 ` Michael S. Tsirkin
2011-07-04 10:45 ` Avi Kivity
2011-07-04 11:07 ` Michael S. Tsirkin
2011-07-04 11:19 ` Avi Kivity
2011-07-04 11:45 ` Michael S. Tsirkin
2011-07-04 11:49 ` Avi Kivity
2011-07-04 12:12 ` 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=1309927073.2222.6.camel@sasha \
--to=levinsasha928@gmail.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=penberg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox