* Nishanth Aravamudan <[EMAIL PROTECTED]> [050906 23:55]:

...

> Sigh, later than I had hoped, but here is what I have hashed out so far.
> Does it seem like a step in the right direction? Rather hand-wavy, but I
> think it's mostly correct ;)

Some comments below.

> - include/linux/intsource.h
>       with definitions in kernel/intsource.c
> 
> #define DYN_TICK_ENABLED      (1 << 1)
> #define DYN_TICK_SUITABLE     (1 << 0)
> 
> #define DYN_TICK_MIN_SKIP     2
> 
> /* Abstraction of an interrupt source
>  * @state: current state
>  * @max_skip: current maximum number of ticks to skip
>  * @arch_init: initialization routine
>  * @arch_enable_dyn_tick: called via sysfs to enable interrupt skipping
>  * @arch_disable_dyn_tick: called via sysfs to disable interrupt
>  *                            skipping
>  * @arch_set_all_cpus_idle: last cpu to go idle calls this, which should
>  *                            disable any timesource (e.g. PIT on x86)
>  * @arch_recover_time: handler for returning from skipped ticks and keeping
>  *                            time consistent
>  */
> struct interrupt_source {
>       unsigned int state;
>       unsigned long max_skip;
>       int (*arch_init) (void);
>       void (*arch_enable_dyn_tick) (void);
>       void (*arch_disable_dyn_tick) (void);
>       unsigned long (*arch_reprogram) (unsigned long); /* return number of 
> ticks skipped */
>       unsigned long (*arch_recover_time) (int, void *, struct pt_regs *); /* 
> handler in arm */
>       /* following empty in UP */
>       void (*arch_set_all_cpus_idle) (int);
>       spinlock_t lock;
> };

I would still call the struct dyntick, have CONFIG_DYNTICK, and then have
CONFIG_NO_IDLE_HZ and possibly CONFIG_SUBJIFFIE_TIMER register to use it
like I said in my earlier mail. Would that solve the issues you have
with the naming?

> /* return number of ticks skipped, potentially for accounting purposes? */
> extern unsigned long reprogram_interrupt(void);

The number of ticks skipped can be potentially used in idle loops to
select which ACPI C state to go to depending on the estimated length of
sleep.

Regards,
 
Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to