qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] AioContext: fix broken placement of event_no


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v2] AioContext: fix broken placement of event_notifier_test_and_clear
Date: Tue, 21 Jul 2015 09:19:53 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, 07/20 08:42, Paolo Bonzini wrote:
> 
> > > I'm looking at optimizing it but I don't fully understand the relationship
> > > between aio_prepare and WaitForMultipleObjects. Do they get the same set 
> > > of
> > > events?
> > 
> > After some reading I think WaitForMultipleObjects is for event notifiers and
> > aio_prepare is for select() on fd events.
> > It's a bit trickier than aio-posix, in the first iteration there could be
> > another event masking ctx->notifier so we don't know if we need to clear it.
> > Maybe we can reverse events[] so that ctx->notifier will be the 0th one. 
> > And I
> > think we can always remove it after first iteration, am I right?
> 
> Yes, that would work. I am not sure how complex it would be. You would also 
> need
> a solution for the GSource and one (probably similar to aio-posix) for your
> epoll implementation. With ctx->notified at least you can encapsulate it in
> aio_notify_accept...

Yes, I'll take this into consideration when I refactor for epoll
implementation.  For now I think aio_notify_accept is cleaner.

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]