Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752916AbbDFT2c (ORCPT ); Mon, 6 Apr 2015 15:28:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59751 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750891AbbDFT2a (ORCPT ); Mon, 6 Apr 2015 15:28:30 -0400 Message-ID: <5522DE5C.2000704@redhat.com> Date: Mon, 06 Apr 2015 15:28:28 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Mike Galbraith , Chris Metcalf CC: "Peter Zijlstra (Intel)" , Frederic Weisbecker , "Paul E. McKenney" , "Rafael J. Wysocki" , Martin Schwidefsky , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] nohz: make nohz_full imply isolcpus References: <1428078248-5425-1-git-send-email-cmetcalf@ezchip.com> <1428078248-5425-2-git-send-email-cmetcalf@ezchip.com> <1428084499.3475.40.camel@gmail.com> <551EE81C.3050605@ezchip.com> <1428113039.3189.6.camel@gmail.com> <1428118989.3916.34.camel@gmail.com> In-Reply-To: <1428118989.3916.34.camel@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2386 Lines: 64 On 04/03/2015 11:43 PM, Mike Galbraith wrote: > Speaking of microsecond savers, the (ick) deferment experiment below > cut 60 core jitter in half. Shooting the clocksource watchdog fixes > alternating ~15us/~5us tick on my desktop box. > > With workqueue twiddles and whatnot floating around, the thing is > starting to look viable. Doesn't look too bad to me, though the changes below could probably use some comments when turned into a final patch :) > --- > kernel/sched/core.c | 5 +++-- > kernel/time/clocksource.c | 5 +++++ > 2 files changed, 8 insertions(+), 2 deletions(-) > > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -2604,12 +2604,13 @@ u64 scheduler_tick_max_deferment(void) > struct rq *rq = this_rq(); > unsigned long next, now = ACCESS_ONCE(jiffies); > > - next = rq->last_sched_tick + HZ; > + next = (rq->last_sched_tick + HZ) | (rq->clock & 0x3f); > > if (time_before_eq(next, now)) > return 0; > > - return jiffies_to_nsecs(next - now); > + /* Add noise to avoid CPUs colliding at tick boundaries */ > + return jiffies_to_nsecs(next - now) | (rq->clock & 0xfffff); > } > #endif > > --- a/kernel/time/clocksource.c > +++ b/kernel/time/clocksource.c > @@ -267,8 +267,13 @@ static void clocksource_watchdog(unsigne > * to each other. > */ > next_cpu = cpumask_next(raw_smp_processor_id(), cpu_online_mask); > +skip_nohz_full: > if (next_cpu >= nr_cpu_ids) > next_cpu = cpumask_first(cpu_online_mask); > + if (next_cpu && tick_nohz_full_cpu(next_cpu)) { > + next_cpu = cpumask_next(next_cpu, cpu_online_mask); > + goto skip_nohz_full; > + } > watchdog_timer.expires += WATCHDOG_INTERVAL; > add_timer_on(&watchdog_timer, next_cpu); > out: > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/