Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp877809pxb; Thu, 5 Nov 2020 15:50:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqrWLeHfUwMW2lG/rAsUQC7UoenMP+Q/zdMOIEYIVabPnhB9cMdNecUnzo7pEMOpqSbqhS X-Received: by 2002:aa7:c4c2:: with SMTP id p2mr5451359edr.371.1604620244063; Thu, 05 Nov 2020 15:50:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604620244; cv=none; d=google.com; s=arc-20160816; b=Xgrbb2xx9also0orQfQfBCigNvL0JjUEr+pKchETomQQ0FLG/DAT2kKy6e0EzoOXaR YJy5+5PJoh3L/1Vj/qAG7q2Jp4NLe7fKndllsvvqpJqfwAN0FWsRVmUWqtNZsUYB/pDC 8U/quihPnrguJLZJr9FrXcOK7j/YPXZbTsOCmbtlnmzf60u+NXEfQHpXGe0UBOREEVS1 inULsTxXiXfkSNpiKHnnT7qvmGKHvCi6ACdWP86WcWCsVWU1F/hCXB7WM5rzHix2BZrK jLW4wFNmOjQDocYCIqwPAXDZJl4BKqhQBHWL0vABrNAPQOSk8SyimIoRb+qap6pusQ7s R4MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=Guym+t1y4vTL4mnwOY2J0iR7Ub6zTwoMuTeQ1hNrzbo=; b=eNPaehUmG3SnYvwDURXUdejybjGhiq92x1KLlVrW6G7BI1RZdZAxbnWsydOYqqBjrG plUZqGPwSpxUkqDsAlKAqLcGQHsN/tZBwoK61MMACqxC/IECIy2RJhxDB/a82w7Wtd7N Gn8xNwKW7DKbNCG+fCROUwyNpVFbxzxz07ziOrmrO0cbPIgGD402ItoxxF2dL9zYAYda Fcrx+PJKCVMD/0RbLJ9NZFwlF334Dt5d+NNL+4PLc+73ObJNDGYK/MS3GuUBjF8K44Ub M39OTt5NYkOFlNnhTE1hKzkLKxRg/2IKHJlZy/+KtR3TPSsFfGJ02CMg9ZTwq8R4D0jQ ZzIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OS4ZqLS8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si2179320ejj.113.2020.11.05.15.50.21; Thu, 05 Nov 2020 15:50:44 -0800 (PST) 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=OS4ZqLS8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732979AbgKEXs1 (ORCPT + 99 others); Thu, 5 Nov 2020 18:48:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:46062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732778AbgKEXra (ORCPT ); Thu, 5 Nov 2020 18:47:30 -0500 Received: from paulmck-ThinkPad-P72.home (50-39-104-11.bvtn.or.frontiernet.net [50.39.104.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 96DC222244; Thu, 5 Nov 2020 23:47:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604620049; bh=9AGY6DA5OVMpS1095TpRRCpJtZFekTi8ozI5Zdqjq68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OS4ZqLS8J45wnrbG1GyCM02HwfxJvlA6gGkDEz6VO4voH0esOnq3un38U5QCEBBJS OkrE1zQUBT4oOyiFNBoBF7O0mW5drZYDvDNZMqlnbyBGtnPWq0HM+If3Uy2gRgkcOv 3NIjFfka8cwlhyx26Lc6Nm63sQbgc43eo+VCYME8= From: paulmck@kernel.org To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, mingo@kernel.org, jiangshanlai@gmail.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, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, "Paul E. McKenney" Subject: [PATCH tip/core/rcu 22/28] scftorture: Add full-test stutter capability Date: Thu, 5 Nov 2020 15:47:13 -0800 Message-Id: <20201105234719.23307-22-paulmck@kernel.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20201105234658.GA23142@paulmck-ThinkPad-P72> References: <20201105234658.GA23142@paulmck-ThinkPad-P72> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Paul E. McKenney" In virtual environments on systems with hardware assist, inter-processor interrupts must do very different things based on whether the target vCPU is running or not. This commit therefore enables torture-test stuttering to better test these running/not-running transitions. Suggested-by: Chris Mason Signed-off-by: Paul E. McKenney --- kernel/scftorture.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/kernel/scftorture.c b/kernel/scftorture.c index 3fbb7a7..d55a9f8 100644 --- a/kernel/scftorture.c +++ b/kernel/scftorture.c @@ -59,7 +59,7 @@ torture_param(int, onoff_holdoff, 0, "Time after boot before CPU hotplugs (s)"); torture_param(int, onoff_interval, 0, "Time between CPU hotplugs (s), 0=disable"); torture_param(int, shutdown_secs, 0, "Shutdown time (ms), <= zero to disable."); torture_param(int, stat_interval, 60, "Number of seconds between stats printk()s."); -torture_param(int, stutter_cpus, 5, "Number of jiffies to change CPUs under test, 0=disable"); +torture_param(int, stutter, 5, "Number of jiffies to run/halt test, 0=disable"); torture_param(bool, use_cpus_read_lock, 0, "Use cpus_read_lock() to exclude CPU hotplug."); torture_param(int, verbose, 0, "Enable verbose debugging printk()s"); torture_param(int, weight_resched, -1, "Testing weight for resched_cpu() operations."); @@ -436,6 +436,7 @@ static int scftorture_invoker(void *arg) was_offline = false; } cond_resched(); + stutter_wait("scftorture_invoker"); } while (!torture_must_stop()); VERBOSE_SCFTORTOUT("scftorture_invoker %d ended", scfp->cpu); @@ -448,8 +449,8 @@ static void scftorture_print_module_parms(const char *tag) { pr_alert(SCFTORT_FLAG - "--- %s: verbose=%d holdoff=%d longwait=%d nthreads=%d onoff_holdoff=%d onoff_interval=%d shutdown_secs=%d stat_interval=%d stutter_cpus=%d use_cpus_read_lock=%d, weight_resched=%d, weight_single=%d, weight_single_wait=%d, weight_many=%d, weight_many_wait=%d, weight_all=%d, weight_all_wait=%d\n", tag, - verbose, holdoff, longwait, nthreads, onoff_holdoff, onoff_interval, shutdown, stat_interval, stutter_cpus, use_cpus_read_lock, weight_resched, weight_single, weight_single_wait, weight_many, weight_many_wait, weight_all, weight_all_wait); + "--- %s: verbose=%d holdoff=%d longwait=%d nthreads=%d onoff_holdoff=%d onoff_interval=%d shutdown_secs=%d stat_interval=%d stutter=%d use_cpus_read_lock=%d, weight_resched=%d, weight_single=%d, weight_single_wait=%d, weight_many=%d, weight_many_wait=%d, weight_all=%d, weight_all_wait=%d\n", tag, + verbose, holdoff, longwait, nthreads, onoff_holdoff, onoff_interval, shutdown, stat_interval, stutter, use_cpus_read_lock, weight_resched, weight_single, weight_single_wait, weight_many, weight_many_wait, weight_all, weight_all_wait); } static void scf_cleanup_handler(void *unused) @@ -558,6 +559,11 @@ static int __init scf_torture_init(void) if (firsterr) goto unwind; } + if (stutter > 0) { + firsterr = torture_stutter_init(stutter, stutter); + if (firsterr) + goto unwind; + } // Worker tasks invoking smp_call_function(). if (nthreads < 0) -- 2.9.5