Messages in this thread |  | | Date | Sun, 03 Feb 2002 17:38:56 -0800 | | From | Dan Kegel <> | | Subject | Re: [Coder-Com] Re: PROBLEM: high system usage / poor SMPnetwork performance |
| |
Aaron Sethman wrote: > > > 2. you need to wrap your read()/write() calls on the socket with code > > that notices EWOULDBLOCK > This is perhaps the part we it disagrees with our code. I will > investigate this part. The way we normally do things is have callbacks > per fd, that get called when our event occurs doing the read, or, write > directly.
That sounds totally fine; in fact, it's how my Poller library works.
> We do check for the EWOULDBLOCK stuff and re-register the > event.
But do you remember that this fd is ready until EWOULDBLOCK? i.e. if you're notified that an fd is ready, and then you don't for whatever reason continue to do I/O on it until EWOULDBLOCK, you'll never ever be notified that it's ready again. If your code assumes that it will be notified again anyway, as with poll(), it will be sorely disappointed.
> The thing we do not currently do is, attempt to read or write > unless we've received notification first. This is what I am assuming is > breaking it.
Yeah, that would break it, too, I think.
- Dan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |