On Fri, 11 May 2007 19:30:31 -0700 Davide Libenzi <[EMAIL PROTECTED]> wrote:
> Fixes the epoll single pass code. During the unlocked event delivery > (to userspace) code, the poll callback can re-issue new events, and > we must receive them correctly. Since we loop in a lockless fashion, > we want to be O(nready), and we don't want to flash on/off the spinlock > for every event, we have the poll callback to use a secondary list to > queue events while we're inside the event delivery loop. > The rw_semaphore has been turned into a mutex. > This patch also adds the wait-exclusive flag, as suggested by Davi Arnaut. > > ... > @@ -534,6 +547,8 @@ > } > > mutex_unlock(&epmutex); > + > + mutex_destroy(&ep->mtx); > } It's a little alarming to see a dereference of `ep' right at the end of a function called ep_free(ep). Code is OK, but perhaps the kfree(ep) should be moved into ep_free()? I'm a bit stunned at the size of these two patches. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/