Re: [RFC] Introduce greedy hrtimer walk on idle

From: Andi Kleen
Date: Fri Sep 23 2011 - 18:59:20 EST


Venkatesh Pallipadi <venki@xxxxxxxxxx> writes:
>
> But, doing an exhaustive search for all softexpired timers, especially when
> CPU is idle, has its advantages:
> * it will result in less interruptions later (when CPU may be busy).
> * it can reduce number of wakeups in cases where not yet expired timer in above description could be deleted before they expire.
> * For timers resulting in task wakeups, doing wakeup on idle can improve the
> overall efficiency of the system. It can also bring load balance/migration benefits.

Seems like a good idea in general.

> diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
> index ca6f7ab..8d3e287 100644
> --- a/arch/x86/kernel/process_64.c
> +++ b/arch/x86/kernel/process_64.c
> @@ -149,6 +149,8 @@ void cpu_idle(void)
> preempt_enable_no_resched();
> schedule();
> preempt_disable();
> + if (sysctl_hrtimer_greedy_lookup)
> + hrtimer_peek_ahead_timers();

So why is it a sysctl and not default?

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/