[lkml]   [2000]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
On Tue, Oct 24, 2000 at 10:03:04AM -0700, Linus Torvalds wrote:

> Basically, with get_events(), there is a maximum of one event per "bind".
> And the memory for that is statically allocated at bind_event() time.
> But you'd be doing so in a controlled manner: the memory use wouldn't go
> up just because there is a sudden influx of 50000 packets. So it scales
> with load by virtue of simply not _caring_ about the load - it only cares
> about the number of fd's you're waiting on.

Nice. I like this.

It would be easy for existing userspace code to start using this
interface as it has the same semantics as select/poll from the event
perspective. But it would make things even easier, as the bind would
follow the life of the descriptor and thus wouldn't need to be "requeued"
before every get_events call, so that part of userspace code could just
be ripped out^W^W disabled and kept only for portability.

In most of the daemons I have written, I've ended up using memcpy() to
keep a non-scribbled-over copy of the fdsets around so I don't have to
walk data structures and requeue fds on every loop for select()...nasty.


[ Stormix Technologies Inc. ][ NetNation Communications Inc. ]
[ ][ ]
[ Opinions expressed are not necessarily those of my employers. ]
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:41    [W:0.152 / U:1.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site