Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-20 Thread Avi Kivity
Davide Libenzi wrote: On Thu, 17 May 2007, Avi Kivity wrote: Davide Libenzi wrote: On Wed, 16 May 2007, Avi Kivity wrote: IMO doing eventfd_fget() asap is best. I much prefer refcounted pointers to handles in the kernel: it's easier to see what things point to, and

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-17 Thread Avi Kivity
Davide Libenzi wrote: On Wed, 16 May 2007, Avi Kivity wrote: IMO doing eventfd_fget() asap is best. I much prefer refcounted pointers to handles in the kernel: it's easier to see what things point to, and there is to context needed for dereferencing. There are concerns (from Al

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-17 Thread Davide Libenzi
On Thu, 17 May 2007, Avi Kivity wrote: Davide Libenzi wrote: On Wed, 16 May 2007, Avi Kivity wrote: IMO doing eventfd_fget() asap is best. I much prefer refcounted pointers to handles in the kernel: it's easier to see what things point to, and there is to context needed

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-17 Thread Davide Libenzi
On Thu, 17 May 2007, Davide Libenzi wrote: /* Your eventfd create/setup function (modulo error checks) */ void setup_eventfd(struct your_ctx *c) { int fd; c-rcb.proc = rcb_callback; fd = eventfd_create(0, c-rcb); c-evfile = eventfd_fget(fd); +

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-16 Thread Avi Kivity
Gregory Haskins wrote: On Tue, May 15, 2007 at 3:45 AM, in message [EMAIL PROTECTED], Avi Kivity [EMAIL PROTECTED] wrote: Gregory Haskins wrote: Signed- off- by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/kvm.h |1 + drivers/kvm/kvm_main.c | 52

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-16 Thread Avi Kivity
Davide Libenzi wrote: On Tue, 15 May 2007, Gregory Haskins wrote: On Tue, May 15, 2007 at 3:45 AM, in message [EMAIL PROTECTED], Avi Kivity [EMAIL PROTECTED] wrote: Gregory Haskins wrote: Signed- off- by: Gregory Haskins [EMAIL PROTECTED] ---

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-16 Thread Avi Kivity
Anthony Liguori wrote: Gregory Haskins wrote: While KVM will inevitably start requiring newer kernel versions, do we really need to do it right now? Perhaps we could add dummy eventfd_* functions to the module compat header? Then at least older kernels will continue to work with in-

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-16 Thread Avi Kivity
Davide Libenzi wrote: On Tue, 15 May 2007, Christoph Hellwig wrote: On Tue, May 15, 2007 at 12:18:17PM -0400, Gregory Haskins wrote: On Tue, May 15, 2007 at 11:40 AM, in message [EMAIL PROTECTED], Davide Libenzi [EMAIL PROTECTED] wrote: I don't know how

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-16 Thread Davide Libenzi
On Wed, 16 May 2007, Avi Kivity wrote: IMO doing eventfd_fget() asap is best. I much prefer refcounted pointers to handles in the kernel: it's easier to see what things point to, and there is to context needed for dereferencing. There are concerns (from Al and Christoph) about file lifetime

[kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Gregory Haskins
Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/kvm.h |1 + drivers/kvm/kvm_main.c | 55 +++- include/linux/kvm.h|1 + 3 files changed, 51 insertions(+), 6 deletions(-) diff --git a/drivers/kvm/kvm.h

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Davide Libenzi
On Tue, 15 May 2007, Gregory Haskins wrote: On Tue, May 15, 2007 at 3:45 AM, in message [EMAIL PROTECTED], Avi Kivity [EMAIL PROTECTED] wrote: Gregory Haskins wrote: Signed- off- by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/kvm.h |1 + drivers/kvm/kvm_main.c |

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Gregory Haskins
On Tue, May 15, 2007 at 11:40 AM, in message [EMAIL PROTECTED], Davide Libenzi [EMAIL PROTECTED] wrote: I don't know how critical is the path where you will be doing check. The eventfd_fget() is pretty fast, so if you're not looking at a performance critical path, I'd suggest that.

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Christoph Hellwig
On Tue, May 15, 2007 at 12:18:17PM -0400, Gregory Haskins wrote: On Tue, May 15, 2007 at 11:40 AM, in message [EMAIL PROTECTED], Davide Libenzi [EMAIL PROTECTED] wrote: I don't know how critical is the path where you will be doing check. The eventfd_fget() is pretty fast, so if you're

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Gregory Haskins
On Tue, May 15, 2007 at 12:22 PM, in message [EMAIL PROTECTED], Christoph Hellwig [EMAIL PROTECTED] wrote: On Tue, May 15, 2007 at 12:18:17PM - 0400, Gregory Haskins wrote: On Tue, May 15, 2007 at 11:40 AM, in message [EMAIL PROTECTED], Davide Libenzi [EMAIL PROTECTED] wrote: I don't

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Anthony Liguori
This patch series depends on eventfd which means that KVM now requires 2.6.22-rc1. While KVM will inevitably start requiring newer kernel versions, do we really need to do it right now? Perhaps we could add dummy eventfd_* functions to the module compat header? Then at least older kernels

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Gregory Haskins
On Tue, May 15, 2007 at 12:39 PM, in message [EMAIL PROTECTED], Anthony Liguori [EMAIL PROTECTED] wrote: This patch series depends on eventfd which means that KVM now requires 2.6.22- rc1. This is understood. While KVM will inevitably start requiring newer kernel versions, do we really

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Davide Libenzi
On Tue, 15 May 2007, Christoph Hellwig wrote: On Tue, May 15, 2007 at 12:18:17PM -0400, Gregory Haskins wrote: On Tue, May 15, 2007 at 11:40 AM, in message [EMAIL PROTECTED], Davide Libenzi [EMAIL PROTECTED] wrote: I don't know how critical is the path where you will be doing

Re: [kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-15 Thread Anthony Liguori
Gregory Haskins wrote: While KVM will inevitably start requiring newer kernel versions, do we really need to do it right now? Perhaps we could add dummy eventfd_* functions to the module compat header? Then at least older kernels will continue to work with in- kernel APIC disabled.

[kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-14 Thread Gregory Haskins
Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/kvm.h |1 + drivers/kvm/kvm_main.c | 52 ++-- include/linux/kvm.h|1 + 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/drivers/kvm/kvm.h

[kvm-devel] [PATCH 5/9] KVM: Adds ability to signal userspace using a file-descriptor

2007-05-09 Thread Gregory Haskins
Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/kvm.h |2 + drivers/kvm/kvm_main.c | 82 2 files changed, 84 insertions(+), 0 deletions(-) diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 0f6cc32..b5bfc91