From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751817AbdJXPwY (ORCPT ); Tue, 24 Oct 2017 11:52:24 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55068 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751427AbdJXPwV (ORCPT ); Tue, 24 Oct 2017 11:52:21 -0400 Date: Tue, 24 Oct 2017 08:52:14 -0700 From: "Paul E. McKenney" To: Michal Hocko Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, linux-tip-commits@vger.kernel.org Subject: Re: [tip:core/rcu] sched,rcu: Make cond_resched() provide RCU quiescent state Reply-To: paulmck@linux.vnet.ibm.com References: <20171024105903.iavajcc3cnljyyud@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171024105903.iavajcc3cnljyyud@dhcp22.suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17102415-0036-0000-0000-000002806C57 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007946; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00935828; UDB=6.00471524; IPR=6.00716095; BA=6.00005658; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017690; XFM=3.00000015; UTC=2017-10-24 15:52:17 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17102415-0037-0000-0000-0000422CFE85 Message-Id: <20171024155214.GC3659@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-24_08:,, 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-1707230000 definitions=main-1710240218 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 24, 2017 at 12:59:03PM +0200, Michal Hocko wrote: > On Tue 24-10-17 03:02:09, tip-bot for Paul E. McKenney wrote: > > Commit-ID: f79c3ad6189624c3de0ad5521610c9e22a1c33cf > > Gitweb: https://git.kernel.org/tip/f79c3ad6189624c3de0ad5521610c9e22a1c33cf > > Author: Paul E. McKenney > > AuthorDate: Wed, 30 Nov 2016 06:24:30 -0800 > > Committer: Paul E. McKenney > > CommitDate: Mon, 9 Oct 2017 14:25:17 -0700 > > > > sched,rcu: Make cond_resched() provide RCU quiescent state > > > > There is some confusion as to which of cond_resched() or > > cond_resched_rcu_qs() should be added to long in-kernel loops. > > This commit therefore eliminates the decision by adding RCU quiescent > > states to cond_resched(). This commit also simplifies the code that > > used to interact with cond_resched_rcu_qs(), and that now interacts with > > cond_resched(), to reduce its overhead. This reduction is necessary to > > allow the heavier-weight cond_resched_rcu_qs() mechanism to be invoked > > everywhere that cond_resched() is invoked. > > > > Part of that reduction in overhead converts the jiffies_till_sched_qs > > kernel parameter to read-only at runtime, thus eliminating the need for > > bounds checking. > > Thanks a lot Paul! I have just one question. Does the above mean that we > can drop cond_resched_rcu_qs? Or there are still some scenarios when > this is a better option? Good point, and no time like the present! Please see commits cc1c305fff49 ("netfilter: Eliminate cond_resched_rcu_qs() in favor of cond_resched()") through cca9c4def233 ("rcu: Eliminate the cond_resched_rcu_qs() definition") in my -rcu tree: git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git Thanx, Paul