linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: Bernard Metzler <bmt@zurich.ibm.com>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Davidlohr Bueso <dave@stgolabs.net>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	Daniel Bristot de Oliveira <bristot@kernel.org>,
	<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<rcu@vger.kernel.org>
Subject: Re: [PATCH 1/6] kthread: Add the helper macro kthread_run_on_cpu()
Date: Thu, 21 Oct 2021 09:58:58 -0400	[thread overview]
Message-ID: <20211021095858.51d600fc@gandalf.local.home> (raw)
In-Reply-To: <20211021135312.GA3400@LAPTOP-UKSR4ENP.internal.baidu.com>

On Thu, 21 Oct 2021 21:53:12 +0800
Cai Huoqing <caihuoqing@baidu.com> wrote:

> > > +/**
> > > + * kthread_run_on_cpu - create and wake a cpu bound thread.
> > > + * @threadfn: the function to run until signal_pending(current).
> > > + * @data: data ptr for @threadfn.
> > > + * @cpu: The cpu on which the thread should be bound,
> > > + * @namefmt: printf-style name for the thread. Format is restricted
> > > + *	     to "name.*%u". Code fills in cpu number.
> > > + *
> > > + * Description: Convenient wrapper for kthread_create_on_node()
> > > + * followed by wake_up_process().  Returns the kthread or
> > > + * ERR_PTR(-ENOMEM).
> > > + */
> > > +#define kthread_run_on_cpu(threadfn, data, cpu, namefmt)		  \  
> > 
> > Why is this a macro and not a static inline function?
> > 
> > -- Steve  
> Hi,Thanks for your feedback,
> 
> I think using static inline function is nice, but here try to keep
> consistent with the other macros,
> sush as kthread_create/kthread_init_work...

Which they did because they didn't want to use va_list to have variable
arguments, which you don't have.

Which begs the question, should you?

-- Steve

  reply	other threads:[~2021-10-21 13:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 12:01 [PATCH 0/6] kthread: Add the helper macro kthread_run_on_cpu() Cai Huoqing
2021-10-21 12:01 ` [PATCH 1/6] " Cai Huoqing
2021-10-21 13:10   ` Steven Rostedt
2021-10-21 13:53     ` Cai Huoqing
2021-10-21 13:58       ` Steven Rostedt [this message]
2021-10-22  3:05         ` Cai Huoqing
2021-10-21 12:01 ` [PATCH 2/6] RDMA/siw: Make use of " Cai Huoqing
2021-10-21 12:01 ` [PATCH 3/6] ring-buffer: " Cai Huoqing
2021-10-21 12:01 ` [PATCH 4/6] rcutorture: " Cai Huoqing
2021-10-21 12:01 ` [PATCH 5/6] trace/osnoise: " Cai Huoqing
2021-10-21 12:01 ` [PATCH 6/6] trace/hwlat: " Cai Huoqing
2021-10-21 13:48 ` [PATCH 0/6] kthread: Add " Bernard Metzler
2021-10-21 14:07   ` Cai Huoqing
2021-10-21 14:14   ` Bernard Metzler
2021-10-21 13:58 ` Cai,Huoqing

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=20211021095858.51d600fc@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bmt@zurich.ibm.com \
    --cc=bristot@kernel.org \
    --cc=caihuoqing@baidu.com \
    --cc=dave@stgolabs.net \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.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).