From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760567AbcIWOrO (ORCPT ); Fri, 23 Sep 2016 10:47:14 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55044 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760449AbcIWOrK (ORCPT ); Fri, 23 Sep 2016 10:47:10 -0400 Date: Fri, 23 Sep 2016 07:47:08 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Mikulas Patocka , hpa@zytor.com, josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, torvalds@linux-foundation.org, mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, oleg@redhat.com, linux-tip-commits@vger.kernel.org Subject: Re: [tip:sched/core] sched/core: Avoid _cond_resched() for PREEMPT=y Reply-To: paulmck@linux.vnet.ibm.com References: <20160922184228.GA5012@twins.programming.kicks-ass.net> <20160922202817.GT14933@linux.vnet.ibm.com> <20160923084442.GC5008@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160923084442.GC5008@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16092314-0008-0000-0000-000005A688F3 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005808; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000185; SDB=6.00760651; UDB=6.00361910; IPR=6.00535199; BA=6.00004750; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012763; XFM=3.00000011; UTC=2016-09-23 14:47:06 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16092314-0009-0000-0000-00003B8C7668 Message-Id: <20160923144708.GC14933@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-23_07:,, 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-1609020000 definitions=main-1609230275 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 23, 2016 at 10:44:42AM +0200, Peter Zijlstra wrote: > On Thu, Sep 22, 2016 at 01:28:17PM -0700, Paul E. McKenney wrote: > > On Thu, Sep 22, 2016 at 08:42:28PM +0200, Peter Zijlstra wrote: > > > On Thu, Sep 22, 2016 at 02:25:01PM -0400, Mikulas Patocka wrote: > > > > I've found a document that says that cond_resched() is needed on > > > > preemptible kernels to mark RCU quiescent states: > > > > > > > > https://lwn.net/Articles/603252/ > > > > > > > > Paul, is cond_resched() still needed on current RCU implementation? Or not? > > > > > > No, we ripped that out. See 4a81e8328d37 ("rcu: Reduce overhead of > > > cond_resched() checks for RCU") > > > > I would instead say that we changed the algorithm to reduce the overhead > > in the common case, but yes, this commit did change things quite a bit. > > Sure, but critical point (for this discussion) is that cond_resched() no > longer implies anything RCU, it really only is a voluntary reschedule > point. Agreed, cond_resched_rcu_qs() is what you use to do both a cond_resched() and an RCU quiescent state. Thanx, Paul