Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3412438img; Mon, 25 Mar 2019 09:45:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyb0+fZ9p5PMr7YeBzorwnjLf9rBD0dCPZ1SB1DfzET5+nJSAXpRuY0Z4tgRFmWuUK35bTI X-Received: by 2002:a17:902:690a:: with SMTP id j10mr26505898plk.103.1553532333447; Mon, 25 Mar 2019 09:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553532333; cv=none; d=google.com; s=arc-20160816; b=0dk86HwMg7GkUzU0Jo2KjW804QtUyyZtdX3/n/fyq5Xl3wx/F8UQIHahP2VbP8RdF7 MyCNpoKbCWNdaWZtZvMUk5ISsdymQV0fnvxLAfYQsieS/YwOEYT3YtehlTpxFY32a4z7 zzSyCNzN7v5KdxOWSHy1u+LONDKp1QLNFRSR9WEtArOpS72NIsMi7uzj8iHdSU2TFl9B gWWvLwuVCJZrA0aAzc+04akicfxssn9vkR9laOPv9tTfipR5StRipt3MGiDR/lAuO6FW e9iGk6+Q4AFfFYeOXC56dV06KNL6BuCj/QX/7rmPCAEcShpNFVsGWjDq+9Sm/Nbp4veX MEpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date; bh=YzggOCVTk/XiGyJK90zRN9OQezpS8aSwTGPzJcaLUCw=; b=NAva7Rq+7mO5zfxySGi0JAIP6mrbbFB2oPzneuFB+erozTXZbusJNx6wCCIV15SCs3 Gi3pM6zoubIvadSI07KfiWKmlLhtcb2HCi7PHztUvKs0WyIcp3sERjj6636rM9mSLcF1 7YKspSXnpmNKWXYoMC+h2r2adQ2ZT+fFZWBUizmU9K/SA2jmr/iwZIv0bNC8P2lKznnP saQ/Q4PDKOXVVSRdASDZCZfW87/XU+Opfz1ghK4WGYWy7nnTOa8XKwFxcPbYiZuc0hRV ljVLXrW4rIR2yn1J4B/fxZhiC4BBXNCMx44FspUWe5yQIuXXtEIkKQfuwm52NlF5KMki 4OwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 193si3596631pfv.108.2019.03.25.09.45.18; Mon, 25 Mar 2019 09:45:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729744AbfCYQm7 (ORCPT + 99 others); Mon, 25 Mar 2019 12:42:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57632 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725795AbfCYQm7 (ORCPT ); Mon, 25 Mar 2019 12:42:59 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2PGUDlm059936 for ; Mon, 25 Mar 2019 12:42:58 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rf0ss79ga-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 25 Mar 2019 12:42:57 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 25 Mar 2019 16:42:56 -0000 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 25 Mar 2019 16:42:53 -0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2PGgqqC26148930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Mar 2019 16:42:52 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A40CFB2064; Mon, 25 Mar 2019 16:42:52 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 86560B2065; Mon, 25 Mar 2019 16:42:52 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.188]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 25 Mar 2019 16:42:52 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id B4F0216C42B1; Mon, 25 Mar 2019 09:42:53 -0700 (PDT) Date: Mon, 25 Mar 2019 09:42:53 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: LKML , Josh Triplett , Lai Jiangshan , linux-kselftest , Mathieu Desnoyers , Shuah Khan , Steven Rostedt Subject: Re: [PATCH] rcutorture: Select from only online CPUs Reply-To: paulmck@linux.ibm.com References: <20190323034619.15792-1-joel@joelfernandes.org> <20190325150133.GA4102@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 19032516-0072-0000-0000-000004101EC2 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010812; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000282; SDB=6.01179527; UDB=6.00617206; IPR=6.00960238; MB=3.00026149; MTD=3.00000008; XFM=3.00000015; UTC=2019-03-25 16:42:55 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19032516-0073-0000-0000-00004B99E41A Message-Id: <20190325164253.GE4102@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-25_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903250122 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 25, 2019 at 12:33:37PM -0400, Joel Fernandes wrote: > On Mon, Mar 25, 2019 at 11:02 AM Paul E. McKenney wrote: > > > > On Fri, Mar 22, 2019 at 11:46:19PM -0400, Joel Fernandes (Google) wrote: > > > The rcutorture jitter.sh script selects a random CPU but does not check > > > if it is offline or online. This leads to taskset errors many times. On > > > my machine, hyper threading is disabled so half the cores are offline > > > causing taskset errors a lot of times. Let us fix this by checking from > > > only the online CPUs on the system. > > > > > > Signed-off-by: Joel Fernandes (Google) > > > > Good catch! > > > > Please see below for one suggestion for simplification. > > > > Thanx, Paul > > > > > --- > > > tools/testing/selftests/rcutorture/bin/jitter.sh | 11 ++++++++++- > > > 1 file changed, 10 insertions(+), 1 deletion(-) > > > > > > diff --git a/tools/testing/selftests/rcutorture/bin/jitter.sh b/tools/testing/selftests/rcutorture/bin/jitter.sh > > > index 3633828375e3..53bf9d99b5cd 100755 > > > --- a/tools/testing/selftests/rcutorture/bin/jitter.sh > > > +++ b/tools/testing/selftests/rcutorture/bin/jitter.sh > > > @@ -47,10 +47,19 @@ do > > > exit 0; > > > fi > > > > > > - # Set affinity to randomly selected CPU > > > + # Set affinity to randomly selected online CPU > > > cpus=`ls /sys/devices/system/cpu/*/online | > > > > cpus=`grep 1 /sys/devices/system/cpu/*/online | > > Yes, this is better. Lets do it this way :) > > > > sed -e 's,/[^/]*$,,' -e 's/^[^0-9]*//' | > > > grep -v '^0*$'` > > > > Of course, now I have no idea why I excluded CPU 0... :-/ > > Yes, I was wondering as well about that :-) Please feel free to try including CPU 0 and running the set of single-CPU rcutorture scenarios. ;-) Thanx, Paul