Re: [RFC][PATCH 2/2] ACPI: handle timer ticks proactively

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> This patch takes advantage of the infrastructure introduced in the last
> patch, and allows the processor idle algorithm to proactively choose a
> c-state based on the time the next timer interrupt is expected to occur.
> It preserves the residency metric, so the algorithm should, in theory,
> remain effective against bursts of activity from other interrupt
> sources.
> 
> This patch is mostly intended to be illustrative.  There may be some
> "#ifdef CONFIG_ACPI" issues, and I would appreciate any advice on
> implementing this more cleanly.
> 
> Cheers,
> Adam

> --- a/kernel/timer.c	2006-08-03 13:39:22.000000000 -0400
> +++ b/kernel/timer.c	2006-08-28 17:16:36.000000000 -0400
> @@ -41,6 +41,9 @@
>  #include <asm/timex.h>
>  #include <asm/io.h>
>  
> +#include <acpi/acpi_bus.h>
> +#include <acpi/processor.h>
> +

I sense a problem here, like broken compilation for all non-x86
platforms.

> @@ -1175,6 +1178,10 @@
>  {
>  	struct task_struct *p = current;
>  	int cpu = smp_processor_id();
> +	struct acpi_processor *pr = processors[cpu];
> +
> +	if (pr)
> +		pr->power.timer_tick = inl(acpi_fadt.xpm_tmr_blk.address);
>

This probably needs to be encapsulated, somehow.

									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux