On Thu, Jan 07, 2010 at 12:36:01PM +0200, Michael S. Tsirkin wrote: > Or if I do it the other way: > remove_wait_queue(irqfd->wqh, &irqfd->wait); > -> > eventfd_read_ctx(irqfd->eventfd, &ucnt); > > now, if device signals eventfd at point marked by ->, > it will not be sent but counter will be cleared, > so we will loose a message. > May be I am missing something here, but why doing it like that is a problem? Event delivery races with interrupt masking so making masking succeed before event delivery is OK. Event generation is asynchronous anyway and could have happened jiffy latter anyway. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html