Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp3164652pxy; Wed, 4 Aug 2021 04:06:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFJkR6kRROXirfgAq8Okz6jqBzd8KjhOHbvCjWQPOEjSdzNmYeJ+I2oTam5JSDQmGv2wR4 X-Received: by 2002:a17:906:82ca:: with SMTP id a10mr24782824ejy.137.1628075183680; Wed, 04 Aug 2021 04:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628075183; cv=none; d=google.com; s=arc-20160816; b=oA990wQmOJ99/bkP+ILY5zwX6ER4sCxzd1awzR2XdQUlIzaTwjBh3POVvx1eY6OYwC yElqawJLaQ9XbSOs9CBnqWNT7JhyyKfK8yVvBl7jDimoidoYyEr8FAUthCI3RTmZ+3wi Anhvw8hXyX2pGRRBTw8Sa8AnOq2/Mts+4QgjA1gyRU6VRjFcnhmGIxBe6Rnwq+UdHPWG olYWd/pZjgg6NbZQ5fVDnKkF8CtySPoH+CbLXUuPZq0dFot9LV+I0Oc9fYUfam4/3dVt Ukf1lQtyYqWlIAwA16h1OjgDk5rF14oM1FtDm2mtWwazREyf5RQoMNZtJOM3sLkwBmGG FrKw== 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=fYpMW+mkcCeYGSDp0gye5LFkC2eNoKqqlWhaBGoM61U=; b=uvjzF8Q6e0KZ7Ij8hy2KZ2CTrsbUceJ4vrTLYfRI3mbZaiZH7oLOhCYqRCg5uiM4Pg IlEMNMenq1Yf3WNhiTaGQo7yvoBujxJzEaUA37Nwwjzb2D8wEY/277Zz2gs4DVJvYbMU qevZXtURREXywR19j6u/h7gjUWKRmq6u22htrU4SlXvz7Za+ScgEsV1WnHg9F1ccGfsO Q6Ya5z6XI2JlDsPtUGwttUHieNFAF8dNdu867zPztMIOkX0J2w84vNZiZGqEthxWLGsD 46Xh6XGzM1tsO7jq59/r+C7EUO/vp6hFwrxbiKPbly3Jn+MaLSytSub5dPG1opXc1/HO 1SEQ== 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 i4si1857733ejj.165.2021.08.04.04.05.56; Wed, 04 Aug 2021 04:06:23 -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 S237458AbhHDKSd (ORCPT + 99 others); Wed, 4 Aug 2021 06:18:33 -0400 Received: from foss.arm.com ([217.140.110.172]:58812 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237538AbhHDKS2 (ORCPT ); Wed, 4 Aug 2021 06:18:28 -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 87DC913A1; Wed, 4 Aug 2021 03:18:15 -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 A1C6A3F66F; Wed, 4 Aug 2021 03:18:13 -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: <20210803234231.GW4397@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> Date: Wed, 04 Aug 2021 11:18:11 +0100 Message-ID: <87tuk5a4yk.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/08/21 16:42, Paul E. McKenney wrote: > On Tue, Aug 03, 2021 at 11:54:37PM +0100, Valentin Schneider wrote: >> diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c >> index 680f66b65f14..3dd5fa75f469 100644 >> --- a/kernel/rcu/rcutorture.c >> +++ b/kernel/rcu/rcutorture.c >> @@ -948,12 +948,26 @@ static int rcu_torture_boost(void *arg) >> unsigned long endtime; >> unsigned long oldstarttime; >> struct rcu_boost_inflight rbi = { .inflight = 0 }; >> + struct task_struct *ksoftirqd = this_cpu_ksoftirqd(); >> >> VERBOSE_TOROUT_STRING("rcu_torture_boost started"); >> >> /* Set real-time priority. */ >> sched_set_fifo_low(current); >> >> + /* >> + * Boost testing requires TIMER_SOFTIRQ to run at a higher priority >> + * than the CPU-hogging torture kthreads, otherwise said threads >> + * will never let timer expiry for the RCU GP kthread happen, which will >> + * prevent any boosting. >> + */ >> + if (current->normal_prio < ksoftirqd->normal_prio) { > > Would it make sense to add IS_ENABLED(CONFIG_PREEMPT_RT) to the above > condition? > 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. > Thanx, Paul > >> + struct sched_param sp = { .sched_priority = 2 }; >> + >> + pr_alert("%s(): Adjusting %s priority\n", __func__, ksoftirqd->comm); >> + sched_setscheduler_nocheck(ksoftirqd, SCHED_FIFO, &sp); >> + } >> + >> init_rcu_head_on_stack(&rbi.rcu); >> /* Each pass through the following loop does one boost-test cycle. */ >> do { >> -- >> 2.25.1 >>