From patchwork Tue Mar 26 19:24:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 10872111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CCC3C15AC for ; Tue, 26 Mar 2019 19:24:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9E6120950 for ; Tue, 26 Mar 2019 19:24:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD0A728AB8; Tue, 26 Mar 2019 19:24:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CA4F20950 for ; Tue, 26 Mar 2019 19:24:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732636AbfCZTYj (ORCPT ); Tue, 26 Mar 2019 15:24:39 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:43441 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732622AbfCZTYi (ORCPT ); Tue, 26 Mar 2019 15:24:38 -0400 Received: by mail-pl1-f196.google.com with SMTP id m10so2092980plt.10 for ; Tue, 26 Mar 2019 12:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9xe2cnKgj2u/5e350AhnUZqGhZDwjch2potbZGjEHUM=; b=v/VOm10tv19N25u4AXHbxwGBxHou9OBjaSYgwhqnd9yTlGqrc6cJ0pZyoTS1BIvrpJ r4fvbu/5qL9sC0M4MnERILS/2oPRyhlTlSjFPLbSOdYmZsmuF67L3ISWgQOtHavmn9SM H/DTQ/dbDqIiWwZd5Hi26iBq9B6ZYC65e3e2M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9xe2cnKgj2u/5e350AhnUZqGhZDwjch2potbZGjEHUM=; b=kLANae5DtYkW2x+XU30v4dbAvLInvJlAVTbsG9em0uIq8eeCcmvBp7Beu0WpQCCb9O 5b1Fw8Wg3f+bX27Q1N3ulOpXbRBzToqLo2gpYVXYXg5pHtUa/VE/PH9y1yCg3TZ1Rsyj 48Ot43TMLxyzvjEahCdr7FAvnJSCPkrLSdMMRg+FQUDnFynkA3QJaXgz5w8v/BC9CQPX VgWzNnD6C5FcIn1B4m816N5k/i2olX+2bKwsoUmcCSBM6ZNWgGn7asKDIwLy2nmuGaNT M+g1N6HgpynkVsiQPlLWVfFmpQjqd+gZewKLTntgiXCBINage9nv52EDe4zJAEBcfdCn 1c9w== X-Gm-Message-State: APjAAAX9OgOejMzVDfaRsGNQareIYVwTGL9BV7lGYQnHUR/oV3N9jsVz 8aq/ZjrCvUExVsrDM9ZsxDJMPQ== X-Google-Smtp-Source: APXvYqwMJ3hs4xED/sxyQLZzrjezrjuatGt1jM2/TtrZQmpPXSsOJnh8yMCjdjiUOwVv9nMh0rSFxQ== X-Received: by 2002:a17:902:2c01:: with SMTP id m1mr32840752plb.186.1553628278149; Tue, 26 Mar 2019 12:24:38 -0700 (PDT) Received: from joelaf.cam.corp.google.com ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id l12sm36761889pgn.83.2019.03.26.12.24.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 12:24:37 -0700 (PDT) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org Cc: "Joel Fernandes (Google)" , byungchul.park@lge.com, Ingo Molnar , Josh Triplett , kernel-team@android.com, Lai Jiangshan , linux-kselftest@vger.kernel.org, Mathieu Desnoyers , "Paul E. McKenney" , Peter Zijlstra , rcu@vger.kernel.org, Shuah Khan , Steven Rostedt , Will Deacon Subject: [PATCH v2 4/4] rcutorture: Add cpu0 to the set of CPUs to add jitter Date: Tue, 26 Mar 2019 15:24:11 -0400 Message-Id: <20190326192411.198070-4-joel@joelfernandes.org> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog In-Reply-To: <20190326192411.198070-1-joel@joelfernandes.org> References: <20190326192411.198070-1-joel@joelfernandes.org> MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP jitter.sh currently does not add CPU0 to the list of CPUs for adding of jitter. Let us add it to this list even when it is not hot-pluggable. Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/rcutorture/bin/jitter.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/jitter.sh b/tools/testing/selftests/rcutorture/bin/jitter.sh index 47bd9829dc55..26faf5824a1f 100755 --- a/tools/testing/selftests/rcutorture/bin/jitter.sh +++ b/tools/testing/selftests/rcutorture/bin/jitter.sh @@ -49,8 +49,12 @@ do # Set affinity to randomly selected online CPU cpus=`grep 1 /sys/devices/system/cpu/*/online | - sed -e 's,/[^/]*$,,' -e 's/^[^0-9]*//' | - grep -v '^0*$'` + sed -e 's,/[^/]*$,,' -e 's/^[^0-9]*//'` + + # Do not leave out poor old cpu0 which may not be hot-pluggable + if [ ! -f "/sys/devices/system/cpu/cpu0/online" ]; then + cpus="0 $cpus" + fi cpumask=`awk -v cpus="$cpus" -v me=$me -v n=$n 'BEGIN { srand(n + me + systime());