From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933205AbcFOW2m (ORCPT ); Wed, 15 Jun 2016 18:28:42 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38103 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932290AbcFOW2f (ORCPT ); Wed, 15 Jun 2016 18:28:35 -0400 X-IBM-Helo: d01dlp02.pok.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com, "Paul E. McKenney" Subject: [PATCH tip/core/rcu 2/8] waketorture: Update scripting to accommodate waketorture Date: Wed, 15 Jun 2016 15:28:22 -0700 X-Mailer: git-send-email 2.5.2 In-Reply-To: <20160615222756.GA10695@linux.vnet.ibm.com> References: <20160615222756.GA10695@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16061522-0040-0000-0000-000000935112 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16061522-0041-0000-0000-0000046D2F2C Message-Id: <1466029708-11359-2-git-send-email-paulmck@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-15_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606150236 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit adds the scripting changes to add support for the shiny new waketorture kernel module. Signed-off-by: Paul E. McKenney --- .../selftests/rcutorture/bin/kvm-recheck-wake.sh | 39 ++++++++++++++++++++ .../selftests/rcutorture/bin/kvm-recheck.sh | 2 +- tools/testing/selftests/rcutorture/bin/kvm.sh | 2 +- .../selftests/rcutorture/configs/wake/CFLIST | 1 + .../selftests/rcutorture/configs/wake/CFcommon | 2 + .../testing/selftests/rcutorture/configs/wake/STI | 19 ++++++++++ .../selftests/rcutorture/configs/wake/STI.boot | 1 + .../rcutorture/configs/wake/ver_functions.sh | 43 ++++++++++++++++++++++ 8 files changed, 107 insertions(+), 2 deletions(-) create mode 100755 tools/testing/selftests/rcutorture/bin/kvm-recheck-wake.sh create mode 100644 tools/testing/selftests/rcutorture/configs/wake/CFLIST create mode 100644 tools/testing/selftests/rcutorture/configs/wake/CFcommon create mode 100644 tools/testing/selftests/rcutorture/configs/wake/STI create mode 100644 tools/testing/selftests/rcutorture/configs/wake/STI.boot create mode 100644 tools/testing/selftests/rcutorture/configs/wake/ver_functions.sh diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-wake.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-wake.sh new file mode 100755 index 000000000000..fc9ee1920acb --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-wake.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# +# Analyze a given results directory for waketorture diagnostics. +# +# Usage: kvm-recheck-wake resdir +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. +# +# Copyright (C) IBM Corporation, 2016 +# +# Authors: Paul E. McKenney + +i="$1" +if test -d $i +then + : +else + echo Unreadable results directory: $i + exit 1 +fi +PATH=`pwd`/tools/testing/selftests/rcutorture/bin:$PATH; export PATH +. tools/testing/selftests/rcutorture/bin/functions.sh + +configfile=`echo $i | sed -e 's/^.*\///'` + +sed -e 's/^\[[^]]*]//' < $i/console.log | grep -e -torture | + grep "Tardy kthreads" | tail -1 diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh index f659346d3358..060c1eec73f4 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh @@ -48,7 +48,7 @@ do cat $i/Make.oldconfig.err fi parse-build.sh $i/Make.out $configfile - if test "$TORTURE_SUITE" != rcuperf + if test "$TORTURE_SUITE" != rcuperf -a "$TORTURE_SUITE" != wake then parse-torture.sh $i/console.log $configfile fi diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 0aed965f0062..0109ddf7b666 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -163,7 +163,7 @@ do shift ;; --torture) - checkarg --torture "(suite name)" "$#" "$2" '^\(lock\|rcu\|rcuperf\)$' '^--' + checkarg --torture "(suite name)" "$#" "$2" '^\(lock\|rcu\|rcuperf\|wake\)$' '^--' TORTURE_SUITE=$2 shift ;; diff --git a/tools/testing/selftests/rcutorture/configs/wake/CFLIST b/tools/testing/selftests/rcutorture/configs/wake/CFLIST new file mode 100644 index 000000000000..850c262a6226 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/wake/CFLIST @@ -0,0 +1 @@ +STI diff --git a/tools/testing/selftests/rcutorture/configs/wake/CFcommon b/tools/testing/selftests/rcutorture/configs/wake/CFcommon new file mode 100644 index 000000000000..ffba1816cb6c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/wake/CFcommon @@ -0,0 +1,2 @@ +CONFIG_WAKE_TORTURE_TEST=y +CONFIG_PRINTK_TIME=y diff --git a/tools/testing/selftests/rcutorture/configs/wake/STI b/tools/testing/selftests/rcutorture/configs/wake/STI new file mode 100644 index 000000000000..7a17c503b382 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/wake/STI @@ -0,0 +1,19 @@ +CONFIG_SMP=y +CONFIG_NR_CPUS=16 +CONFIG_PREEMPT_NONE=n +CONFIG_PREEMPT_VOLUNTARY=n +CONFIG_PREEMPT=y +#CHECK#CONFIG_PREEMPT_RCU=y +CONFIG_HZ_PERIODIC=y +CONFIG_NO_HZ_IDLE=n +CONFIG_NO_HZ_FULL=n +CONFIG_RCU_TRACE=y +CONFIG_HOTPLUG_CPU=y +CONFIG_RCU_FANOUT=2 +CONFIG_RCU_FANOUT_LEAF=2 +CONFIG_RCU_NOCB_CPU=n +CONFIG_DEBUG_LOCK_ALLOC=n +CONFIG_RCU_BOOST=y +CONFIG_RCU_KTHREAD_PRIO=2 +CONFIG_DEBUG_OBJECTS_RCU_HEAD=n +CONFIG_RCU_EXPERT=y diff --git a/tools/testing/selftests/rcutorture/configs/wake/STI.boot b/tools/testing/selftests/rcutorture/configs/wake/STI.boot new file mode 100644 index 000000000000..67ac1ad46672 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/wake/STI.boot @@ -0,0 +1 @@ +rcupdate.rcu_expedited waketorture.torture_type=sti diff --git a/tools/testing/selftests/rcutorture/configs/wake/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/wake/ver_functions.sh new file mode 100644 index 000000000000..7331a1884d99 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/wake/ver_functions.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# +# Kernel-version-dependent shell functions for the rest of the scripts. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. +# +# Copyright (C) IBM Corporation, 2016 +# +# Authors: Paul E. McKenney + +# waketorture_param_onoff bootparam-string config-file +# +# Adds onoff waketorture module parameters to kernels having it. +waketorture_param_onoff () { + if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2" + then + echo CPU-hotplug kernel, adding waketorture onoff. 1>&2 + echo waketorture.onoff_interval=50 waketorture.onoff_holdoff=30 + fi +} + +# per_version_boot_params bootparam-string config-file seconds +# +# Adds per-version torture-module parameters to kernels supporting them. +per_version_boot_params () { + echo $1 `waketorture_param_onoff "$1" "$2"` \ + waketorture.stat_interval=15 \ + waketorture.shutdown_secs=$3 \ + waketorture.torture_runnable=1 \ + waketorture.verbose=1 +} -- 2.5.2