From 728e11fc0de9cee375fce98502b68aef3acff695 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Tue, 28 Sep 2010 00:35:16 -0400 Subject: Bugfix: clear the state of pulled hrtimers during tear-down The state of pulled hrtimers is reset during reinit_release_heap() as this timers normally only controls remote releases. In NPS-F the state of a pulled timer is not reset once the pulling is over and therefore timers are no longer pulled (and restarted) upon plugin reloading. FIXME list: moving reset of HRTIMER_START_ON_INACTIVE in on_release_timer() ? --- litmus/sched_npsf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/litmus/sched_npsf.c b/litmus/sched_npsf.c index 9f45f9632e97..b322b0a5b362 100644 --- a/litmus/sched_npsf.c +++ b/litmus/sched_npsf.c @@ -1030,6 +1030,10 @@ void npsf_hrtimers_cleanup(void) do { for_each_online_cpu(cpu) { entry = &per_cpu(npsf_cpu_entries, cpu); + + /* be sure to cleanup pull_timer state */ + atomic_set(&entry->info.state, HRTIMER_START_ON_INACTIVE); + /* if callback active, skip it for now and redo later */ if (hrtimer_try_to_cancel(&entry->timer) == -1) { redo = 1; @@ -1042,6 +1046,8 @@ void npsf_hrtimers_cleanup(void) } } } while (redo); + + printk(KERN_INFO "npsf hrtimers deleted\n"); } static void cleanup_npsf(void) -- cgit v1.2.2