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

Andrew Bartlett abartlet at samba.org
Tue May 19 10:29:26 GMT 2009

On Tue, 2009-05-19 at 10:41 +0200, Volker Lendecke wrote:
> On Tue, May 19, 2009 at 07:43:35AM +0100, Sam Liddicott wrote:
> > /me bangs head on floor.
> Sorry for that, but I think my query is still valid. You're
> seeing a problem with the policy to read everything in a
> greedy way. I *think* this has been added due to performance
> reasons. If you would be happy with just reading a packet at
> a time with 4 syscalls (epoll -> read 4 bytes -> epoll ->
> read rest) this might be slower than the 3 syscalls (epoll
> -> ioctl(FIONREAD) -> read everything). So if you can prove
> how much the latter scheme gains, I think the discussion
> will become much easier. If you get a packet rate loss below
> noise, it's done I think. If you get a measurable packet
> rate loss, we have to discuss efficiency vs code clarity.

I'm pretty sure the whole design was to get in as many packets as
possible.  It may well be more than one, which is where the expected
saving is particularly evident.

Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20090519/bd61e2fd/attachment.bin

More information about the samba-technical mailing list