FW: [PATCH] Stop packet_recv greediness, stop using event_add_timed

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue May 19 06:10:04 GMT 2009


On Tue, May 19, 2009 at 07:06:06AM +0100, Sam Liddicott wrote:
> The ordering isn't purely dependant on eventlib.
> 
> Currently the ordering is
> 1. Expire timers (and 0 timers)
> 2. Socket fd, client decides if read or write takes priority.
> 3. Timers that timed out while waiting for (2) are picked
> up as (1) next time around.
> 
> It's not even really a timed event, it just uses timed
> events to implement. In the ordering it needs to be
> implemented at the same priority as socket reads - which
> for server sockets is after socket writes, and for client
> sockets is before socket writes. So packet_recv or tevent
> can't know how to prioritize it, only the socket owner
> knows.
> 
> Consider that I didn't address the DOS scenario Volker
> raised on IRC, so perhaps if instead of trying to leave
> one byte, what if I try to read only the correct number of
> bytes? This means reading a very few bytes until the
> socket owner can work out how many should be read.
> 
> Of course such a patch would be almost identical, but this
> time it would follow a less obnoxious strategy and also
> avoid DOS.
> 
> What do you think?

For this as said on irc I'd like to see a speed comparison.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090519/2e9edb45/attachment.bin


More information about the samba-technical mailing list