selftests/net: relax cpu affinity requirement in msg_zerocopy test
authorWillem de Bruijn <willemb@google.com>
Wed, 5 Aug 2020 08:40:45 +0000 (04:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Aug 2020 13:35:41 +0000 (15:35 +0200)
commitd5d9d2a5c2e448bb97392a001d18c9c70523df7c
treeeb72c81e82b0ec3ee5f9b310f51fdd525f9ad561
parent81b1d29ea366722f4c928656c4fbd78f2fd55d3e
selftests/net: relax cpu affinity requirement in msg_zerocopy test

[ Upstream commit 16f6458f2478b55e2b628797bc81a4455045c74e ]

The msg_zerocopy test pins the sender and receiver threads to separate
cores to reduce variance between runs.

But it hardcodes the cores and skips core 0, so it fails on machines
with the selected cores offline, or simply fewer cores.

The test mainly gives code coverage in automated runs. The throughput
of zerocopy ('-z') and non-zerocopy runs is logged for manual
inspection.

Continue even when sched_setaffinity fails. Just log to warn anyone
interpreting the data.

Fixes: 07b65c5b31ce ("test: add msg_zerocopy test")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/msg_zerocopy.c