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


Groups > linux.kernel > #1427016

Re: [PATCH v9 09/12] kthread: Initial support for delayed kthread work

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v9 09/12] kthread: Initial support for delayed kthread work
Date 2016-06-20 22:30 +0200
Message-ID <rMdZv-4vT-11@gated-at.bofh.it> (permalink)
References <rKDv3-7Hj-3@gated-at.bofh.it> <rKDv4-7Hj-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On Thu, Jun 16, 2016 at 01:17:28PM +0200, Petr Mladek wrote:
> +/**
> + * kthread_delayed_work_timer_fn - callback that queues the associated kthread
> + *	delayed work when the timer expires.
> + * @__data: pointer to the data associated with the timer
> + *
> + * The format of the function is defined by struct timer_list.
> + * It should have been called from irqsafe timer with irq already off.
> + */
> +void kthread_delayed_work_timer_fn(unsigned long __data)
> +{
> +	struct kthread_delayed_work *dwork =
> +		(struct kthread_delayed_work *)__data;
> +	struct kthread_work *work = &dwork->work;
> +	struct kthread_worker *worker = work->worker;
> +
> +	/*
> +	 * This might happen when a pending work is reinitialized.
> +	 * It means that it is used a wrong way.
> +	 */
> +	if (WARN_ON_ONCE(!worker))
> +		return;
> +
> +	spin_lock(&worker->lock);
> +	/* Work must not be used with more workers, see kthread_queue_work(). */
                                         ^
					 ditto, this reads weird

Other than that,

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

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


Thread

[PATCH v9 09/12] kthread: Initial support for delayed kthread work Petr Mladek <pmladek@suse.com> - 2016-06-16 13:20 +0200
  Re: [PATCH v9 09/12] kthread: Initial support for delayed kthread  work Tejun Heo <tj@kernel.org> - 2016-06-20 22:30 +0200

csiph-web