From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755474AbcHVQrT (ORCPT ); Mon, 22 Aug 2016 12:47:19 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35270 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751774AbcHVQrS (ORCPT ); Mon, 22 Aug 2016 12:47:18 -0400 Subject: Re: [PATCH tip/core/rcu 1/5] rcu: Fix soft lockup for rcu_nocb_kthread To: paulmck@linux.vnet.ibm.com References: <20160822152956.GA8160@linux.vnet.ibm.com> <1471879821-8974-1-git-send-email-paulmck@linux.vnet.ibm.com> <20160822164429.GE3482@linux.vnet.ibm.com> Cc: linux-kernel@vger.kernel.org, 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, dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com, Ding Tianhong From: Nikolay Borisov Message-ID: <8142a6fc-6b49-61ce-c857-ba769d640d73@gmail.com> Date: Mon, 22 Aug 2016 19:47:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160822164429.GE3482@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.08.2016 19:44, Paul E. McKenney wrote: > On Mon, Aug 22, 2016 at 07:19:53PM +0300, Nikolay Borisov wrote: >> >> [SNIP] >>> >>> Signed-off-by: Ding Tianhong >>> [ paulmck: Substituted cond_resched_rcu_qs for cond_resched. ] >> >> This contradicts... >> >>> Signed-off-by: Paul E. McKenney >>> --- >>> kernel/rcu/tree_plugin.h | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h >>> index 0082fce402a0..85c5a883c6e3 100644 >>> --- a/kernel/rcu/tree_plugin.h >>> +++ b/kernel/rcu/tree_plugin.h >>> @@ -2173,6 +2173,7 @@ static int rcu_nocb_kthread(void *arg) >>> cl++; >>> c++; >>> local_bh_enable(); >>> + cond_resched_rcu_qs(); >> >> with what's here? > > Ding Tianhong's original patch: > > http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1167918.html > > had cond_resched() here, which works for his workload, but can result > in stall warnings in other cases. I therfore changed his cond_resched() > to the cond_resched_rcu_qs() that you see above, and documented this > change in the "paulmck" note after Ding Tianhong's Signed-off-by. I think my english escaped me since I took your paulmck note as "we had cond_resched_rcu_qs initially and I replaced it with cond_resched". But apparently it was the opposite. Cheers, Nik > > So all is as it should be. > > Thanx, Paul > >>> list = next; >>> } >>> trace_rcu_batch_end(rdp->rsp->name, c, !!list, 0, 0, 1); >>> >> >