On Wed, Aug 18, 2010 at 4:09 PM, Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:I can't think out a scene which prevent del_timer_sync() from using in softirq. :( Then I go back and find that comments comes before linux-2.6.12, then in linux-2.6.12, del_timer_sync() is like this: int del_timer_sync(struct timer_list *timer) { tvec_base_t *base; int i, ret = 0; check_timer(timer); del_again: ret += del_timer(timer); for_each_online_cpu(i) { base = &per_cpu(tvec_bases, i); if (base->running_timer == timer) { while (base->running_timer == timer) { cpu_relax(); preempt_check_resched(); } break; } } smp_rmb(); if (timer_pending(timer)) goto del_again; return ret; } EXPORT_SYMBOL(del_timer_sync); Seems preempt_check_resched() is the proof of that comments, but now del_timer_sync() is changed. I don't know if there is any other restriction. Thanks, Yong --
