mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCHSET] Announce: High-res timers, tickless/dyntick and dynamic HZ
@ 2006-06-18 15:10 Thomas Gleixner
  2006-06-18 16:35 ` Michal Piotrowski
                   ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Thomas Gleixner @ 2006-06-18 15:10 UTC (permalink / raw)
  To: LKML; +Cc: Andrew Morton, john stultz, Ingo Molnar, Con Kolivas

We are pleased to announce the 2.6.17 based release of our high-res 
timers kernel feature, upon which we based a tickless kernel (dyntick) 
implementation and a 'dynamic HZ' feature as well:

http://www.tglx.de/projects/hrtimers/2.6.17/

The easiest way to try these features is to apply the combo patch to 
vanilla 2.6.17. The patching order is:

http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.tar.bz2
http://www.tglx.de/projects/hrtimers/2.6.17/patch-2.6.17-hrt-dyntick1.patch


A broken out patch series is available too:

http://www.tglx.de/projects/hrtimers/2.6.17/patch-2.6.17-hrt-dyntick1.patches.tar.bz2


The high-res timers feature (CONFIG_HIGH_RES_TIMERS) enables POSIX 
timers and nanosleep() to be as accurate as the hardware allows (around 
1usec on typical hardware). This feature is transparent - if enabled it 
just makes these timers much more accurate than the current HZ 
resolution. It is based on the Generic Time Of Day patchset from John 
Stultz and it in essence finishes what we started with the 
kernel/hrtimers.c code in 2.6.16.
 
The tickless kernel feature (CONFIG_NO_HZ) enables 'on-demand' timer 
interrupts: if there is no timer to be expired for say 1.5 seconds when 
the system goes idle, then the system will stay totally idle for 1.5 
seconds. This should bring cooler CPUs and power savings: on our (x86) 
testboxes we have measured the effective IRQ rate to go from HZ to 1-2 
timer interrupts per second.

This feature is implemented by driving 'low res timer wheel' processing 
via special per-CPU high-res timers, which timers are reprogrammed to 
the next-low-res-timer-expires interval. This tickless-kernel design is 
SMP-safe in a natural way and has been developed on SMP systems from
the 
beginning.

Note: while our code should be similar in behavior to the existing 
dynticks kernel patch from Con, it is a fundamentally different design 
(being based on the high-res timers support and APIs) and is thus a 
different implementation. We reused one area of dynticks: we integrated 
and improved the 'timer top' profiling tool (CONFIG_TIMER_INFO).

When running the kernel then there's a 'timeout granularity' 
runtime tunable parameter as well, under:

   /proc/sys/kernel/timeout_granularity

it defaults to 1, meaning that CONFIG_HZ is the granularity of timers. 

For example, if CONFIG_HZ is 1000 and timeout_granularity is set to 10, 
then low-res timers will be expired every 10 jiffies (every 10 msecs), 
thus the effective granularity of low-res timers is 100 HZ. Thus this 
feature implements nonintrusive dynamic HZ in essence, without touching 
the HZ macro itself.

Supported platforms: high-res timers and tickless works on x86 (x86_64,
PPC and ARM port are in the works). Other platforms should still work
fine with the usual HZ frequency timer tick.

Naturally, we'd like these features to be integrated into the upstream 
kernel as well.

Bugreports and suggestions are welcome,
 
	Thomas, Ingo



^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: [1/4] ACPI C-States: accounting of sleep states
@ 2006-06-28  7:27 Brown, Len
  0 siblings, 0 replies; 30+ messages in thread
From: Brown, Len @ 2006-06-28  7:27 UTC (permalink / raw)
  To: Dominik Brodowski, Thomas Gleixner
  Cc: Con Kolivas, Ingo Molnar, LKML, Andrew Morton, john stultz

applied.
thanks,
-Len 

>-----Original Message-----
>From: linux-kernel-owner@vger.kernel.org 
>[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of 
>Dominik Brodowski
>Sent: Monday, June 19, 2006 5:29 PM
>To: Thomas Gleixner; Brown, Len
>Cc: Con Kolivas; Ingo Molnar; LKML; Andrew Morton; john stultz
>Subject: [1/4] ACPI C-States: accounting of sleep states
>
>Track the actual time spent in C-States (C2 upwards, we can't
>determine this for C1), not only the number of invocations. This is
>especially useful for dynamic ticks / "tickless systems", but is also
>of interest on normal systems, as any interrupt activity leads to
>C-States being exited, not only the timer interrupt.
>
>The time is being measured in PM timer ticks, so an increase 
>by one equals
>279 nanoseconds.
>
>Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
>
>---
>
> drivers/acpi/processor_idle.c |   10 ++++++----
> include/acpi/processor.h      |    1 +
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
>3997a08ff5aa0553dfff81801c3690a5c91ac7bc
>diff --git a/drivers/acpi/processor_idle.c 
>b/drivers/acpi/processor_idle.c
>index 80fa434..4f166fa 100644
>--- a/drivers/acpi/processor_idle.c
>+++ b/drivers/acpi/processor_idle.c
>@@ -322,8 +322,6 @@ static void acpi_processor_idle(void)
> 		cx = &pr->power.states[ACPI_STATE_C1];
> #endif
> 
>-	cx->usage++;
>-
> 	/*
> 	 * Sleep:
> 	 * ------
>@@ -421,6 +419,9 @@ static void acpi_processor_idle(void)
> 		local_irq_enable();
> 		return;
> 	}
>+	cx->usage++;
>+	if ((cx->type != ACPI_STATE_C1) && (sleep_ticks > 0))
>+		cx->time += sleep_ticks;
> 
> 	next_state = pr->power.state;
> 
>@@ -1055,9 +1056,10 @@ static int acpi_processor_power_seq_show
> 		else
> 			seq_puts(seq, "demotion[--] ");
> 
>-		seq_printf(seq, "latency[%03d] usage[%08d]\n",
>+		seq_printf(seq, "latency[%03d] usage[%08d] 
>duration[%020llu]\n",
> 			   pr->power.states[i].latency,
>-			   pr->power.states[i].usage);
>+			   pr->power.states[i].usage,
>+			   pr->power.states[i].time);
> 	}
> 
>       end:
>diff --git a/include/acpi/processor.h b/include/acpi/processor.h
>index badf027..ca0e031 100644
>--- a/include/acpi/processor.h
>+++ b/include/acpi/processor.h
>@@ -51,6 +51,7 @@ struct acpi_processor_cx {
> 	u32 latency_ticks;
> 	u32 power;
> 	u32 usage;
>+	u64 time;
> 	struct acpi_processor_cx_policy promotion;
> 	struct acpi_processor_cx_policy demotion;
> };
>-- 
>1.2.4
>
>-
>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/
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2006-06-28  7:27 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-18 15:10 [PATCHSET] Announce: High-res timers, tickless/dyntick and dynamic HZ Thomas Gleixner
2006-06-18 16:35 ` Michal Piotrowski
2006-06-18 18:28   ` Ingo Molnar
2006-06-19 16:35     ` Michal Piotrowski
2006-06-19 19:51       ` Thomas Gleixner
2006-06-25 13:06         ` Steven Rostedt
2006-06-25 14:26           ` Thomas Gleixner
2006-06-18 19:50   ` Thomas Gleixner
2006-06-19 12:09     ` Con Kolivas
2006-06-19 12:31       ` Thomas Gleixner
2006-06-19 13:05         ` Con Kolivas
2006-06-19 13:10           ` Thomas Gleixner
2006-06-19 21:58         ` mark gross
2006-06-19 22:19           ` Thomas Gleixner
2006-06-21 12:54             ` Felix Oxley
2006-06-21 13:07               ` Thomas Gleixner
2006-06-18 23:47 ` Roman Zippel
2006-06-19 12:50   ` Ingo Molnar
2006-06-19 13:47     ` Roman Zippel
2006-06-19  5:21 ` Con Kolivas
2006-06-19  5:24   ` Con Kolivas
2006-06-19 12:26   ` Ingo Molnar
2006-06-19 14:03     ` Con Kolivas
2006-06-19 20:06       ` Thomas Gleixner
2006-06-19 20:57         ` ACPI C-States algorithm updates for dyn-tick Dominik Brodowski
2006-06-19 21:28           ` [1/4] ACPI C-States: accounting of sleep states Dominik Brodowski
2006-06-19 21:29             ` [2/4] ACPI C-States: bm_activity improvements Dominik Brodowski
2006-06-19 21:31               ` [3/4] ACPI C-States: only demote on current bus mastering activity Dominik Brodowski
2006-06-19 21:33                 ` [4/4 -- only for discussion] ACPI C-States: dyn-ticks-improvements (for -ck implementation) Dominik Brodowski
2006-06-28  7:27 [1/4] ACPI C-States: accounting of sleep states Brown, Len

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®