tcp: Probe net.core.{r,w}mem_max, don't set SO_{RCV,SND}BUF if low
If net.core.rmem_max and net.core.wmem_max sysctls have low values, we can get bigger buffers by not trying to set them high -- the kernel would lock their values to what we get. Try, instead, to get bigger buffers by queueing as much as possible, and if maximum values in tcp_wmem and tcp_rmem are bigger than this, that will work. While at it, drop QUICKACK option for non-spliced sockets, I set that earlier by mistake. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
4
tcp.h
4
tcp.h
@@ -51,6 +51,8 @@ union tcp_epoll_ref {
|
||||
* @pipe_size: Size of pipes for spliced connections
|
||||
* @refill_ts: Time of last refill operation for pools of sockets/pipes
|
||||
* @port_detect_ts: Time of last TCP port detection/rebind, if enabled
|
||||
* @low_wmem: Low probed net.core.wmem_max
|
||||
* @low_rmem: Low probed net.core.rmem_max
|
||||
*/
|
||||
struct tcp_ctx {
|
||||
uint64_t hash_secret[2];
|
||||
@@ -65,6 +67,8 @@ struct tcp_ctx {
|
||||
size_t pipe_size;
|
||||
struct timespec refill_ts;
|
||||
struct timespec port_detect_ts;
|
||||
int low_wmem;
|
||||
int low_rmem;
|
||||
};
|
||||
|
||||
#endif /* TCP_H */
|
||||
|
Reference in New Issue
Block a user