Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp744172pxt; Thu, 5 Aug 2021 10:32:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQYl+H/sfqE1YCk4DjeCvSkS4HV2ngFakqu1AbnH1NwMvtmlcsGBKXUq2pPHFjd1rANg3b X-Received: by 2002:a05:6638:2590:: with SMTP id s16mr1879526jat.121.1628184731562; Thu, 05 Aug 2021 10:32:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628184731; cv=none; d=google.com; s=arc-20160816; b=XRr6A9zSKpoohLPxfUaATLXCTQTuZkA00MwycN0ijhp4jhLPXVXB4QcrazUrm127sk HEEqrobgZxBuidCik6xE59QuKMlQmb1QVK6USswm2hK6upAmeAjq6f6IUwwdHEJDBxqj BVRxSuZUnjll4YDd2rBk+7d3GPEUhYemFXqXOUOXkJbXNwm8OSzGFogg70id6FmihLmU sRGOqwY97PG/QR2ra8GezDf8ybT7jgaX4yzT4cOdvHd8thxWG4NCY11W1Yjl+c21pORC cL/7CbTtNEzlCisB+qK7WZNZBNnFGGDyu+drjyXmGyYATiWIOjfJrl5RrSpnUfy/v6NQ iSpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=62B9q9mKdkE0H55fvI7l6WkX3wjuTCYr4P43jdfMoNU=; b=sxCXGmQQ+Cd3FdjAkpeKOwUcgLrC1qadHKUXLsKv01F5/8xwuSBFo0VY7rklYdArDY 6h8F0/OcywLo20HXM/25nUJpkjjn2KcSMmAYuykWru7MG6nfOPWBvXJvXUdINUSb/qCJ u5PyUGvukd4JgjEc8YQB/W9sGupc8Pmgw3Yxr4A0beDZ9SFzc1VbM76yX8YVfSR/MOgB iJ5C6mU44VurmmWsULymeqMFBasxaPzoWimKb1KeJOnrivRjZDKTJSFYgH4mRFPJVk5o SyKo72RQrYtP78Qlh5+BJp79u2aYluf7oi95Bddv5xo+IMSNK29/VqOHMV1YXYT8j8oz roxg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si7748543ill.48.2021.08.05.10.31.58; Thu, 05 Aug 2021 10:32:11 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241138AbhHELwK (ORCPT + 99 others); Thu, 5 Aug 2021 07:52:10 -0400 Received: from foss.arm.com ([217.140.110.172]:43352 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241116AbhHELwJ (ORCPT ); Thu, 5 Aug 2021 07:52:09 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 317291042; Thu, 5 Aug 2021 04:51:55 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 429323F719; Thu, 5 Aug 2021 04:51:53 -0700 (PDT) From: Valentin Schneider To: paulmck@kernel.org Cc: linux-kernel@vger.kernel.org, rcu@vger.kernel.org, linux-rt-users@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , Frederic Weisbecker , Josh Triplett , Davidlohr Bueso , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes Subject: Re: [PATCH 2/2] rcutorture: Nudge ksoftirqd priority for RCU boost testing In-Reply-To: <20210804225332.GB4397@paulmck-ThinkPad-P17-Gen-1> References: <20210803225437.3612591-1-valentin.schneider@arm.com> <20210803225437.3612591-3-valentin.schneider@arm.com> <20210803234231.GW4397@paulmck-ThinkPad-P17-Gen-1> <87tuk5a4yk.mognet@arm.com> <20210804225332.GB4397@paulmck-ThinkPad-P17-Gen-1> Date: Thu, 05 Aug 2021 12:51:48 +0100 Message-ID: <87mtpw9kiz.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/08/21 15:53, Paul E. McKenney wrote: > On Wed, Aug 04, 2021 at 11:18:11AM +0100, Valentin Schneider wrote: >> >> Hm so v5.13-rt1 has this commit: >> >> 5e59fba573e6 ("rcutorture: Fix testing of RCU priority boosting") >> >> which gates RCU boost torture testing under CONFIG_PREEMPT_RT. Now, AFAICT >> the TIMER_SOFTIRQ priority problem is there regardless of >> CONFIG_PREEMPT_RT, so this patch would (should?) make sense even on >> !CONFIG_PREEMPT_RT. > > What rcutorture scenario TREE03 does is to boot with tree.use_softirq=0 > and threadirqs. I see your point about timers and softirq, but this > does run reliably for me. > > Ah, I see why. Commit ea6d962e80b6 ("rcutorture: Judge RCU priority > boosting on grace periods, not callbacks") includes boosting the priority > of the ksoftirqd kthreads. But only when running rcutorture builtin, > not as a module. Here is the code in rcu_torture_init(): > > // Testing RCU priority boosting requires rcutorture do > // some serious abuse. Counter this by running ksoftirqd > // at higher priority. > if (IS_BUILTIN(CONFIG_RCU_TORTURE_TEST)) { > for_each_online_cpu(cpu) { > struct sched_param sp; > struct task_struct *t; > > t = per_cpu(ksoftirqd, cpu); > WARN_ON_ONCE(!t); > sp.sched_priority = 2; > sched_setscheduler_nocheck(t, SCHED_FIFO, &sp); > } > } > > I take it that you were running rcutorture as a module? > > This describes how to run it built-in, if that works for you: > > https://paulmck.livejournal.com/61432.html > > More specifically: https://paulmck.livejournal.com/57769.html > > Alternatively, the "IS_BUILTIN(CONFIG_RCU_TORTURE_TEST)" check could be > removed in the above code, and the ksoftirqd kthreads could have their > original priority restored in rcu_torture_cleanup(). > > Thoughts? > I actually run rcutorture as a builtin, but from what I can tell the above patch came in v5.14-rc1, and ofc I'm running my tests on v5.13-rt1... I should have paid closer attention to what was in the latest mainline, apologies for the noise. FWIW tweaking ksoftirqd priority only when the torture module is builtin makes sense to me.