On Thu, 7 Jan 2010, Michael S. Tsirkin wrote: > OK. What I think we need is a way to remove ourselves from the eventfd > wait queue and clear the counter atomically. > > We currently do > remove_wait_queue(irqfd->wqh, &irqfd->wait); > where wqh saves the eventfd wait queue head. You do a remove_wait_queue() from inside a callback wakeup on the same wait queue head? > If we do this before proposed eventfd_read_ctx, we can lose events. > If we do this after, we can get spurious events. > > An unlocked read is one way to fix this. You posted one line of code and a two lines analysis of the issue. Can you be a little bit more verbose and show me more code, so that I can actually see what is going on? - Davide -- 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