Messages in this thread | | | Date | Wed, 10 May 2023 08:34:09 -1000 | From | Tejun Heo <> | Subject | Re: [RFC PATCH 2/4] workqueue: support holding a mutex for each work |
| |
On Wed, May 10, 2023 at 06:04:26PM +0200, Johannes Berg wrote: > @@ -2387,7 +2389,13 @@ __acquires(&pool->lock) > */ > lockdep_invariant_state(true); > trace_workqueue_execute_start(work); > - worker->current_func(work); > + if (unlikely(pwq->wq->work_mutex)) { > + mutex_lock(pwq->wq->work_mutex); > + worker->current_func(work); > + mutex_unlock(pwq->wq->work_mutex); > + } else { > + worker->current_func(work); > + }
Ah, I don't know about this. This can't be that difficult to do from the callee side, right?
Thanks.
-- tejun
| |