From: Colin King <hidden> Date: 2020-08-04 12:32:46
From: Colin Ian King <redacted>
The current test will exit with a failure if it cannot set affinity on
specific CPUs which is problematic when running this on single CPU
systems. Add a check for the number of CPUs and skip the test if
the CPU requirement is not met.
Signed-off-by: Colin Ian King <redacted>
---
tools/testing/selftests/net/msg_zerocopy.sh | 5 +++++
1 file changed, 5 insertions(+)
@@ -21,6 +21,11 @@ readonly DADDR6='fd::2'readonlypath_sysctl_mem="net.core.optmem_max"+if[[$(nproc)-lt4]];then+echo"SKIP: test requires at least 4 CPUs"+exit4+fi+# No arguments: automated testif[["$#"-eq"0"]];then$04tcp-t1
From: David Miller <davem@davemloft.net> Date: 2020-08-04 23:06:43
From: Colin King <redacted>
Date: Tue, 4 Aug 2020 13:30:12 +0100
From: Colin Ian King <redacted>
The current test will exit with a failure if it cannot set affinity on
specific CPUs which is problematic when running this on single CPU
systems. Add a check for the number of CPUs and skip the test if
the CPU requirement is not met.
Signed-off-by: Colin Ian King <redacted>
From: Eric Dumazet <hidden> Date: 2020-08-05 00:54:24
On 8/4/20 5:30 AM, Colin King wrote:
quoted hunk
From: Colin Ian King <redacted>
The current test will exit with a failure if it cannot set affinity on
specific CPUs which is problematic when running this on single CPU
systems. Add a check for the number of CPUs and skip the test if
the CPU requirement is not met.
Signed-off-by: Colin Ian King <redacted>
---
tools/testing/selftests/net/msg_zerocopy.sh | 5 +++++
1 file changed, 5 insertions(+)
@@ -21,6 +21,11 @@ readonly DADDR6='fd::2'readonlypath_sysctl_mem="net.core.optmem_max"+if[[$(nproc)-lt4]];then+echo"SKIP: test requires at least 4 CPUs"+exit4+fi+# No arguments: automated testif[["$#"-eq"0"]];then$04tcp-t1
Test explicitly uses CPU 2 and 3, right ?
nproc could be 500, yet cpu 2 or 3 could be offline
# cat /sys/devices/system/cpu/cpu3/online
0
# echo $(nproc)
71
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com> Date: 2020-08-05 08:11:14
On Wed, Aug 5, 2020 at 2:54 AM Eric Dumazet [off-list ref] wrote:
On 8/4/20 5:30 AM, Colin King wrote:
quoted
From: Colin Ian King <redacted>
The current test will exit with a failure if it cannot set affinity on
specific CPUs which is problematic when running this on single CPU
systems. Add a check for the number of CPUs and skip the test if
the CPU requirement is not met.
Signed-off-by: Colin Ian King <redacted>
---
tools/testing/selftests/net/msg_zerocopy.sh | 5 +++++
1 file changed, 5 insertions(+)
@@ -21,6 +21,11 @@ readonly DADDR6='fd::2'readonlypath_sysctl_mem="net.core.optmem_max"+if[[$(nproc)-lt4]];then+echo"SKIP: test requires at least 4 CPUs"+exit4+fi+# No arguments: automated testif[["$#"-eq"0"]];then$04tcp-t1
Test explicitly uses CPU 2 and 3, right ?
nproc could be 500, yet cpu 2 or 3 could be offline
# cat /sys/devices/system/cpu/cpu3/online
0
# echo $(nproc)
71
The cpu affinity is only set to bring some stability across runs.
The test does not actually verify that a run with zerocopy is some
factor faster than without, as that factor is hard to choose across
all platforms. As a result the automated run mainly gives code coverage.
It's preferable to always run. And on sched_setaffinity failure log a
message about possible jitter and continue. I can send that patch, if
the approach sounds good.
From: Colin Ian King <hidden> Date: 2020-08-05 08:22:43
On 05/08/2020 09:06, Willem de Bruijn wrote:
On Wed, Aug 5, 2020 at 2:54 AM Eric Dumazet [off-list ref] wrote:
quoted
On 8/4/20 5:30 AM, Colin King wrote:
quoted
From: Colin Ian King <redacted>
The current test will exit with a failure if it cannot set affinity on
specific CPUs which is problematic when running this on single CPU
systems. Add a check for the number of CPUs and skip the test if
the CPU requirement is not met.
Signed-off-by: Colin Ian King <redacted>
---
tools/testing/selftests/net/msg_zerocopy.sh | 5 +++++
1 file changed, 5 insertions(+)
@@ -21,6 +21,11 @@ readonly DADDR6='fd::2'readonlypath_sysctl_mem="net.core.optmem_max"+if[[$(nproc)-lt4]];then+echo"SKIP: test requires at least 4 CPUs"+exit4+fi+# No arguments: automated testif[["$#"-eq"0"]];then$04tcp-t1
Test explicitly uses CPU 2 and 3, right ?
nproc could be 500, yet cpu 2 or 3 could be offline
# cat /sys/devices/system/cpu/cpu3/online
0
# echo $(nproc)
71
The cpu affinity is only set to bring some stability across runs.
The test does not actually verify that a run with zerocopy is some
factor faster than without, as that factor is hard to choose across
all platforms. As a result the automated run mainly gives code coverage.
It's preferable to always run. And on sched_setaffinity failure log a
message about possible jitter and continue. I can send that patch, if
the approach sounds good.
That's sounds preferable to my bad fix for sure :-)
Colin
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com> Date: 2020-08-05 08:45:16
On Wed, Aug 5, 2020 at 10:22 AM Colin Ian King [off-list ref] wrote:
On 05/08/2020 09:06, Willem de Bruijn wrote:
quoted
On Wed, Aug 5, 2020 at 2:54 AM Eric Dumazet [off-list ref] wrote:
quoted
On 8/4/20 5:30 AM, Colin King wrote:
quoted
From: Colin Ian King <redacted>
The current test will exit with a failure if it cannot set affinity on
specific CPUs which is problematic when running this on single CPU
systems. Add a check for the number of CPUs and skip the test if
the CPU requirement is not met.
Signed-off-by: Colin Ian King <redacted>
---
tools/testing/selftests/net/msg_zerocopy.sh | 5 +++++
1 file changed, 5 insertions(+)
@@ -21,6 +21,11 @@ readonly DADDR6='fd::2'readonlypath_sysctl_mem="net.core.optmem_max"+if[[$(nproc)-lt4]];then+echo"SKIP: test requires at least 4 CPUs"+exit4+fi+# No arguments: automated testif[["$#"-eq"0"]];then$04tcp-t1
Test explicitly uses CPU 2 and 3, right ?
nproc could be 500, yet cpu 2 or 3 could be offline
# cat /sys/devices/system/cpu/cpu3/online
0
# echo $(nproc)
71
The cpu affinity is only set to bring some stability across runs.
The test does not actually verify that a run with zerocopy is some
factor faster than without, as that factor is hard to choose across
all platforms. As a result the automated run mainly gives code coverage.
It's preferable to always run. And on sched_setaffinity failure log a
message about possible jitter and continue. I can send that patch, if
the approach sounds good.
That's sounds preferable to my bad fix for sure :-)
From: Colin Ian King <hidden> Date: 2020-08-05 08:48:19
On 05/08/2020 09:44, Willem de Bruijn wrote:
On Wed, Aug 5, 2020 at 10:22 AM Colin Ian King [off-list ref] wrote:
quoted
On 05/08/2020 09:06, Willem de Bruijn wrote:
quoted
On Wed, Aug 5, 2020 at 2:54 AM Eric Dumazet [off-list ref] wrote:
quoted
On 8/4/20 5:30 AM, Colin King wrote:
quoted
From: Colin Ian King <redacted>
The current test will exit with a failure if it cannot set affinity on
specific CPUs which is problematic when running this on single CPU
systems. Add a check for the number of CPUs and skip the test if
the CPU requirement is not met.
Signed-off-by: Colin Ian King <redacted>
---
tools/testing/selftests/net/msg_zerocopy.sh | 5 +++++
1 file changed, 5 insertions(+)
@@ -21,6 +21,11 @@ readonly DADDR6='fd::2'readonlypath_sysctl_mem="net.core.optmem_max"+if[[$(nproc)-lt4]];then+echo"SKIP: test requires at least 4 CPUs"+exit4+fi+# No arguments: automated testif[["$#"-eq"0"]];then$04tcp-t1
Test explicitly uses CPU 2 and 3, right ?
nproc could be 500, yet cpu 2 or 3 could be offline
# cat /sys/devices/system/cpu/cpu3/online
0
# echo $(nproc)
71
The cpu affinity is only set to bring some stability across runs.
The test does not actually verify that a run with zerocopy is some
factor faster than without, as that factor is hard to choose across
all platforms. As a result the automated run mainly gives code coverage.
It's preferable to always run. And on sched_setaffinity failure log a
message about possible jitter and continue. I can send that patch, if
the approach sounds good.
That's sounds preferable to my bad fix for sure :-)