diff options
author | Pavel Tikhomirov <ptikhomirov@virtuozzo.com> | 2021-07-29 11:27:13 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2022-04-29 03:53:52 +0300 |
commit | e69be16db7deae018902b0ceb62db8eaf7b74437 (patch) | |
tree | 295d19dd12bad517516b30993186b28706453cb3 /images | |
parent | ce5ce285a81d45a62355301cd68085bb236667fd (diff) |
sockets: c/r bufer size locks
When one sets socket buffer sizes with setsockopt(SO_{SND,RCV}BUF*),
kernel sets coresponding SOCK_SNDBUF_LOCK or SOCK_RCVBUF_LOCK flags on
struct sock. It means that such a socket with explicitly changed buffer
size can not be auto-adjusted by kernel (e.g. if there is free memory
kernel can auto-increase default socket buffers to improve perfomance).
(see tcp_fixup_rcvbuf() and tcp_sndbuf_expand())
CRIU is always changing buf sizes on restore, that means that all
sockets receive lock flags on struct sock and become non-auto-adjusted
after migration. In some cases it can decrease perfomance of network
connections quite a lot.
So let's c/r socket buf locks (SO_BUF_LOCKS), so that sockets for which
auto-adjustment is available does not lose it.
Reviewed-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Diffstat (limited to 'images')
-rw-r--r-- | images/sk-opts.proto | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/images/sk-opts.proto b/images/sk-opts.proto index 2377f6b62..1d24d47cc 100644 --- a/images/sk-opts.proto +++ b/images/sk-opts.proto @@ -31,6 +31,8 @@ message sk_opts_entry { optional uint32 tcp_keepintvl = 22; optional uint32 so_oobinline = 23; optional uint32 so_linger = 24; + + optional uint32 so_buf_lock = 25; } enum sk_shutdown { |