From: Andrew Morton <akpm@linux-foundation.org>
To: Petr Mladek <pmladek@suse.com>
Cc: Oleg Nesterov <oleg@redhat.com>, Tejun Heo <tj@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Josh Triplett <josh@joshtriplett.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jiri Kosina <jkosina@suse.cz>, Borislav Petkov <bp@suse.de>,
Michal Hocko <mhocko@suse.cz>,
linux-mm@kvack.org, Vlastimil Babka <vbabka@suse.cz>,
linux-api@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 03/10] kthread: Add create_kthread_worker*()
Date: Wed, 1 Jun 2016 12:36:19 -0700 [thread overview]
Message-ID: <20160601123619.6cadd1d09287c71b0639e226@linux-foundation.org> (raw)
In-Reply-To: <1464620371-31346-4-git-send-email-pmladek@suse.com>
On Mon, 30 May 2016 16:59:24 +0200 Petr Mladek <pmladek@suse.com> wrote:
> Kthread workers are currently created using the classic kthread API,
> namely kthread_run(). kthread_worker_fn() is passed as the @threadfn
> parameter.
>
> This patch defines create_kthread_worker() and
> create_kthread_worker_on_cpu() functions that hide implementation details.
I hate to nick pits, but the naming isn't good.
A good, disciplined and pretty common naming scheme is to lead the
overall identifier with the name of the relevant subsystem. kthread
has done that *fairly* well:
Things we got right:
kthread_create_on_node
kthread_create
kthread_create_on_cpu
kthread_run
kthread_bind
kthread_bind_mask
kthread_stop
kthread_should_stop
kthread_should_park
kthread_freezable_should_stop
kthread_data
kthread_park
kthread_unpark
kthread_parkme
kthreadd
kthread_work_func_t
KTHREAD_WORKER_INIT
KTHREAD_WORK_INIT
KTHREAD_WORKER_INIT_ONSTACK
kthread_worker_fn
Things we didn't:
probe_kthread_data
DEFINE_KTHREAD_WORKER
DEFINE_KTHREAD_WORK
DEFINE_KTHREAD_WORKER_ONSTACK
DEFINE_KTHREAD_WORKER_ONSTACK
__init_kthread_worker
init_kthread_worker
init_kthread_work
queue_kthread_work
flush_kthread_work
flush_kthread_worker
So I suggest kthread_create_worker() and
kthread_create_worker_on_cpu(), please.
And this might be a suitable time to regularize some of the "things we
didn't" identifiers, if you're feeling keen.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-06-01 19:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 14:59 [PATCH v7 00/10] kthread: Kthread worker API improvements Petr Mladek
2016-05-30 14:59 ` [PATCH v7 01/10] kthread/smpboot: Do not park in kthread_create_on_cpu() Petr Mladek
2016-05-30 14:59 ` [PATCH v7 02/10] kthread: Allow to call __kthread_create_on_node() with va_list args Petr Mladek
2016-05-30 14:59 ` [PATCH v7 03/10] kthread: Add create_kthread_worker*() Petr Mladek
2016-06-01 19:36 ` Andrew Morton [this message]
2016-05-30 14:59 ` [PATCH v7 04/10] kthread: Add drain_kthread_worker() Petr Mladek
2016-05-30 14:59 ` [PATCH v7 05/10] kthread: Add destroy_kthread_worker() Petr Mladek
2016-05-30 14:59 ` [PATCH v7 06/10] kthread: Detect when a kthread work is used by more workers Petr Mladek
2016-05-30 14:59 ` [PATCH v7 07/10] kthread: Initial support for delayed kthread work Petr Mladek
2016-05-30 14:59 ` [PATCH v7 08/10] kthread: Allow to cancel " Petr Mladek
2016-05-30 14:59 ` [PATCH v7 09/10] kthread: Allow to modify delayed " Petr Mladek
2016-05-30 14:59 ` [PATCH v7 10/10] kthread: Better support freezable kthread workers Petr Mladek
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=20160601123619.6cadd1d09287c71b0639e226@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=jkosina@suse.cz \
--cc=josh@joshtriplett.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
/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