1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-24 01:09:38 -05:00
linux/arch
Pavel Tikhomirov 04190bf894 sock: allow reading and changing sk_userlocks with setsockopt
SOCK_SNDBUF_LOCK and SOCK_RCVBUF_LOCK flags disable automatic socket
buffers adjustment done by kernel (see tcp_fixup_rcvbuf() and
tcp_sndbuf_expand()). If we've just created a new socket this adjustment
is enabled on it, but if one changes the socket buffer size by
setsockopt(SO_{SND,RCV}BUF*) it becomes disabled.

CRIU needs to call setsockopt(SO_{SND,RCV}BUF*) on each socket on
restore as it first needs to increase buffer sizes for packet queues
restore and second it needs to restore back original buffer sizes. So
after CRIU restore all sockets become non-auto-adjustable, which can
decrease network performance of restored applications significantly.

CRIU need to be able to restore sockets with enabled/disabled adjustment
to the same state it was before dump, so let's add special setsockopt
for it.

Let's also export SOCK_SNDBUF_LOCK and SOCK_RCVBUF_LOCK flags to uAPI so
that using these interface one can reenable automatic socket buffer
adjustment on their sockets.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-04 12:52:03 +01:00
..
alpha sock: allow reading and changing sk_userlocks with setsockopt 2021-08-04 12:52:03 +01:00
arc
arm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-07-31 09:14:46 -07:00
arm64 Revert "Merge branch 'qcom-dts-updates'" 2021-08-03 14:25:41 -07:00
csky
h8300 libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
hexagon
ia64 libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
m68k libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
microblaze
mips sock: allow reading and changing sk_userlocks with setsockopt 2021-08-04 12:52:03 +01:00
nds32 nds32: fix up stack guard gap 2021-07-21 15:51:37 +02:00
nios2
openrisc
parisc sock: allow reading and changing sk_userlocks with setsockopt 2021-08-04 12:52:03 +01:00
powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-07-31 09:14:46 -07:00
riscv Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) 2021-07-30 16:01:36 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-07-31 09:14:46 -07:00
sh libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
sparc sock: allow reading and changing sk_userlocks with setsockopt 2021-08-04 12:52:03 +01:00
um
x86 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-07-31 09:14:46 -07:00
xtensa libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
.gitignore
Kconfig