Re: [PATCH 1/4] kvm tools: Add ioeventfd support

2011-05-27 Thread Ingo Molnar
* Pekka Enberg wrote: > Hi Ingo, > > On Fri, May 27, 2011 at 1:54 PM, Ingo Molnar wrote: > > A sidenote: i think 'struct kvm *kvm' was a naming mistake - it's way > > too aspecific, it tells us nothing. What is a 'kvm'? > > Why, an instance of a kernel virtual machine, of course! It was the >

Re: [PATCH 1/4] kvm tools: Add ioeventfd support

2011-05-27 Thread Pekka Enberg
Hi Ingo, On Fri, May 27, 2011 at 1:54 PM, Ingo Molnar wrote: > A sidenote: i think 'struct kvm *kvm' was a naming mistake - it's way > too aspecific, it tells us nothing. What is a 'kvm'? Why, an instance of a kernel virtual machine, of course! It was the very first thing I wrote for this projec

Re: [PATCH 1/4] kvm tools: Add ioeventfd support

2011-05-27 Thread Ingo Molnar
* Sasha Levin wrote: > > > + pthread_create(&thread, NULL, ioeventfd__thread, NULL); > > > +} > > > > Shouldnt this use the thread pool, so that we know about each and > > every worker thread we have started, in one central place? > > Our thread pool currently responds to events - it runs a c

Re: [PATCH 1/4] kvm tools: Add ioeventfd support

2011-05-27 Thread Sasha Levin
On Fri, 2011-05-27 at 12:54 +0200, Ingo Molnar wrote: > * Sasha Levin wrote: > > > ioeventfd is way provided by KVM to receive notifications about > > reads and writes to PIO and MMIO areas within the guest. > > > > Such notifications are usefull if all we need to know is that > > a specific are

Re: [PATCH 1/4] kvm tools: Add ioeventfd support

2011-05-27 Thread Sasha Levin
On Fri, 2011-05-27 at 11:47 +0100, Stefan Hajnoczi wrote: > On Fri, May 27, 2011 at 11:36 AM, Sasha Levin wrote: > > ioeventfd is way provided by KVM to receive notifications about > > reads and writes to PIO and MMIO areas within the guest. > > > > Such notifications are usefull if all we need to

Re: [PATCH 1/4] kvm tools: Add ioeventfd support

2011-05-27 Thread Ingo Molnar
* Sasha Levin wrote: > ioeventfd is way provided by KVM to receive notifications about > reads and writes to PIO and MMIO areas within the guest. > > Such notifications are usefull if all we need to know is that > a specific area of the memory has been changed, and we don't need > a heavyweight

Re: [PATCH 1/4] kvm tools: Add ioeventfd support

2011-05-27 Thread Pekka Enberg
On Fri, May 27, 2011 at 1:36 PM, Sasha Levin wrote: > +void ioeventfd__start(void) > +{ > +       pthread_t thread; > + > +       pthread_create(&thread, NULL, ioeventfd__thread, NULL); Please be more careful with error handling. If an API call can fail, there's almost never any reason to silentl

Re: [PATCH 1/4] kvm tools: Add ioeventfd support

2011-05-27 Thread Stefan Hajnoczi
On Fri, May 27, 2011 at 11:36 AM, Sasha Levin wrote: > ioeventfd is way provided by KVM to receive notifications about > reads and writes to PIO and MMIO areas within the guest. > > Such notifications are usefull if all we need to know is that > a specific area of the memory has been changed, and

[PATCH 1/4] kvm tools: Add ioeventfd support

2011-05-27 Thread Sasha Levin
ioeventfd is way provided by KVM to receive notifications about reads and writes to PIO and MMIO areas within the guest. Such notifications are usefull if all we need to know is that a specific area of the memory has been changed, and we don't need a heavyweight exit to happen. The implementation