[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0906221251330.10952@makko.or.mcafeemobile.com>
Date: Mon, 22 Jun 2009 12:54:27 -0700 (PDT)
From: Davide Libenzi <davidel@...ilserver.org>
To: Gregory Haskins <gregory.haskins@...il.com>
cc: "Michael S. Tsirkin" <mst@...hat.com>, kvm@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
avi@...hat.com, paulmck@...ux.vnet.ibm.com,
Ingo Molnar <mingo@...e.hu>,
Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [PATCH 3/3] eventfd: add internal reference counting to fix
notifier race conditions
On Mon, 22 Jun 2009, Gregory Haskins wrote:
> Davide Libenzi wrote:
> > On Mon, 22 Jun 2009, Michael S. Tsirkin wrote:
> >
> >
> >> On Mon, Jun 22, 2009 at 11:03:22AM -0700, Davide Libenzi wrote:
> >>
> >>> In your case of kernel-to-kernel scenario, why would you need eventfd at
> >>> all, if userspace role in that model is simply to create it?
> >>>
> >> That's not 100% true. We have a mode where userspace is the producer
> >> and/or consumer (migration mode) and we switch between that and
> >> direct kernel-to-kernel communication.
> >>
> >
> > Then you'd need to ask yourself how to handle your complex case inside the
> > KVM code, so that other eventfd users are not affected by the extra fat
> > needed to handle your scenarios. Thing that seem to be continuosly tried.
> > A file* based kernel-to-kernel interface is rather wrong IMO.
> >
>
> Well, I will point out that the interface in question is
> eventfd_signal(struct file *), and you were the one that invented it
> afaict. Can't help it if we like it :)
Yes, I did. The case for eventfd was dual. First, it was a communication
link between userspace and kernel, for things like KAIO. Second, it was a
faster and smaller userspace replacement for things people used pipes
before.
In all those cases, at least one reference of the file* is alive in
userspace.
Even with the above case in mind, today I'd still use the eventfd_ctx as
internal kernel API accessory.
- Davide
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists