From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753415AbdHGMk5 (ORCPT ); Mon, 7 Aug 2017 08:40:57 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43746 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752304AbdHGMkx (ORCPT ); Mon, 7 Aug 2017 08:40:53 -0400 Date: Mon, 7 Aug 2017 05:40:52 -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: Fix up pending cbs check in rcu_prepare_for_idle Reply-To: paulmck@linux.vnet.ibm.com References: <1502085010-30316-1-git-send-email-neeraju@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1502085010-30316-1-git-send-email-neeraju@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17080712-2213-0000-0000-00000205D2C7 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007501; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000217; SDB=6.00898847; UDB=6.00449844; IPR=6.00679052; BA=6.00005514; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016573; XFM=3.00000015; UTC=2017-08-07 12:40:51 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17080712-2214-0000-0000-000057238B21 Message-Id: <20170807124052.GU3730@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-08-07_09:,, 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-1708070213 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 07, 2017 at 11:20:10AM +0530, Neeraj Upadhyay wrote: > Pending cbs check in rcu_prepare_for_idle is inversed > in the sense that, it should accelerate if there are > pending cbs; but, the check does the opposite. So, > fix it. > > Fixes: 15fecf89e46a ("srcu: Abstract multi-tail callback list handling") > Signed-off-by: Neeraj Upadhyay Good catch! Queued for review and testing. Just out of curiosity, how did you find this one? Thanx, Paul > --- > kernel/rcu/tree_plugin.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h > index 908b309..b8f51df 100644 > --- a/kernel/rcu/tree_plugin.h > +++ b/kernel/rcu/tree_plugin.h > @@ -1493,7 +1493,7 @@ static void rcu_prepare_for_idle(void) > rdtp->last_accelerate = jiffies; > for_each_rcu_flavor(rsp) { > rdp = this_cpu_ptr(rsp->rda); > - if (rcu_segcblist_pend_cbs(&rdp->cblist)) > + if (!rcu_segcblist_pend_cbs(&rdp->cblist)) > continue; > rnp = rdp->mynode; > raw_spin_lock_rcu_node(rnp); /* irqs already disabled. */ > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a > member of the Code Aurora Forum, hosted by The Linux Foundation >