linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	tj@kernel.org, jiangshanlai@gmail.com, saeedm@nvidia.com,
	leon@kernel.org, davem@davemloft.net, kuba@kernel.org,
	Tejun Heo <tj@kernel.org>
Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] workqueue: Have 'alloc_workqueue()' like macros accept a format specifier
Date: Sun, 18 Apr 2021 16:03:18 -0700	[thread overview]
Message-ID: <042f5fff-5faf-f3c5-0819-b8c8d766ede6@acm.org> (raw)
In-Reply-To: <ae88f6c2c613d17bc1a56692cfa4f960dbc723d2.1618780558.git.christophe.jaillet@wanadoo.fr>

On 4/18/21 2:26 PM, Christophe JAILLET wrote:
> Improve 'create_workqueue', 'create_freezable_workqueue' and
> 'create_singlethread_workqueue' so that they accept a format
> specifier and a variable number of arguments.
> 
> This will put these macros more in line with 'alloc_ordered_workqueue' and
> the underlying 'alloc_workqueue()' function.
> 
> This will also allow further code simplification.

Please Cc Tejun for workqueue changes since he maintains the workqueue code.

> diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
> index d15a7730ee18..145e756ff315 100644
> --- a/include/linux/workqueue.h
> +++ b/include/linux/workqueue.h
> @@ -425,13 +425,13 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
>  	alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED |		\
>  			__WQ_ORDERED_EXPLICIT | (flags), 1, ##args)
>  
> -#define create_workqueue(name)						\
> -	alloc_workqueue("%s", __WQ_LEGACY | WQ_MEM_RECLAIM, 1, (name))
> -#define create_freezable_workqueue(name)				\
> -	alloc_workqueue("%s", __WQ_LEGACY | WQ_FREEZABLE | WQ_UNBOUND |	\
> -			WQ_MEM_RECLAIM, 1, (name))
> -#define create_singlethread_workqueue(name)				\
> -	alloc_ordered_workqueue("%s", __WQ_LEGACY | WQ_MEM_RECLAIM, name)
> +#define create_workqueue(fmt, args...)					\
> +	alloc_workqueue(fmt, __WQ_LEGACY | WQ_MEM_RECLAIM, 1, ##args)
> +#define create_freezable_workqueue(fmt, args...)			\
> +	alloc_workqueue(fmt, __WQ_LEGACY | WQ_FREEZABLE | WQ_UNBOUND |	\
> +			WQ_MEM_RECLAIM, 1, ##args)
> +#define create_singlethread_workqueue(fmt, args...)			\
> +	alloc_ordered_workqueue(fmt, __WQ_LEGACY | WQ_MEM_RECLAIM, ##args)
>  
>  extern void destroy_workqueue(struct workqueue_struct *wq);
>  
> 


  reply	other threads:[~2021-04-18 23:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18 21:25 [PATCH 0/2] workqueue: Have 'alloc_workqueue()' like macros accept a format specifier Christophe JAILLET
2021-04-18 21:26 ` [PATCH 1/2] " Christophe JAILLET
2021-04-18 23:03   ` Bart Van Assche [this message]
2021-04-19  6:36     ` Marion et Christophe JAILLET
2021-04-19 20:02       ` Bart Van Assche
2021-04-22 12:24         ` Jason Gunthorpe
2021-04-22 17:12           ` Bart Van Assche
2021-04-22 18:00             ` Leon Romanovsky
2021-04-22 20:30               ` Bart Van Assche
2021-04-23 14:02                 ` Marco Elver
2021-04-23 14:27                 ` Jason Gunthorpe
2021-04-29 10:31           ` Dan Carpenter
2021-04-19  6:56   ` Rasmus Villemoes
2021-04-18 21:26 ` [PATCH 2/2] net/mlx5: Simplify workqueue name creation Christophe JAILLET
2021-04-19 10:22 ` [PATCH 0/2] workqueue: Have 'alloc_workqueue()' like macros accept a format specifier Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=042f5fff-5faf-f3c5-0819-b8c8d766ede6@acm.org \
    --to=bvanassche@acm.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=jiangshanlai@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).