mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Con Kolivas <kernel@kolivas.org>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>,
	ck list <ck@vds.kolivas.org>, Tony Lindgren <tony@atomide.com>,
	Adam Belay <abelay@novell.com>,
	Daniel Petrini <d.pensator@gmail.com>,
	vatsa@in.ibm.com, Zwane Mwaikambo <zwane@linuxpower.ca>
Subject: fix cpufreq-ondemand by accounting skipped ticks as idle ticks [Was: [PATCH] i386 no idle HZ aka Dynticks 051203]
Date: Sun, 4 Dec 2005 13:24:34 +0100	[thread overview]
Message-ID: <20051204122434.GB9503@dominikbrodowski.de> (raw)
In-Reply-To: <200512041737.07996.kernel@kolivas.org>

Account ticks skipped dynamically as idle ticks.

This allows the ondemand cpufreq governor to work correctly with dyntick.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

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 <linux/dyn-tick.h>
 #include <linux/timer.h>
 #include <linux/irq.h>
+#include <linux/kernel_stat.h>
 #include <asm/apic.h>
 #include <asm/dyn-tick.h>
 
@@ -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);

  reply	other threads:[~2005-12-04 12:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-04  6:37 [PATCH] i386 no idle HZ aka Dynticks 051203 Con Kolivas
2005-12-04 12:24 ` Dominik Brodowski [this message]
2005-12-04 12:32   ` fix cpufreq-ondemand by accounting skipped ticks as idle ticks [Was: [PATCH] i386 no idle HZ aka Dynticks 051203] Con Kolivas
2005-12-05  2:02   ` Con Kolivas
2005-12-04 12:32 ` Account time spent in C-States " Dominik Brodowski
2005-12-04 12:55 ` busmaster and " Dominik Brodowski
2005-12-04 13:01 ` C-State policy and dynticks " Dominik Brodowski
2005-12-04 14:33 ` Dyntick effectiveness " Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051204122434.GB9503@dominikbrodowski.de \
    --to=linux@dominikbrodowski.net \
    --cc=abelay@novell.com \
    --cc=ck@vds.kolivas.org \
    --cc=d.pensator@gmail.com \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=vatsa@in.ibm.com \
    --cc=zwane@linuxpower.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®