From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760889AbZEGVHb (ORCPT ); Thu, 7 May 2009 17:07:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751837AbZEGVHV (ORCPT ); Thu, 7 May 2009 17:07:21 -0400 Received: from terminus.zytor.com ([198.137.202.10]:43638 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751154AbZEGVHV (ORCPT ); Thu, 7 May 2009 17:07:21 -0400 Message-ID: <4A034C13.8070402@zytor.com> Date: Thu, 07 May 2009 14:01:07 -0700 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Peter Zijlstra CC: Christoph Lameter , Alok Kataria , Ingo Molnar , Thomas Gleixner , the arch/x86 maintainers , LKML , "alan@lxorguk.ukuu.org.uk" Subject: Re: [PATCH] x86: Reduce the default HZ value References: <1241462661.412.8.camel@alok-dev1> <4A00ADDE.9000908@zytor.com> <1241560625.8665.17.camel@alok-dev1> <1241716053.6311.1514.camel@laptop> <1241718302.6311.1573.camel@laptop> In-Reply-To: <1241718302.6311.1573.camel@laptop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Peter Zijlstra wrote: > > The problem with scheduling a hrtimer along with tasks is that at high > context switch rates the timer will never fire but you do pay the > overhead of programming the hardware each time, something that can be > about as expensive as the whole context switch itself. > > Although, I guess we could amortize that by not re-programming the timer > when the existing timer is within a reasonable period (say 1ms) of the > requested on. > That seems like a reasonable optimization since we're talking about multi-kHz context switch rates, here. -hpa