User: Password:
Subscribe / Log in / New account

Re: [PATCH] rfc: threaded epoll_wait thundering herd

From:  Linus Torvalds <>
To:  Ulrich Drepper <>
Subject:  Re: [PATCH] rfc: threaded epoll_wait thundering herd
Date:  Mon, 7 May 2007 21:35:39 -0700 (PDT)
Cc:  Davide Libenzi <>, Davi Arnaut <>, Andrew Morton <>, Linux Kernel Mailing List <>
Archive-link:  Article, Thread

On Mon, 7 May 2007, Ulrich Drepper wrote:
> This is absolutely not comparable.  When read/write is canceled no
> data is lost.  Some other thread might have to pick up the slack but
> that's it.

That's bullsh*t, Uli, and you know it.

Whatever the thread read() into it's buffer is effectively gone. You don't 
know how much of the buffer was updated, so other threads cannot use the 

In fact, the exact *reverse* of what you claim is true. With "poll()" or 
"select()", other threads *can* actually look at the result buffer, since 
it has a known size and format that is independent of the return value, 
unlike read().

But the real issue is that if you start cancellign threads without any 
other synchronization, you are going to lose data anyway. Claiming 
anything else is just silly. The whole scenario you talk about is 
nonsensical, never mind that read() actually handles it *less* well rather 
than better as you claim.


(Log in to post comments)

Copyright © 2007, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds