Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4550168img; Tue, 26 Mar 2019 11:36:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwP4aK/4z3cUev06AKle7t4eOLF0XVkGva8sPRaySTmids0wvfumHHAGjqJR+hNjeoM9+Nc X-Received: by 2002:a62:205c:: with SMTP id g89mr30345708pfg.34.1553625412680; Tue, 26 Mar 2019 11:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553625412; cv=none; d=google.com; s=arc-20160816; b=TLuCp6NJSkOXELJlXtH5ExHhKAp7llujcGBK/Hm6kRLy+sNfw1xzZIbkmFvgvKc+MK VfVDRJEYZGUy2ioCgWAu5Vfhe/acD99UjvW6823Ld+7nklsc8amGostVfo7Evtv9Awjr rmwiGYLZY7GJuv6gQD6xrmp3lWTaqWIOJyAmy++QrOmKmtPOrCuh8EyWwR719liBp4Al wnnl3hQtGJ3+KkBsVRHfwDKnDNgsSPyx1PZSBBRz3GBtGyIhK8iwyKN6HxPhH07RGK3I 3QI1Uc6Ck0BJ/csXIsa1xvaayagaJln1wEaY49tuTukMXp/B7ErEzWEj4vDMgZwwu4cx Qsyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kmpk9W0ZCaK/ebb8oPI/qWfBv7rAFiSmONukNUeMwJ0=; b=eQb6H2f5tXdONDQcXwCsyyLD4XS6MOyAOAX9Rs6VQrKeUFrj/ozHBxLtgrv81qLCN5 bq0KT2GMspE3FINszmzMVd8RhL+tySMBb7rgSdF8tw2K5HC3Ji30jiBRzy6Cr8Vw5/+Q puwAjEHXC88PZ3gMe9dM++f2CyB//j8PJ9UQEu+X7/jkjMIOAr0/9uz1jgngRumNI6tB kgRhc2F7qcd66OpqGQM7ygMHaCBIvM1tyJXJeUb+n0routJzl0jEWj0MIQmZ2G1ujwLy 6G+ou38C1NIEOgMUkpD5U6h9UiOMLr/4DF+nJHrZVgBAvrWQUk9Rnhy7R4IuqhxoxFdx R4ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=wY3eNHEG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si9918368plt.197.2019.03.26.11.36.36; Tue, 26 Mar 2019 11:36:52 -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; dkim=pass header.i=@joelfernandes.org header.s=google header.b=wY3eNHEG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732568AbfCZSfx (ORCPT + 99 others); Tue, 26 Mar 2019 14:35:53 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38281 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731904AbfCZSfx (ORCPT ); Tue, 26 Mar 2019 14:35:53 -0400 Received: by mail-pf1-f196.google.com with SMTP id 10so8476343pfo.5 for ; Tue, 26 Mar 2019 11:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=kmpk9W0ZCaK/ebb8oPI/qWfBv7rAFiSmONukNUeMwJ0=; b=wY3eNHEG/yRmhlsTC6JAnMckrKhYRp2WoomN8dtsf65WeexdV5Ti/q01rQ9mVxbmS6 n9oMFK3J9wfx7BazdIJnGnoDUlsiIg5bUQHrbSC1sh6xBySDlyOTLGjMIYecBnQBCeTq iqcLXW4G5xVIKRxY/KKA8SrVF7DNg2bWgKxh8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=kmpk9W0ZCaK/ebb8oPI/qWfBv7rAFiSmONukNUeMwJ0=; b=tgwtPkL0lhRY+nmPKNph/cjqCJxf5VMxnz6kuXXo9JNpx8XOBuspJb1S1JM2uBWvA5 5QEgbR+rD1v1Td2Dg0qoQAp5PStbIol3lHWdWLasxwnQ38Qfu9qxGWVPtZ8V0PE0TzHS 15FM+2lZxXuIopxNsQjHp1uxg2cRs6Php/cdoIzMxflXFHQSn3gVKi3pMPizkW/idjzA MSy2bnpXLqlTNPLH1TspS4r9SMnCSQFT47xrQ1HobPZOTeeGfSBKzc9aMctQVZAa12sW 4gFKT5h0dy9uxK7KfCZHij1iyNRFBTfXrxUe5Bf8x/rCfMRnP/X2cnMCezM92vlqw1OP R9hg== X-Gm-Message-State: APjAAAWZ942tmP+XUSeHVy0fXEH9JMFn4MPOrrSiO5spYXNvmDYuWGGk lCmOIvYEfQoyxph94b0Hd1eHAg== X-Received: by 2002:a62:ab14:: with SMTP id p20mr32045961pff.23.1553625351898; Tue, 26 Mar 2019 11:35:51 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id s6sm26921416pfe.37.2019.03.26.11.35.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Mar 2019 11:35:50 -0700 (PDT) Date: Tue, 26 Mar 2019 14:35:49 -0400 From: Joel Fernandes To: "Paul E. McKenney" Cc: LKML , Josh Triplett , Lai Jiangshan , linux-kselftest , Mathieu Desnoyers , Shuah Khan , Steven Rostedt Subject: Re: [PATCH] rcutorture: Select from only online CPUs Message-ID: <20190326183549.GA162738@google.com> References: <20190323034619.15792-1-joel@joelfernandes.org> <20190325150133.GA4102@linux.ibm.com> <20190325164253.GE4102@linux.ibm.com> <20190326160140.GP4102@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190326160140.GP4102@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 26, 2019 at 09:01:40AM -0700, Paul E. McKenney wrote: > On Mon, Mar 25, 2019 at 06:40:17PM -0400, Joel Fernandes wrote: > > On Mon, Mar 25, 2019 at 12:42 PM Paul E. McKenney wrote: > > > > > > 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. ;-) > > > > Will do and then will update the patch by adding the CPU back, if all > > is well. Thanks. > > And rcutorture doesn't like the rcu_is_cpu_rrupt_from_idle() patch on > scenarios SRCU-P, TASKS01, and TREE05, which are the Tree RCU scenarios > that enable CONFIG_PROVE_RCU. The compiler error is: > > kernel/rcu/tree.c:391:2: error: implicit declaration of function ‘_this_cpu_read’ [-Werror=implicit-function-declaration] > > My guess is that the initial underscore needs to go. I will drop > these two patches in favor of an update from you. ;-) Sorry, I fixed that up and running tests now. By the way, may be you decided to not run the jitter on CPU0 just because on some systems, CPU0 does not have an 'online' file? In this case, the grep may throw errors I guess which troubles the script. From the old cpu hotplug docs, I found that if CONFIG_BOOTPARAM_HOTPLUG_CPU0 or cpu0_hotplug boot command line option is not passed, then cpu0 cannot be offlined in which case, presumably the 'online' file will be missing, like some systems I am testing on. thanks, - Joel