Messages in this thread | | | Date | Wed, 8 Aug 2012 09:39:29 -0700 | From | Tejun Heo <> | Subject | Re: your mail |
| |
On Fri, Aug 03, 2012 at 10:43:45AM -0700, Tejun Heo wrote: > delayed_work has been annoyingly missing the mechanism to modify timer > of a pending delayed_work - ie. mod_timer() counterpart. delayed_work > users have been working around this using several methods - using an > explicit timer + work item, messing directly with delayed_work->timer, > and canceling before re-queueing, all of which are error-prone and/or > ugly. > > Gustavo Padovan posted a RFC implementation[1] of mod_delayed_work() a > while back but it wasn't complete. To properly implement > mod_delayed_work[_on](), it should be able to steal pending work items > which may be on timer or worklist or anywhere inbetween. This is > similar to what __cancel_work_timer() does but it turns out that there > are a lot of holes around this area and try_to_grab_pending() needs > considerable amount of work to be used for other purposes too. > > This patchset improves canceling and try_to_grab_pending(), use it to > implement mod_delayed_work[_on](), convert easy ones, and drop > __cancel_delayed_work_sync() which doesn't have relevant users > afterwards.
Applied to wq/for-3.7.
Thanks.
-- tejun
| |