Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4507021imm; Mon, 25 Jun 2018 17:34:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKyjMBgDo/EpIZPvLBawZY6D/exPacYu7EfPztzFnKi5EoAgs1JSym4KYegKcNb6pms3a2G X-Received: by 2002:a63:6944:: with SMTP id e65-v6mr12338529pgc.436.1529973284775; Mon, 25 Jun 2018 17:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529973284; cv=none; d=google.com; s=arc-20160816; b=CK5uxe1pb7PJIO0pDP34w+wXZKoxYDZz/qn0PtK01b/eL2Ckj94QReHBt8Lnm9whhp 2Z4MxgShk4E4g3YBNU6LkVp01rXsexrFCVdIo3K51a/UV2bXYnT1Q0SwvYp2mU8Q8+sG XJ51TQQHFXXCrD5J47Y7XzB6wEEwlc19fPaK6dg7Y6tIsnZM32bupUvpzpFHx6DqVZU4 iij7hw/dwU1hg+tyhnQN8PAW9ADpq9f4TuDab+baTFHYLBcT4zVAFIxzk+z30oYu8/c2 qKRjcPSL4gEdgN/8cFAbuiyrw29J1DY1Wa31iKT1eyUhxaq54MsArkxcHdorB+a6lGJX R0MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=5LDRyfNeebY6l7VXFdZQ5aInTjPkXzWLzU9Sib3kJjg=; b=Gvd0meDBnAi81KhOOgGMKXHICk75/ROCy04od32n65ViOUg4BqE1G9zO2NmHXrNysX PnrU/lpFwZpQDwgSjNnE3cfpU7KzeCxfeysvvdIULUSz9O6AyZH8HVKYg1B1Xub0VenB DKUoLgQ9shfhTu26MSakzVvMrH04nCVQmJSQm9deR36SEHU1Jg8apham/7Ss/AlB/oPl ZtTPzfz7vKCETT/XCUkjVCBIPeACb8dcxEllzW+qN9mzPAhQL+cF+dCBBSbeFjAQVthb hTy90kfGDl2RwYkywRBSR2jvP/MurETmfeMGJQleOBgO7U8A9fR9Y3Ju3iKnWtQnseqF sPhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13-v6si303838plp.51.2018.06.25.17.34.30; Mon, 25 Jun 2018 17:34:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934832AbeFZAdV (ORCPT + 99 others); Mon, 25 Jun 2018 20:33:21 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38682 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933991AbeFZAdQ (ORCPT ); Mon, 25 Jun 2018 20:33:16 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5Q0Scag022568 for ; Mon, 25 Jun 2018 20:33:15 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ju96q3c5q-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 25 Jun 2018 20:33:15 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 25 Jun 2018 20:33:15 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 25 Jun 2018 20:33:11 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5Q0XAOP5701954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 26 Jun 2018 00:33:10 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 37007B205F; Mon, 25 Jun 2018 20:33:05 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 20AA9B206C; Mon, 25 Jun 2018 20:33:05 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.159]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 25 Jun 2018 20:33:05 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 4BA7B16CA0A9; Mon, 25 Jun 2018 17:35:15 -0700 (PDT) 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, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, "Paul E . McKenney" Subject: [PATCH tip/core/rcu 27/27] rcu: Assign higher prio to RCU threads if rcutorture is built-in Date: Mon, 25 Jun 2018 17:35:13 -0700 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180626003448.GA26209@linux.vnet.ibm.com> References: <20180626003448.GA26209@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18062600-0040-0000-0000-000004452899 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009255; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01052336; UDB=6.00539469; IPR=6.00830262; MB=3.00021856; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-26 00:33:15 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062600-0041-0000-0000-0000084B3E5B Message-Id: <20180626003513.27812-27-paulmck@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-25_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806260005 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Joel Fernandes (Google)" The rcutorture RCU priority boosting tests fail even with CONFIG_RCU_BOOST set because rcutorture's threads run at the same priority as the default RCU kthreads (RT class with priority of 1). This patch checks if RCU torture is built into the kernel and if so, assigns RT priority 1 to the RCU threads, allowing the rcutorture boost tests to pass. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index c59cca40ea92..988683089a4c 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -3921,12 +3921,16 @@ static int __init rcu_spawn_gp_kthread(void) struct task_struct *t; /* Force priority into range. */ - if (IS_ENABLED(CONFIG_RCU_BOOST) && kthread_prio < 1) + if (IS_ENABLED(CONFIG_RCU_BOOST) && kthread_prio < 2 + && IS_BUILTIN(CONFIG_RCU_TORTURE_TEST)) + kthread_prio = 2; + else if (IS_ENABLED(CONFIG_RCU_BOOST) && kthread_prio < 1) kthread_prio = 1; else if (kthread_prio < 0) kthread_prio = 0; else if (kthread_prio > 99) kthread_prio = 99; + if (kthread_prio != kthread_prio_in) pr_alert("rcu_spawn_gp_kthread(): Limited prio to %d from %d\n", kthread_prio, kthread_prio_in); -- 2.17.1