From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1427025AbdD2Vp5 (ORCPT ); Sat, 29 Apr 2017 17:45:57 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:33322 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1036533AbdD2Vpt (ORCPT ); Sat, 29 Apr 2017 17:45:49 -0400 Date: Sat, 29 Apr 2017 14:45:44 -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: <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> <20170429180638.GI3956@linux.vnet.ibm.com> <1493490033.4339.3.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1493490033.4339.3.camel@gmx.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17042921-0044-0000-0000-0000031AAAD6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006997; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00854076; UDB=6.00422464; IPR=6.00633101; 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.00015241; XFM=3.00000014; UTC=2017-04-29 21:45:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042921-0045-0000-0000-00000748B409 Message-Id: <20170429214544.GK3956@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-29_13:,, 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-1704290221 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 29, 2017 at 08:20:33PM +0200, Mike Galbraith wrote: > On Sat, 2017-04-29 at 11:06 -0700, Paul E. McKenney wrote: > > > 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. > > Patchlet is against x86-tip/master.today. So today's (as in Saturday April 29) x86-tip/master with the following patch applied? Thanx, Paul ------------------------------------------------------------------------ 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 --- 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;