From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755446AbcKVIQb (ORCPT ); Tue, 22 Nov 2016 03:16:31 -0500 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:36736 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755267AbcKVIQa (ORCPT ); Tue, 22 Nov 2016 03:16:30 -0500 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Tue, 22 Nov 2016 17:12:20 +0900 From: Byungchul Park To: paulmck@linux.vnet.ibm.com, josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] rcu: Force resched_cpu when jiffies >= rcu_state.jiffies_resched Message-ID: <20161122081220.GG2279@X58A-UD3R> References: <1478673135-25509-1-git-send-email-byungchul.park@lge.com> <1478673135-25509-2-git-send-email-byungchul.park@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478673135-25509-2-git-send-email-byungchul.park@lge.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 09, 2016 at 03:32:15PM +0900, Byungchul Park wrote: > Currently rcu code forces CPU into scheduler when jiffies >= > rcu_state.gp_start + jiffies_till_sched_qs, via resched_cpu(). > > It would be better to force CPU into scheduler when jiffies >= > rcu_state.jiffies_resched, too. Hello, I think these two patches are necessary to call resched_cpu() even in case of jiffies >= rcu_state.jiffies_resched, too. Am I wrong? It would be appriciated if you let me know if I was wrong. Thank you, Byungchul > > Signed-off-by: Byungchul Park > --- > kernel/rcu/tree.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index d8e8859..287f468 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -1217,11 +1217,10 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp, > READ_ONCE(*rcrmp) + rdp->rsp->flavor_mask); > } > rdp->rsp->jiffies_resched += 5; /* Re-enable beating. */ > - } > > - /* And if it has been a really long time, kick the CPU as well. */ > - if (ULONG_CMP_GE(jiffies, rdp->rsp->gp_start + jiffies_till_sched_qs)) > + /* And if it has been a really long time, kick the CPU as well. */ > resched_cpu(rdp->cpu); /* Force CPU into scheduler. */ > + } > > return 0; > } > -- > 1.9.1