This is a note to let you know that I've just added the patch titled selftests/net: relax cpu affinity requirement in msg_zerocopy test to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: selftests-net-relax-cpu-affinity-requirement-in-msg_zerocopy-test.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Mon 10 Aug 2020 03:21:37 PM CEST From: Willem de Bruijn <willemb@xxxxxxxxxx> Date: Wed, 5 Aug 2020 04:40:45 -0400 Subject: selftests/net: relax cpu affinity requirement in msg_zerocopy test From: Willem de Bruijn <willemb@xxxxxxxxxx> [ 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@xxxxxxxxxxxxx> Signed-off-by: Willem de Bruijn <willemb@xxxxxxxxxx> Acked-by: Colin Ian King <colin.king@xxxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/net/msg_zerocopy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/tools/testing/selftests/net/msg_zerocopy.c +++ b/tools/testing/selftests/net/msg_zerocopy.c @@ -121,9 +121,8 @@ static int do_setcpu(int cpu) CPU_ZERO(&mask); CPU_SET(cpu, &mask); if (sched_setaffinity(0, sizeof(mask), &mask)) - error(1, 0, "setaffinity %d", cpu); - - if (cfg_verbose) + fprintf(stderr, "cpu: unable to pin, may increase variance.\n"); + else if (cfg_verbose) fprintf(stderr, "cpu: %u\n", cpu); return 0; Patches currently in stable-queue which might be from willemb@xxxxxxxxxx are queue-4.14/selftests-net-relax-cpu-affinity-requirement-in-msg_zerocopy-test.patch