From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751074AbdBCPo7 (ORCPT ); Fri, 3 Feb 2017 10:44:59 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54950 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbdBCPo5 (ORCPT ); Fri, 3 Feb 2017 10:44:57 -0500 Date: Fri, 3 Feb 2017 07:44:57 -0800 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Mike Galbraith , Sachin Sant , Ross Zwisler , Matt Fleming , Michael Ellerman , "linuxppc-dev@lists.ozlabs.org" , "linux-next@vger.kernel.org" , LKML Subject: Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls Reply-To: paulmck@linux.vnet.ibm.com References: <87tw8gutp6.fsf@concordia.ellerman.id.au> <20170130213435.GM31613@codeblueprint.co.uk> <33118425-8548-475A-8DED-9A2424C0BCCC@linux.vnet.ibm.com> <1485863317.4498.2.camel@gmx.de> <20170202155506.GX6515@twins.programming.kicks-ass.net> <3BAB5673-2BF8-46E0-8018-6A0F3DEEC9F7@linux.vnet.ibm.com> <20170203085301.GA6515@twins.programming.kicks-ass.net> <1486126774.4277.6.camel@gmx.de> <20170203133748.GB6515@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170203133748.GB6515@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: 17020315-0012-0000-0000-0000138BC4A9 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006549; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000201; SDB=6.00816704; UDB=6.00398855; IPR=6.00594139; BA=6.00005114; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014168; XFM=3.00000011; UTC=2017-02-03 15:44:54 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17020315-0013-0000-0000-00004B19E15F Message-Id: <20170203154457.GJ30506@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-03_10:,, 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-1702030151 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 03, 2017 at 02:37:48PM +0100, Peter Zijlstra wrote: > On Fri, Feb 03, 2017 at 01:59:34PM +0100, Mike Galbraith wrote: > > On Fri, 2017-02-03 at 09:53 +0100, Peter Zijlstra wrote: > > > On Fri, Feb 03, 2017 at 10:03:14AM +0530, Sachin Sant wrote: > > > > > > I ran few cycles of cpu hot(un)plug tests. In most cases it works except one > > > > where I ran into rcu stall: > > > > > > > > [ 173.493453] INFO: rcu_sched detected stalls on CPUs/tasks: > > > > [ 173.493473] > > > > 8-...: (2 GPs behind) idle=006/140000000000000/0 softirq=0/0 fqs=2996 > > > > [ 173.493476] > > > > (detected by 0, t=6002 jiffies, g=885, c=884, q=6350) > > > > > > Right, I actually saw that too, but I don't think that would be related > > > to my patch. I'll see if I can dig into this though, ought to get fixed > > > regardless. > > > > FWIW, I'm not seeing stalls/hangs while beating hotplug up in tip. (so > > next grew a wart?) > > I've seen it on tip. It looks like hot unplug goes really slow when > there's running tasks on the CPU being taken down. > > What I did was something like: > > taskset -p $((1<<1)) $$ > for ((i=0; i<20; i++)) do while :; do :; done & done > > taskset -p $((1<<0)) $$ > echo 0 > /sys/devices/system/cpu/cpu1/online > > And with those 20 tasks stuck sucking cycles on CPU1, the unplug goes > _really_ slow and the RCU stall triggers. What I suspect happens is that > hotplug stops participating in the RCU state machine early, but only > tells RCU about it really late, and in between it gets suspicious it > takes too long. > > I've yet to dig through the RCU code to figure out the exact sequence of > events, but found the above to be fairly reliable in triggering the > issue. If you send me the full splat from the dmesg and the RCU portions of .config, I will take a look. Is this new behavior, or a new test? Thanx, Paul