lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211022030524.GA3762@LAPTOP-UKSR4ENP.internal.baidu.com>
Date:   Fri, 22 Oct 2021 11:05:24 +0800
From:   Cai Huoqing <caihuoqing@...du.com>
To:     Steven Rostedt <rostedt@...dmis.org>
CC:     Bernard Metzler <bmt@...ich.ibm.com>,
        Doug Ledford <dledford@...hat.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Davidlohr Bueso <dave@...olabs.net>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Josh Triplett <josh@...htriplett.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        "Ingo Molnar" <mingo@...hat.com>,
        Daniel Bristot de Oliveira <bristot@...nel.org>,
        <linux-rdma@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <rcu@...r.kernel.org>
Subject: Re: [PATCH 1/6] kthread: Add the helper macro kthread_run_on_cpu()

On 21 10月 21 09:58:58, Steven Rostedt wrote:
> On Thu, 21 Oct 2021 21:53:12 +0800
> Cai Huoqing <caihuoqing@...du.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
Hi, Thanks your reply.

I get it, V3 here:
https://lore.kernel.org/lkml/20211022025711.3673-2-caihuoqing@baidu.com/

Thanks,
Cai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ