]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: decrease connection flow control window
authorJon Paul Maloy <jon.maloy@ericsson.com>
Wed, 14 May 2014 09:39:08 +0000 (05:39 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 May 2014 19:19:47 +0000 (15:19 -0400)
commitdae610602122d59eb6b9e89f14443bb81e4e87f6
treebdd00bd92223c32f826b912323c5e50b280f3850
parentbd73e011afdad6bc89192158cce2bba41a3f71e5
tipc: decrease connection flow control window

Memory overhead when allocating big buffers for data transfer may
be quite significant. E.g., truesize of a 64 KB buffer turns out
to be 132 KB, 2 x the requested size.

This invalidates the "worst case" calculation we have been
using to determine the default socket receive buffer limit,
which is based on the assumption that 1024x64KB = 67MB buffers
may be queued up on a socket.

Since TIPC connections cannot survive hitting the buffer limit,
we have to compensate for this overhead.

We do that in this commit by dividing the fix connection flow
control window from 1024 (2*512) messages to 512 (2*256). Since
older version nodes send out acks at 512 message intervals,
compatibility with such nodes is guaranteed, although performance
may be non-optimal in such cases.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/core.c
net/tipc/port.h
net/tipc/socket.c