Re: [PATCH v2 3/5] workqueue: Add interface for user-defined workqueue lockdep map

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux