* [PATCH] timer: initialize the field slack of timer_list
@ 2010-08-17 6:37 Changli Gao
2010-08-19 23:55 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Changli Gao @ 2010-08-17 6:37 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: linux-kernel, Changli Gao
TIMER_INITIALIZER() should initialize the field slack of timer_list as
__init_timer() does.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
include/linux/timer.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 38cf093..81de484 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -54,6 +54,7 @@ extern struct tvec_base boot_tvec_bases;
.expires = (_expires), \
.data = (_data), \
.base = &boot_tvec_bases, \
+ .slack = -1, \
__TIMER_LOCKDEP_MAP_INITIALIZER( \
__FILE__ ":" __stringify(__LINE__)) \
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] timer: initialize the field slack of timer_list
2010-08-17 6:37 [PATCH] timer: initialize the field slack of timer_list Changli Gao
@ 2010-08-19 23:55 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2010-08-19 23:55 UTC (permalink / raw)
To: Changli Gao; +Cc: Thomas Gleixner, linux-kernel, Arjan van de Ven
On Tue, 17 Aug 2010 14:37:44 +0800
Changli Gao <xiaosuo@gmail.com> wrote:
> TIMER_INITIALIZER() should initialize the field slack of timer_list as
> __init_timer() does.
>
So it should.
> ---
> include/linux/timer.h | 1 +
> 1 file changed, 1 insertion(+)
> diff --git a/include/linux/timer.h b/include/linux/timer.h
> index 38cf093..81de484 100644
> --- a/include/linux/timer.h
> +++ b/include/linux/timer.h
> @@ -54,6 +54,7 @@ extern struct tvec_base boot_tvec_bases;
> .expires = (_expires), \
> .data = (_data), \
> .base = &boot_tvec_bases, \
> + .slack = -1, \
> __TIMER_LOCKDEP_MAP_INITIALIZER( \
> __FILE__ ":" __stringify(__LINE__)) \
> }
I wonder what the runtime effects of this change are. Methinks we were
wasting a few cycles in apply_slack()?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-19 23:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-17 6:37 [PATCH] timer: initialize the field slack of timer_list Changli Gao
2010-08-19 23:55 ` Andrew Morton
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®