From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969600AbdD2SGw (ORCPT ); Sat, 29 Apr 2017 14:06:52 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51973 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967992AbdD2SGn (ORCPT ); Sat, 29 Apr 2017 14:06:43 -0400 Date: Sat, 29 Apr 2017 11:06:38 -0700 From: "Paul E. McKenney" To: Mike Galbraith Cc: LKML , Ingo Molnar , Ingo Molnar , Thomas Gleixner , PeterZijlstra , Frederic Weisbecker Subject: Re: [patch] timer: Fix timers_update_migration(), and call it in tmigr_init() Reply-To: paulmck@linux.vnet.ibm.com References: <1493193739.4412.30.camel@gmx.de> <1493194602.21594.4.camel@gmx.de> <20170426082137.koj7q3ftfqw3o22u@gmail.com> <1493195514.21594.5.camel@gmx.de> <1493197062.21594.8.camel@gmx.de> <20170426102617.l62cdn4gs4h5i4fw@hirez.programming.kicks-ass.net> <1493206789.21594.25.camel@gmx.de> <1493209836.21594.29.camel@gmx.de> <1493482000.4547.6.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1493482000.4547.6.camel@gmx.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17042918-0040-0000-0000-0000032AE3CA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006996; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00854035; UDB=6.00422425; IPR=6.00633046; BA=6.00005316; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015240; XFM=3.00000014; UTC=2017-04-29 18:06:41 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042918-0041-0000-0000-0000071F011E Message-Id: <20170429180638.GI3956@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-29_11:,, 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-1703280000 definitions=main-1704290191 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 29, 2017 at 06:06:40PM +0200, Mike Galbraith wrote: > Note: there is more. With this applied, my desktop box will no longer > reproduce when booted to init 3 with nowatchdog on the command line. > My 8 socket DL980 OTOH still will, though it takes longer, and is > seemingly no longer interested in following up with a permanent RCU > stall after the tsc clocksource is killed, as it does in virgin source. > > --- > > timers_update_migration() is called by tick_nohz_activate() before > the late initcall tmigr_init() sets tmigr_enabled to true, resulting > in it updating neither timer_base.nohz_active nor .migration_enabled, > meaning we'll not kick an idling cpu in add_timer_on(). > > Remove redundant loop avoidance such that tick_nohz_activate() updates > timer_bases[].nohz_active as intended, and call it in tmigr_init() to > update timer_bases[].migration_enabled. > > Signed-off-by: Mike Galbraith > Fixes: ec2206b91d43 timer: Implement the hierarchical pull model If someone will either repost a fresh series or point me at exactly the set of patches to use, I will run it through rcutorture again. Thanx, Paul > --- > kernel/time/timer.c | 4 ---- > kernel/time/timer_migration.c | 1 + > 2 files changed, 1 insertion(+), 4 deletions(-) > > --- a/kernel/time/timer.c > +++ b/kernel/time/timer.c > @@ -224,10 +224,6 @@ void timers_update_migration(bool update > bool on = sysctl_timer_migration && tick_nohz_active && tmigr_enabled; > unsigned int cpu; > > - /* Avoid the loop, if nothing to update */ > - if (this_cpu_read(timer_bases[BASE_GLOBAL].migration_enabled) == on) > - return; > - > for_each_possible_cpu(cpu) { > per_cpu(timer_bases[BASE_LOCAL].migration_enabled, cpu) = on; > per_cpu(timer_bases[BASE_GLOBAL].migration_enabled, cpu) = on; > --- a/kernel/time/timer_migration.c > +++ b/kernel/time/timer_migration.c > @@ -649,6 +649,7 @@ static int __init tmigr_init(void) > goto hp_err; > > tmigr_enabled = true; > + timers_update_migration(false); > pr_info("Timer migration: %d hierarchy levels\n", tmigr_hierarchy_levels); > return 0; > >