Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4415283pxa; Mon, 10 Aug 2020 08:33:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTvp7QpqvMhP879V/CDqxwMy+ltJoVb0GjwuJnvGRqzIm6EPKPKSa2LRBKCdVsnYfg8e6y X-Received: by 2002:a17:906:4d89:: with SMTP id s9mr21176239eju.365.1597073623018; Mon, 10 Aug 2020 08:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597073623; cv=none; d=google.com; s=arc-20160816; b=p/KPEgMrQj9ta/jY8MjvZuVJBkD7PhvgRyT/M0sHNAI06S87wyWfYGZtYJhYAmoQ+I HP6slexJ5trf4KH7SrLyjzdvpZ/2wosQit0BJEU54++0Mhg2t3L86XQiD7rBr1BCq508 ojU9LY/w1Rps/kL0Pm8y6m/7NQGfK9OTCRlcsdlHmJbncniJ97EGuTe++wX9MazsI9hF wI6dFfXMYetIYIRx1c3QCtJS/Ym/uWe8zXatNhpn5HEI0RvqEug/wQQkUL03pI6r1VlK hUmb8r4fK9RPT5UmvOVd7I5xaFSUA5W8yV5qLJSrhsHN9qYXQgnvEg5UwZPZDfizCGn9 smPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BtrLGFLc7asdkQbGjqcSY2kOKzSLemiWuN3tJKfQh8Q=; b=sBI1VjMCTFJ19HoBVWsMop1NJH3w2xSgPX+0orUg8MydjH6quR2xKIVb/CZ8recgwX E+Xet6ih/GPJ2GPRPBpAYH6/KsMyWq0RbGHPi5EQZHWGntIep9caFNCEz4u2EkPk9ucV iA4TlF3T3XlnY5hIS6VxnET9hmsYcQBqKcElHv1ebA/JU/2DSCYA2s2bKbE2vBavwdGE 08iKe1lzUVt7aM0aOux1a/yx4Wof+E4hbUeYni4AvOLcLuMNr8bSkt3zogRoy8t1twZU HQ+lUg4IWH0OTakJ9dyLKIsIY6IS/F33RjAdpdsP1OyyDsliaOPYPA0RkN033/tveB8H Zn9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0SVUtQX8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si13007222edb.100.2020.08.10.08.33.19; Mon, 10 Aug 2020 08:33:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0SVUtQX8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728785AbgHJPay (ORCPT + 99 others); Mon, 10 Aug 2020 11:30:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:37902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728898AbgHJPat (ORCPT ); Mon, 10 Aug 2020 11:30:49 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D7290207FF; Mon, 10 Aug 2020 15:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597073448; bh=yDP87lINzHFiLkOkm6RlyKNPAAeN6uTzlS7Nkl4gNvc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0SVUtQX8HrIOabhrD4KQuXftMCjRgVGdT+wdM9H3BIzaLgDB8O54gTPO539lkhlj9 xidKUfz3XGDuZqjGeuiF4NABqsubwXtvoUNAqrfHaAW52Sdg+YM0RcHvnqh14g2BSe WI50e79oVSQkhsu/iI/SMwa6LXov3lLCIT6/dSXw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Willem de Bruijn , "David S. Miller" 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 Message-Id: <20200810151806.286411554@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200810151804.199494191@linuxfoundation.org> References: <20200810151804.199494191@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Willem de Bruijn [ 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 Signed-off-by: Willem de Bruijn Acked-by: Colin Ian King Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- 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;