Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965759Ab3HHPCW (ORCPT ); Thu, 8 Aug 2013 11:02:22 -0400 Received: from mail-pb0-f47.google.com ([209.85.160.47]:46029 "EHLO mail-pb0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965294Ab3HHPCT convert rfc822-to-8bit (ORCPT ); Thu, 8 Aug 2013 11:02:19 -0400 Content-Type: text/plain; charset=GB2312 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: [PATCH V3]hrtimer: Fix a performance regression by disable reprogramming in remove_hrtimer From: "ethan.zhao" In-Reply-To: <1375774140.5412.9.camel@marge.simpson.net> Date: Thu, 8 Aug 2013 23:02:06 +0800 Cc: Peter Zijlstra , Thomas Gleixner , Ingo Molnar , LKML , johlstei@codeaurora.org, Yinghai Lu , Jin Feng Content-Transfer-Encoding: 8BIT Message-Id: References: <1374955447-5051-1-git-send-email-ethan.kernel@gmail.com> <20130730093519.GP3008@twins.programming.kicks-ass.net> <1375774140.5412.9.camel@marge.simpson.net> To: Mike Galbraith X-Mailer: Apple Mail (2.1508) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1283 Lines: 37 ?? 2013-8-6??????3:29??Mike Galbraith ะด???? > +int sched_needs_cpu(int cpu) > +{ > + return cpu_rq(cpu)->avg_idle < sysctl_sched_migration_cost; > +} > + > #else /* CONFIG_NO_HZ_COMMON */ > > static inline bool got_nohz_idle_kick(void) > --- a/kernel/time/tick-sched.c > +++ b/kernel/time/tick-sched.c > @@ -548,7 +548,7 @@ static ktime_t tick_nohz_stop_sched_tick > time_delta = timekeeping_max_deferment(); > } while (read_seqretry(&jiffies_lock, seq)); > > - if (rcu_needs_cpu(cpu, &rcu_delta_jiffies) || > + if (sched_needs_cpu(cpu) || rcu_needs_cpu(cpu, &rcu_delta_jiffies) || > arch_needs_cpu(cpu) || irq_work_needs_cpu()) { > next_jiffies = last_jiffies + 1; > delta_jiffies = 1; If the performace regression was caused by too much expensive clock device reprogramming and too frequent entering /exiting of C-states?? this patch should work. except the following result is almost always false under 3.11-rc3 code. > return cpu_rq(cpu)->avg_idle < sysctl_sched_migration_cost; Ethan -- 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/