[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160125192111.GG3628@mtj.duckdns.org>
Date: Mon, 25 Jan 2016 14:21:11 -0500
From: Tejun Heo <tj@...nel.org>
To: Petr Mladek <pmladek@...e.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Josh Triplett <josh@...htriplett.org>,
Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jiri Kosina <jkosina@...e.cz>, Borislav Petkov <bp@...e.de>,
Michal Hocko <mhocko@...e.cz>, linux-mm@...ck.org,
Vlastimil Babka <vbabka@...e.cz>, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 11/22] kthread: Better support freezable kthread
workers
On Mon, Jan 25, 2016 at 04:45:00PM +0100, Petr Mladek wrote:
> @@ -556,6 +556,7 @@ void __init_kthread_worker(struct kthread_worker *worker,
> const char *name,
> struct lock_class_key *key)
> {
> + worker->flags = 0;
> spin_lock_init(&worker->lock);
> lockdep_set_class_and_name(&worker->lock, key, name);
> INIT_LIST_HEAD(&worker->work_list);
Maybe memset the thing and drop 0, NULL inits?
> @@ -638,7 +643,8 @@ repeat:
> EXPORT_SYMBOL_GPL(kthread_worker_fn);
>
> static struct kthread_worker *
> -__create_kthread_worker(int cpu, const char namefmt[], va_list args)
> +__create_kthread_worker(unsigned int flags, int cpu,
> + const char namefmt[], va_list args)
Wouldn't @cpu, @flags be less confusing? You would end up with, (A,
B, C) and (B, C) instead of (A, B, C) and (A, C).
Thanks.
--
tejun
Powered by blists - more mailing lists