Message ID | 20230203181404.152774-1-andrei.gherzan@canonical.com |
---|---|
State | New |
Headers | show |
Series | [ACT,1/1] UBUNTU: SAUCE: ubuntu_kernel_selftests: Bump optmem_max for net bench tests | expand |
On 2/3/23 11:14 AM, Andrei Gherzan wrote: > BugLink: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1960907 > > One of the reasons why a zerocopy send operation could fail with ENOBUF > is when the optmem limit is reached[1]. The default value is currently > set at 20480 which is insufficient for edge cases especially around > benchmarking tests. > > This change proposes an optmem_max increase to 2048000. It fixes for > example "sendmesg: No buffer space available" sporadic errors in > udpgso_bench_tx/udpgso_bench.sh > > [1] https://www.kernel.org/doc/html/latest/networking/msg_zerocopy.html#transmission > > Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com> > --- > ubuntu_kernel_selftests/ubuntu_kernel_selftests.py | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py > index 5d87f82e..6335abac 100644 > --- a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py > +++ b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py > @@ -216,8 +216,16 @@ class ubuntu_kernel_selftests(test.test): > if test_name.endswith('-build'): > os.chdir(self.srcdir) > if "net" in test_name: > - cmd = "sh -c 'echo 1 > /proc/sys/net/ipv4/conf/all/accept_local'" > - utils.system(cmd) > + cmds = [] > + cmds.append("sh -c 'echo 1 > /proc/sys/net/ipv4/conf/all/accept_local'") > + # The net benchmarching tests (e.g. udpgso) can fail when > + # optmem limit is reached. > + # https://www.kernel.org/doc/html/latest/networking/msg_zerocopy.html#transmission > + # LP #1960907 > + cmds.append("sh -c 'echo 2048000 > /proc/sys/net/core/optmem_max'") > + for cmd in cmds: > + utils.system(cmd) > + > if self.kv >= 415: > # net selftests use a module built by bpf selftests, bpf is available since bionic kernel > if self.kv == 506: Acked-by: Tim Gardner <tim.gardner@canonical.com> Seems reasonable
Acked-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Applied with BugLink modified to standard format:
https://bugs.launchpad.net/bugs/1960907
We might need to restore this value as we have some manually
provisioned systems. Let's see if it will affect other tests.
Thanks
Sam
diff --git a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py index 5d87f82e..6335abac 100644 --- a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py +++ b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py @@ -216,8 +216,16 @@ class ubuntu_kernel_selftests(test.test): if test_name.endswith('-build'): os.chdir(self.srcdir) if "net" in test_name: - cmd = "sh -c 'echo 1 > /proc/sys/net/ipv4/conf/all/accept_local'" - utils.system(cmd) + cmds = [] + cmds.append("sh -c 'echo 1 > /proc/sys/net/ipv4/conf/all/accept_local'") + # The net benchmarching tests (e.g. udpgso) can fail when + # optmem limit is reached. + # https://www.kernel.org/doc/html/latest/networking/msg_zerocopy.html#transmission + # LP #1960907 + cmds.append("sh -c 'echo 2048000 > /proc/sys/net/core/optmem_max'") + for cmd in cmds: + utils.system(cmd) + if self.kv >= 415: # net selftests use a module built by bpf selftests, bpf is available since bionic kernel if self.kv == 506:
BugLink: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1960907 One of the reasons why a zerocopy send operation could fail with ENOBUF is when the optmem limit is reached[1]. The default value is currently set at 20480 which is insufficient for edge cases especially around benchmarking tests. This change proposes an optmem_max increase to 2048000. It fixes for example "sendmesg: No buffer space available" sporadic errors in udpgso_bench_tx/udpgso_bench.sh [1] https://www.kernel.org/doc/html/latest/networking/msg_zerocopy.html#transmission Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com> --- ubuntu_kernel_selftests/ubuntu_kernel_selftests.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)