[PATCH] s4: smbcli_transport_send hit the socket right away if possible

Sam Liddicott sam at liddicott.com
Wed Jun 24 08:19:05 GMT 2009

* Matthias Dieter Wallnöfer wrote, On 22/06/09 14:51:
> What's with this patch? I integrated it for now in my own repo
> (http://repo.or.cz/w/Samba/mdw.git) but I'm free to discuss about
> changes or reverts. I mention this so the issue shouldn't get
> completely lost.
> Matthias
I think Metze is away so he won't be able to discuss it for a while.
Thanks for noticing it and trying it out.

If that patch interested you then you may be interested in a patch I'll
be posting shortly, to provide a callback to the sender vfs when the
request is finally written to the socket. This helps clients that want
to keep generating requests, but not more requests than the socket can
handle. Such a module just has one request queued and generates the next
one when that request leaves the queue and enters the socket.

> Sam Liddicott schrieb:
>> [Metze; "make test" on git master outputs exactly the same test summary
>> with our without this patch (apart from the "using seed" lines)]
>> If the transport socket is writable, then push the queue along
>> rather than wait until the caller returns back to the tevent loop.
>> This strategy keeps the sockets piping hot, and is particularly good
>> for cases where reading requests from one socket causes lots of
>> writes on another socket, or where lots of writes are made in a batch.
>> It doesn't matter if the socket is not writeable yet, packet_queue_run
>> will return quite cheaply in such a case.
>> Signed-off-by: Sam Liddicott <sam at liddicott.com>
>> ---
>>  source4/libcli/raw/clitransport.c |    7 +++++++
>>  1 files changed, 7 insertions(+), 0 deletions(-)

More information about the samba-technical mailing list