From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751028AbdAQBIO (ORCPT ); Mon, 16 Jan 2017 20:08:14 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38121 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750734AbdAQBIF (ORCPT ); Mon, 16 Jan 2017 20:08:05 -0500 Date: Mon, 16 Jan 2017 17:07:04 -0800 From: "Paul E. McKenney" To: Josh Triplett Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com Subject: Re: [PATCH tip/core/rcu 08/20] rcu: Add long-term CPU kicking Reply-To: paulmck@linux.vnet.ibm.com References: <20170114091255.GA20854@linux.vnet.ibm.com> <1484385201-22227-8-git-send-email-paulmck@linux.vnet.ibm.com> <20170116075806.toocj5tswpjghd4l@x> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170116075806.toocj5tswpjghd4l@x> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17011701-0004-0000-0000-0000114D406F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006447; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000199; SDB=6.00808606; UDB=6.00393825; IPR=6.00585965; BA=6.00005062; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013943; XFM=3.00000011; UTC=2017-01-17 01:07:08 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17011701-0005-0000-0000-00007C380D67 Message-Id: <20170117010704.GY5238@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-01-16_18:,, 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-1612050000 definitions=main-1701170011 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 15, 2017 at 11:58:07PM -0800, Josh Triplett wrote: > On Sat, Jan 14, 2017 at 01:13:09AM -0800, Paul E. McKenney wrote: > > Commit d2db185bfee8 ("rcu: Remove short-term CPU kicking") removed > > frequent calls to resched_cpu(), which means that the only time > > resched_cpu() is invoked is after an RCU CPU stall warning. Although > > this is good from an avoid-IPIs perspective, we should try to break > > things loose -before- splatting. This commit therefore starts invoking > > resched_cpu() for each holdout at each force-quiescent-state interval > > that is more than halfway through the stall-warning interval. > > > > Signed-off-by: Paul E. McKenney > > Could you please reverse the order of patches 7 and 8, so that > unnecessary splats don't occur between the two? Done! Thanx, Paul > For the patch itself: > Reviewed-by: Josh Triplett > > > kernel/rcu/tree.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > > index 3c0d6c129718..5a4aaad75e76 100644 > > --- a/kernel/rcu/tree.c > > +++ b/kernel/rcu/tree.c > > @@ -1220,6 +1220,13 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp, > > rdp->rsp->jiffies_resched += 5; /* Re-enable beating. */ > > } > > > > + /* > > + * If more than halfway to RCU CPU stall-warning time, do > > + * a resched_cpu() to try to loosen things up a bit. > > + */ > > + if (jiffies - rdp->rsp->gp_start > rcu_jiffies_till_stall_check() / 2) > > + resched_cpu(rdp->cpu); > > + > > return 0; > > } > > > > -- > > 2.5.2 > > >