From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752184AbdHHV4V (ORCPT ); Tue, 8 Aug 2017 17:56:21 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58018 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751961AbdHHV4T (ORCPT ); Tue, 8 Aug 2017 17:56:19 -0400 Date: Tue, 8 Aug 2017 14:56:13 -0700 From: "Paul E. McKenney" To: Neeraj Upadhyay Cc: josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: Skip additional checks if rcu_cpu_stall_suppress is set Reply-To: paulmck@linux.vnet.ibm.com References: <1502212826-18846-1-git-send-email-neeraju@codeaurora.org> <20170808180208.GF3730@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17080821-2213-0000-0000-000002068DBC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007509; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000217; SDB=6.00899512; UDB=6.00450243; IPR=6.00679717; BA=6.00005519; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016601; XFM=3.00000015; UTC=2017-08-08 21:56:17 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17080821-2214-0000-0000-000057277A86 Message-Id: <20170808215613.GI3730@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-08-08_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1708080359 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 09, 2017 at 12:27:16AM +0530, Neeraj Upadhyay wrote: > > > On 08/08/2017 11:32 PM, Paul E. McKenney wrote: > >On Tue, Aug 08, 2017 at 10:50:26PM +0530, Neeraj Upadhyay wrote: > >>If rcu_kick_kthreads is set, and gp is in progress, check_cpu_stall() > >>does checks to figure out whether jiffies is past rsp->jiffies_stall, > >>doing ordered accesses to avoid any false positives for new grace > >>period initialization after a sufficiently large idle period. This > >>extra processing can be skipped if rcu_cpu_stall_suppress is set. > >Just to make sure I understand, the concern is that someone might have > >booted with rcupdate.rcu_cpu_stall_suppress=1 (thus suppressing the RCU > >CPU stall debugging warnings implemented later in check_cpu_stall()), > >but later decided to also boot with rcutree.rcu_kick_kthreads=1 (thus > >enabling kicking kthreads which check for RCU's grace-period kthreads > >not being properly awakened)? > > > >My immediate reaction is that if there is not much point in specifying > >both rcutree.rcu_kick_kthreads=1 and rcupdate.rcu_cpu_stall_suppress=1. > >But is there some use case that I am missing? > > > > Thanx, Paul > For boot time configuration, agree, there isn't much point in enabling > both options. In addition to boot time, rcu_cpu_stall_suppress can > be temporarily enabled during some operations like sysrq; but this may > not be a use case worth consideration. OK, I will skip this one, for the time being at least. But thank you for your review and patches! Thanx, Paul > >>Fixes: 8c7c4829a81c ("rcu: Awaken grace-period kthread if too long since FQS") > >>Signed-off-by: Neeraj Upadhyay > >>--- > >> kernel/rcu/tree.c | 7 +++++-- > >> 1 file changed, 5 insertions(+), 2 deletions(-) > >> > >>diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > >>index 51d4c3a..91b7552 100644 > >>--- a/kernel/rcu/tree.c > >>+++ b/kernel/rcu/tree.c > >>@@ -1562,10 +1562,13 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp) > >> unsigned long js; > >> struct rcu_node *rnp; > >> > >>- if ((rcu_cpu_stall_suppress && !rcu_kick_kthreads) || > >>- !rcu_gp_in_progress(rsp)) > >>+ if (!rcu_gp_in_progress(rsp)) > >> return; > >> rcu_stall_kick_kthreads(rsp); > >>+ > >>+ if (rcu_cpu_stall_suppress) > >>+ return; > >>+ > >> j = jiffies; > >> > >> /* > >>-- > >>QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a > >>member of the Code Aurora Forum, hosted by The Linux Foundation > >> > > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a > member of the Code Aurora Forum, hosted by The Linux Foundation >