linux_dsm_epyc7002/Documentation/RCU
Petr Mladek 3989144f86 kthread: kthread worker API cleanup
A good practice is to prefix the names of functions by the name
of the subsystem.

The kthread worker API is a mix of classic kthreads and workqueues.  Each
worker has a dedicated kthread.  It runs a generic function that process
queued works.  It is implemented as part of the kthread subsystem.

This patch renames the existing kthread worker API to use
the corresponding name from the workqueues API prefixed by
kthread_:

__init_kthread_worker()		-> __kthread_init_worker()
init_kthread_worker()		-> kthread_init_worker()
init_kthread_work()		-> kthread_init_work()
insert_kthread_work()		-> kthread_insert_work()
queue_kthread_work()		-> kthread_queue_work()
flush_kthread_work()		-> kthread_flush_work()
flush_kthread_worker()		-> kthread_flush_worker()

Note that the names of DEFINE_KTHREAD_WORK*() macros stay
as they are. It is common that the "DEFINE_" prefix has
precedence over the subsystem names.

Note that INIT() macros and init() functions use different
naming scheme. There is no good solution. There are several
reasons for this solution:

  + "init" in the function names stands for the verb "initialize"
    aka "initialize worker". While "INIT" in the macro names
    stands for the noun "INITIALIZER" aka "worker initializer".

  + INIT() macros are used only in DEFINE() macros

  + init() functions are used close to the other kthread()
    functions. It looks much better if all the functions
    use the same scheme.

  + There will be also kthread_destroy_worker() that will
    be used close to kthread_cancel_work(). It is related
    to the init() function. Again it looks better if all
    functions use the same naming scheme.

  + there are several precedents for such init() function
    names, e.g. amd_iommu_init_device(), free_area_init_node(),
    jump_label_init_type(),  regmap_init_mmio_clk(),

  + It is not an argument but it was inconsistent even before.

[arnd@arndb.de: fix linux-next merge conflict]
 Link: http://lkml.kernel.org/r/20160908135724.1311726-1-arnd@arndb.de
Link: http://lkml.kernel.org/r/1470754545-17632-3-git-send-email-pmladek@suse.com
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-10-11 15:06:33 -07:00
..
Design documentation: Record reason for rcu_head two-byte alignment 2016-08-22 09:25:33 -07:00
00-INDEX documentation: Record rcu_dereference() value mishandling 2014-04-29 08:38:33 -07:00
arrayRCU.txt documentation: RCU-protected array indexes no longer supported 2015-05-27 12:56:17 -07:00
checklist.txt documentation: Record rcu_dereference() value mishandling 2014-04-29 08:38:33 -07:00
listRCU.txt rcu: Update docs to include kfree_rcu() 2012-11-08 11:44:25 -08:00
lockdep-splat.txt kthread: kthread worker API cleanup 2016-10-11 15:06:33 -07:00
lockdep.txt documentation: RCU-protected array indexes no longer supported 2015-05-27 12:56:17 -07:00
NMI-RCU.txt rcu: Fix RCU's NMI documentation 2011-09-28 21:36:44 -07:00
rcu_dereference.txt documentation: Fix spelling of "operators" 2015-07-15 14:43:10 -07:00
rcu.txt rcu: Remove redundant TREE_PREEMPT_RCU config option 2014-10-29 10:20:05 -07:00
rcubarrier.txt rcu: Fix rcu_barrier() documentation 2013-08-18 17:05:32 -07:00
rculist_nulls.txt netfilter: nf_conntrack: nf_conntrack_alloc() fixes 2009-07-16 14:03:40 +02:00
rcuref.txt documentation: Add pointer to percpu-ref for RCU and refcount 2014-07-08 08:32:56 -07:00
RTFP.txt Documentation: fix common spelling mistakes 2016-04-28 07:51:59 -06:00
stallwarn.txt Documentation: Fix spelling mistake 2016-06-14 16:01:00 -07:00
torture.txt rcutorture: Remove outdated config option description 2016-08-22 09:23:23 -07:00
trace.txt rcu: Remove expedited GP funnel-lock bypass 2016-03-31 13:34:07 -07:00
UP.txt rcu: Add synchronize_sched_expedited() rcutorture doc + updates 2009-07-03 10:02:29 +02:00
whatisRCU.txt documentation: Add references to 2010 and 2014 Big API Tables 2016-06-14 16:00:58 -07:00