[PATCH v2 3/5] workqueue: Add interface for user-defined workqueue lockdep map
Matthew Brost
matthew.brost at intel.com
Wed Jul 31 01:15:30 UTC 2024
On Tue, Jul 30, 2024 at 02:36:13PM -1000, Tejun Heo wrote:
> Hello,
>
> On Tue, Jul 30, 2024 at 05:31:17PM -0700, Matthew Brost wrote:
> > +#define alloc_ordered_workqueue_lockdep_map(fmt, flags, lockdep_map, args...) \
> > + alloc_workqueue_lockdep_map(fmt, WQ_UNBOUND | __WQ_ORDERED | (flags), 1, lockdep_map, ##args)
> > +#endif
>
> alloc_ordered_workqueue() is a macro too but would you mind making this an
> inline function?
>
Not at all.
> > @@ -4795,11 +4795,17 @@ static void wq_init_lockdep(struct workqueue_struct *wq)
> >
> > static void wq_unregister_lockdep(struct workqueue_struct *wq)
> > {
> > + if (wq->flags & __WQ_USER_OWNED_LOCKDEP)
> > + return;
>
> Do you still need the flag? Can't you test wq->lockdep_map !=
> &wq->__lockdep_map instead?
>
Ah, yes. That is better. Will change.
Matt
> Thanks.
>
> --
> tejun
More information about the dri-devel
mailing list