timer fixes
Subsystems (3)
Linus,
Please pull the latest timers-fixes-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git timers-fixes-for-linus
Thanks,
Ingo
------------------>
Andrew Morton (1):
timer stats: Fix del_timer_sync() and try_to_del_timer_sync()
John Stultz (1):
time: Fix accumulation bug triggered by long delay.
Stanislaw Gruszka (1):
posix-cpu-timers: Reset expire cache when no timer is running
Thomas Gleixner (1):
clockevents: Sanitize min_delta_ns adjustment and prevent overflows
include/linux/clockchips.h | 2 + kernel/posix-cpu-timers.c | 10 ++++++-- kernel/time/tick-oneshot.c | 52 +++++++++++++++++++++++++++++++++---------- kernel/time/timekeeping.c | 3 +- kernel/time/timer_list.c | 3 +- kernel/timer.c | 1 + 6 files changed, 54 insertions(+), 17 deletions(-)
include/linux/clockchips.h +2 -0
@@ -73,6 +73,7 @@ enum clock_event_nofitiers {* @list: list head for the management code * @mode: operating mode assigned by the management code * @next_event: local storage for the next event in oneshot mode +* @retries: number of forced programming retries */ struct clock_event_device {const char *name;
@@ -93,6 +94,7 @@ struct clock_event_device {struct list_head list;enum clock_event_mode mode;ktime_t next_event; +unsigned long retries; };/*
kernel/posix-cpu-timers.c +7 -3
@@ -1060,9 +1060,9 @@ static void check_thread_timers(struct task_struct *tsk, } } -static void stop_process_timers (struct task_struct *tsk) +static void stop_process_timers (struct signal_struct *sig) { -struct thread_group_cputimer *cputimer = &tsk->signal->cputimer; +struct thread_group_cputimer *cputimer = &sig->cputimer;unsigned long flags;if (!cputimer->running)
@@ -1071,6 +1071,10 @@ static void stop_process_timers(struct task_struct *tsk)spin_lock_irqsave (&cputimer->lock, flags); cputimer->running =0 ;spin_unlock_irqrestore (&cputimer->lock, flags); + + sig->cputime_expires.prof_exp = cputime_zero; + sig->cputime_expires.virt_exp = cputime_zero; + sig->cputime_expires.sched_exp =0 ; }static u32 onecputick;
@@ -1131,7 +1135,7 @@ static void check_process_timers(struct task_struct *tsk, list_empty(&timers[CPUCLOCK_VIRT]) && cputime_eq(sig->it[CPUCLOCK_VIRT].expires, cputime_zero) && list_empty(&timers[CPUCLOCK_SCHED])) { -stop_process_timers (tsk); +stop_process_timers (sig);return ; }
kernel/time/tick-oneshot.c +40 -12
69 lines not on this page · raw message
kernel/time/timekeeping.c +2 -1
@@ -818,7 +818,8 @@ void update_wall_time(void) shift =min (shift, maxshift);while (offset >= timekeeper.cycle_interval) { offset =logarithmic_accumulation (offset, shift); - shift--; +if (offset < timekeeper.cycle_interval<<shift) + shift--; }/* correct the clock when NTP error is too big */
kernel/time/timer_list.c +2 -1
@@ -228,6 +228,7 @@ print_tickdevice(struct seq_file *m, struct tick_device *td, int cpu)SEQ_printf (m," event_handler: " );print_name_offset (m, dev->event_handler);SEQ_printf (m,"\n" ); +SEQ_printf (m," retries: %lu\n" , dev->retries); }static void timer_list_show_tickdevices (struct seq_file *m)
@@ -257,7 +258,7 @@ static int timer_list_show(struct seq_file *m, void *v)u64 now =ktime_to_ns (ktime_get ());int cpu; -SEQ_printf (m,"Timer List Version: v0.5\n" ); +SEQ_printf (m,"Timer List Version: v0.6\n" );SEQ_printf (m,"HRTIMER_MAX_CLOCK_BASES: %d\n" ,HRTIMER_MAX_CLOCK_BASES );SEQ_printf (m,"now at %Ld nsecs\n" , (unsigned long long )now);
kernel/timer.c +1 -0
@@ -880,6 +880,7 @@ int try_to_del_timer_sync(struct timer_list *timer)if (base->running_timer == timer) goto out; +timer_stats_timer_clear_start_info (timer); ret =0 ;if (timer_pending (timer)) {detach_timer (timer,1 );