Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1317231

Re: [PATCH v4 11/22] kthread: Better support freezable kthread workers

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4 11/22] kthread: Better support freezable kthread workers
Date 2016-01-25 20:30 +0100
Message-ID <qUUZQ-gp-17@gated-at.bofh.it> (permalink)
References <qURyW-64A-19@gated-at.bofh.it> <qURSk-6uy-45@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 00/22] kthread: Use kthread worker API more widely Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
  [PATCH v4 21/22] thermal/intel_powerclamp: Remove duplicated code that starts the kthread Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
    Re: [PATCH v4 21/22] thermal/intel_powerclamp: Remove duplicated  code that starts the kthread Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-01-25 17:30 +0100
  [PATCH v4 18/22] IB/fmr_pool: Convert the cleanup thread into kthread worker API Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
  [PATCH v4 03/22] kthread: Allow to call __kthread_create_on_node() with va_list args Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
  [PATCH v4 19/22] memstick/r592: Better synchronize debug messages in r592_io kthread Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
  [PATCH v4 12/22] kthread: Use try_lock_kthread_work() in flush_kthread_work() Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
  [PATCH v4 17/22] ipmi: Convert kipmi kthread into kthread worker API Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
  [PATCH v4 08/22] kthread: Initial support for delayed kthread work Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
    Re: [PATCH v4 08/22] kthread: Initial support for delayed kthread  work Tejun Heo <tj@kernel.org> - 2016-01-25 20:10 +0100
  [PATCH v4 01/22] timer: Allow to check when the timer callback has not finished yet Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
    Re: [PATCH v4 01/22] timer: Allow to check when the timer callback  has not finished yet Tejun Heo <tj@kernel.org> - 2016-01-25 19:50 +0100
  [PATCH v4 06/22] kthread: Add destroy_kthread_worker() Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
  [PATCH v4 22/22] thermal/intel_powerclamp: Convert the kthread to kthread worker API Petr Mladek <pmladek@suse.com> - 2016-01-25 16:50 +0100
    Re: [PATCH v4 22/22] thermal/intel_powerclamp: Convert the kthread  to kthread worker API Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-01-25 17:40 +0100
  [PATCH v4 20/22] memstick/r592: convert r592_io kthread into kthread worker API Petr Mladek <pmladek@suse.com> - 2016-01-25 17:00 +0100
  [PATCH v4 15/22] hung_task: Convert hungtaskd into kthread worker API Petr Mladek <pmladek@suse.com> - 2016-01-25 17:00 +0100
  [PATCH v4 16/22] kmemleak: Convert kmemleak kthread into kthread worker API Petr Mladek <pmladek@suse.com> - 2016-01-25 17:00 +0100
  [PATCH v4 13/22] mm/huge_page: Convert khugepaged() into kthread worker API Petr Mladek <pmladek@suse.com> - 2016-01-25 17:00 +0100
  [PATCH v4 14/22] ring_buffer: Convert benchmark kthreads into kthread worker API Petr Mladek <pmladek@suse.com> - 2016-01-25 17:00 +0100
  [PATCH v4 11/22] kthread: Better support freezable kthread workers Petr Mladek <pmladek@suse.com> - 2016-01-25 17:10 +0100
    Re: [PATCH v4 11/22] kthread: Better support freezable kthread  workers Tejun Heo <tj@kernel.org> - 2016-01-25 20:30 +0100
  [PATCH v4 09/22] kthread: Allow to cancel kthread work Petr Mladek <pmladek@suse.com> - 2016-01-25 17:20 +0100
    Re: [PATCH v4 09/22] kthread: Allow to cancel kthread work Tejun Heo <tj@kernel.org> - 2016-01-25 20:20 +0100
  [PATCH v4 02/22] kthread/smpboot: Do not park in kthread_create_on_cpu() Petr Mladek <pmladek@suse.com> - 2016-01-25 17:20 +0100
  [PATCH v4 07/22] kthread: Detect when a kthread work is used by more workers Petr Mladek <pmladek@suse.com> - 2016-01-25 17:20 +0100
    Re: [PATCH v4 07/22] kthread: Detect when a kthread work is used by  more workers Tejun Heo <tj@kernel.org> - 2016-01-25 20:00 +0100
  [PATCH v4 04/22] kthread: Add create_kthread_worker*() Petr Mladek <pmladek@suse.com> - 2016-01-25 17:20 +0100
    Re: [PATCH v4 04/22] kthread: Add create_kthread_worker*() Tejun Heo <tj@kernel.org> - 2016-01-25 20:00 +0100

csiph-web