Timer cleanups
Add anotations, so that timertop produces nicer results. Relative expiry time can get negative, so it should be signed.
Signed-off-by Pavel Machek <[email protected]>
arch/x86/kernel/hpet.c +2 -2
@@ -368,8 +368,8 @@ static int hpet_clocksource_register(voireturn 0 ; } -/* -* Try to setup the HPET timer +/** +* hpet_enable - Try to setup the HPET timer. Returns 1 on success. */ int __init hpet_enable (void ) {
kernel/time/timer_list.c +2 -2
@@ -65,9 +65,9 @@ #ifdef CONFIG_TIMER_STATSSEQ_printf (m,", %s/%d" , tmp, timer->start_pid);#endif SEQ_printf (m,"\n" ); -SEQ_printf (m," # expires at %Lu nsecs [in %Lu nsecs]\n" , +SEQ_printf (m," # expires at %Lu nsecs [in %Ld nsecs]\n" , (unsigned long long )ktime_to_ns (timer->expires), - (unsigned long long )(ktime_to_ns (timer->expires) - now)); + (long long )(ktime_to_ns (timer->expires) - now)); } static void
kernel/workqueue.c +2 -0
@@ -219,6 +219,7 @@ int queue_delayed_work_on(int cpu, strucstruct timer_list *timer = &dwork->timer;struct work_struct *work = &dwork->work; +timer_stats_timer_set_start_info (&dwork->timer);if (!test_and_set_bit (WORK_STRUCT_PENDING ,work_data_bits (work))) {BUG_ON (timer_pending (timer));BUG_ON (!list_empty (&work->entry));
@@ -580,6 +581,7 @@ EXPORT_SYMBOL(schedule_delayed_work);int schedule_delayed_work_on (int cpu,struct delayed_work *dwork,unsigned long delay) { +timer_stats_timer_set_start_info (&dwork->timer);return queue_delayed_work_on (cpu, keventd_wq, dwork, delay); }EXPORT_SYMBOL (schedule_delayed_work_on);
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Thomas Gleixner
AppliedQuoted 5 lines · Pavel Machek
Add anotations, so that timertop produces nicer results. Relative expiry time can get negative, so it should be signed.
Signed-off-by Pavel Machek <[email protected]>
Please do not mix patches for arch / generic code
Quoted 5 lines
arch/x86/kernel/hpet.c +0
-0
arch/x86/kernel/hpet.c static int hpet_clocksource_register(voi · line 375
Quoted 10 lines
arch/x86/kernel/hpet.c +2
-2@@ -368,8 +368,8 @@ static int hpet_clocksource_register(voireturn 0 ; } -/* -* Try to setup the HPET timer +/** +* hpet_enable - Try to setup the HPET timer. Returns 1 on success. */ int __init hpet_enable (void ) {
Applied to x86.
Quoted 5 lines
kernel/time/timer_list.c +0
-0
kernel/time/timer_list.c #ifdef CONFIG_TIMER_STATS · line 71
Quoted 9 lines
kernel/time/timer_list.c +2
-2@@ -65,9 +65,9 @@ #ifdef CONFIG_TIMER_STATSSEQ_printf (m,", %s/%d" , tmp, timer->start_pid);#endif SEQ_printf (m,"\n" ); -SEQ_printf (m," # expires at %Lu nsecs [in %Lu nsecs]\n" , +SEQ_printf (m," # expires at %Lu nsecs [in %Ld nsecs]\n" , (unsigned long long )ktime_to_ns (timer->expires), - (unsigned long long )(ktime_to_ns (timer->expires) - now)); + (long long )(ktime_to_ns (timer->expires) - now)); }
Applied to -hrt.
Quoted 14 lines
kernel/time/timer_list.c +0
-0static voidkernel/workqueue.c +1
-0@@ -219,6 +219,7 @@ int queue_delayed_work_on(int cpu, strucstruct timer_list *timer = &dwork->timer;struct work_struct *work = &dwork->work; +timer_stats_timer_set_start_info (&dwork->timer);if (!test_and_set_bit (WORK_STRUCT_PENDING ,work_data_bits (work))) {BUG_ON (timer_pending (timer));BUG_ON (!list_empty (&work->entry));
kernel/workqueue.c EXPORT_SYMBOL(schedule_delayed_work); · line 587
Quoted 7 lines
kernel/workqueue.c +1
-0@@ -580,6 +581,7 @@ EXPORT_SYMBOL(schedule_delayed_work);int schedule_delayed_work_on (int cpu,struct delayed_work *dwork,unsigned long delay) { +timer_stats_timer_set_start_info (&dwork->timer);return queue_delayed_work_on (cpu, keventd_wq, dwork, delay); }EXPORT_SYMBOL (schedule_delayed_work_on);
Makes sense to see the call site of schedule_delayed_work in the stats. Applied to hrt.
Thanks,
tglx