timer: initialize the field slack of timer_list
PATCH 1/1 timer: initialize the field slack of timer_list
TIMER_INITIALIZER() should initialize the field slack of timer_list as __init_timer() does.
Signed-off-by Changli Gao <[email protected]>
--- include/linux/timer.h | 1 + 1 file changed, 1 insertion(+)
include/linux/timer.h +1 -0
@@ -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__)) \ }
Quoted 3 lines · On Tue, 17 Aug 2010 14:37:44 +0800 Changli Gao <[email protected]> wrote:
TIMER_INITIALIZER()should initialize the field slack oftimer_listas__init_timer()does.
So it should.
Quoted 8 lines
--- include/linux/timer.h | 1 + 1 file changed, 1 insertion(+)include/linux/timer.h +0
-0
include/linux/timer.h extern struct tvec_base boot_tvec_bases; · line 60
Quoted 7 lines
include/linux/timer.h +1
-0@@ -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()?