Messages in this thread | | | From | Roland Dreier <> | Date | Mon, 04 Oct 2004 21:05:27 -0700 | Subject | Re: PROBLEM: Consistent lock up on >=2.6.8 |
| |
Andrew> Excellent point. We don't appear to have a function which Andrew> does that.
Excellent point right back at you... I didn't notice that the ip_vs work was rescheduling itself.
Andrew> How does this look?
+void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, + struct work_struct *work) +{ + while (!cancel_delayed_work(work)) + flush_workqueue(wq); +}
Seems like it should work as long as (as you note) the work _always_ reschedules itself, and no one else ever tries to schedule the work.
Maybe it's easier to say that users of rearming delayed work just have to have a "stop" flag somewhere? I have a feeling that an API for such a particular situation is just an invitation for foot-shooting.
- Roland - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |