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]

 



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?

> @@ -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?

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