Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750709AbVLDMYr (ORCPT ); Sun, 4 Dec 2005 07:24:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750720AbVLDMYr (ORCPT ); Sun, 4 Dec 2005 07:24:47 -0500 Received: from isilmar.linta.de ([213.239.214.66]:30948 "EHLO linta.de") by vger.kernel.org with ESMTP id S1750709AbVLDMYq (ORCPT ); Sun, 4 Dec 2005 07:24:46 -0500 Date: Sun, 4 Dec 2005 13:24:34 +0100 From: Dominik Brodowski To: Con Kolivas Cc: linux kernel mailing list , ck list , Tony Lindgren , Adam Belay , Daniel Petrini , vatsa@in.ibm.com, Zwane Mwaikambo Subject: fix cpufreq-ondemand by accounting skipped ticks as idle ticks [Was: [PATCH] i386 no idle HZ aka Dynticks 051203] Message-ID: <20051204122434.GB9503@dominikbrodowski.de> Mail-Followup-To: Dominik Brodowski , Con Kolivas , linux kernel mailing list , ck list , Tony Lindgren , Adam Belay , Daniel Petrini , vatsa@in.ibm.com, Zwane Mwaikambo References: <200512041737.07996.kernel@kolivas.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200512041737.07996.kernel@kolivas.org> User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1087 Lines: 32 Account ticks skipped dynamically as idle ticks. This allows the ondemand cpufreq governor to work correctly with dyntick. Signed-off-by: Dominik Brodowski Index: working-tree/arch/i386/kernel/dyn-tick.c =================================================================== --- working-tree.orig/arch/i386/kernel/dyn-tick.c +++ working-tree/arch/i386/kernel/dyn-tick.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -109,6 +110,8 @@ void dyn_tick_interrupt(struct pt_regs * do_timer(regs); if (cpu_has_local_apic()) enable_pit_timer(); + if (lost) + kstat_cpu(cpu).cpustat.idle += (lost - 1); } cpu_clear(cpu, nohz_cpu_mask); spin_unlock(&dyn_tick->lock); - 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/