stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Colin Ian King <colin.king@canonical.com>,
	Willem de Bruijn <willemb@google.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 4.19 42/48] selftests/net: relax cpu affinity requirement in msg_zerocopy test
Date: Mon, 10 Aug 2020 17:22:04 +0200	[thread overview]
Message-ID: <20200810151806.286411554@linuxfoundation.org> (raw)
In-Reply-To: <20200810151804.199494191@linuxfoundation.org>

From: Willem de Bruijn <willemb@google.com>

[ 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 |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- a/tools/testing/selftests/net/msg_zerocopy.c
+++ b/tools/testing/selftests/net/msg_zerocopy.c
@@ -125,9 +125,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;



  parent reply	other threads:[~2020-08-10 15:30 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 15:21 [PATCH 4.19 00/48] 4.19.139-rc1 review Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 01/48] USB: serial: qcserial: add EM7305 QDL product ID Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 02/48] USB: iowarrior: fix up report size handling for some devices Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 03/48] usb: xhci: define IDs for various ASMedia host controllers Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 04/48] usb: xhci: Fix ASMedia ASM1142 DMA addressing Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 05/48] Revert "ALSA: hda: call runtime_allow() for all hda controllers" Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 06/48] ALSA: seq: oss: Serialize ioctls Greg Kroah-Hartman
2020-08-10 16:37   ` Pavel Machek
2020-08-10 17:29     ` Greg Kroah-Hartman
2020-08-10 17:53     ` Takashi Iwai
2020-08-10 15:21 ` [PATCH 4.19 07/48] staging: android: ashmem: Fix lockdep warning for write operation Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 08/48] Bluetooth: Fix slab-out-of-bounds read in hci_extended_inquiry_result_evt() Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 09/48] Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_evt() Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 10/48] Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_with_rssi_evt() Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 11/48] omapfb: dss: Fix max fclk divider for omap36xx Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 12/48] binder: Prevent context manager from incrementing ref 0 Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 13/48] vgacon: Fix for missing check in scrollback handling Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 14/48] mtd: properly check all write ioctls for permissions Greg Kroah-Hartman
2020-08-10 16:38   ` Pavel Machek
2020-08-10 18:40     ` Richard Weinberger
2020-08-10 15:21 ` [PATCH 4.19 15/48] leds: wm831x-status: fix use-after-free on unbind Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 16/48] leds: da903x: " Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 17/48] leds: lm3533: " Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 18/48] leds: 88pm860x: " Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 19/48] net/9p: validate fds in p9_fd_open Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 20/48] drm/nouveau/fbcon: fix module unload when fbcon init has failed for some reason Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 21/48] drm/nouveau/fbcon: zero-initialise the mode_cmd2 structure Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 22/48] i2c: slave: improve sanity check when registering Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 23/48] i2c: slave: add sanity check when unregistering Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 24/48] usb: hso: check for return value in hso_serial_common_create() Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 25/48] firmware: Fix a reference count leak Greg Kroah-Hartman
2020-08-10 16:41   ` Pavel Machek
2020-08-10 15:21 ` [PATCH 4.19 26/48] cfg80211: check vendor command doit pointer before use Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 27/48] igb: reinit_locked() should be called with rtnl_lock Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 28/48] atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 29/48] tools lib traceevent: Fix memory leak in process_dynamic_array_len Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 30/48] Drivers: hv: vmbus: Ignore CHANNELMSG_TL_CONNECT_RESULT(23) Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 31/48] xattr: break delegations in {set,remove}xattr Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 32/48] ipv4: Silence suspicious RCU usage warning Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 33/48] ipv6: fix memory leaks on IPV6_ADDRFORM path Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 34/48] net: ethernet: mtk_eth_soc: fix MTU warnings Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 35/48] vxlan: Ensure FDB dump is performed under RCU Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 36/48] net: lan78xx: replace bogus endpoint lookup Greg Kroah-Hartman
2020-08-10 15:21 ` [PATCH 4.19 37/48] hv_netvsc: do not use VF device if link is down Greg Kroah-Hartman
2020-08-10 15:22 ` [PATCH 4.19 38/48] net: gre: recompute gre csum for sctp over gre tunnels Greg Kroah-Hartman
2020-08-10 15:22 ` [PATCH 4.19 39/48] net: thunderx: use spin_lock_bh in nicvf_set_rx_mode_task() Greg Kroah-Hartman
2020-08-10 15:22 ` [PATCH 4.19 40/48] openvswitch: Prevent kernel-infoleak in ovs_ct_put_key() Greg Kroah-Hartman
2020-08-10 15:22 ` [PATCH 4.19 41/48] Revert "vxlan: fix tos value before xmit" Greg Kroah-Hartman
2020-08-10 15:22 ` Greg Kroah-Hartman [this message]
2020-08-10 15:22 ` [PATCH 4.19 43/48] rxrpc: Fix race between recvmsg and sendmsg on immediate call failure Greg Kroah-Hartman
2020-08-10 15:22 ` [PATCH 4.19 44/48] i40e: add num_vectors checker in iwarp handler Greg Kroah-Hartman
2020-08-10 15:22 ` [PATCH 4.19 45/48] i40e: Wrong truncation from u16 to u8 Greg Kroah-Hartman
2020-08-10 15:22 ` [PATCH 4.19 46/48] i40e: Fix of memory leak and integer truncation in i40e_virtchnl.c Greg Kroah-Hartman
2020-08-10 15:22 ` [PATCH 4.19 47/48] i40e: Memory leak in i40e_config_iwarp_qvlist Greg Kroah-Hartman
2020-08-11 12:46   ` Pavel Machek
2020-08-11 16:45     ` Jesse Brandeburg
2020-08-10 15:22 ` [PATCH 4.19 48/48] Smack: fix use-after-free in smk_write_relabel_self() Greg Kroah-Hartman
2020-08-10 23:12 ` [PATCH 4.19 00/48] 4.19.139-rc1 review Shuah Khan
2020-08-11  7:56 ` Jon Hunter
2020-08-11  8:28 ` Naresh Kamboju
2020-08-11  8:32 ` Pavel Machek
2020-08-11 14:22 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200810151806.286411554@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).