Re: [PATCH 03/13] workqueue: don't set work cwq until we queued iton pool

From: Tejun Heo
Date: Wed Feb 06 2013 - 09:18:17 EST


Hello, Lai.

On Wed, Feb 06, 2013 at 07:35:24PM +0800, Lai Jiangshan wrote:
> > @lcpu is never WORK_CPU_UNBOUND for bound workqueues and for unbound
> > workqueues we of course have cwq for WORK_CPU_UNBOUND.
>
>
> Are you sure?
> @lcpu is only used when it tries to set cwq to work data without
> breaking nrt logic.
>
> void delayed_work_timer_fn(unsigned long __data)
> {
> struct delayed_work *dwork = (struct delayed_work *)__data;
> struct cpu_workqueue_struct *cwq = get_work_cwq(&dwork->work);
>
> /* should have been called from irqsafe timer with irq already off */
> __queue_work(dwork->cpu, cwq->wq, &dwork->work);
> }

Ah, you're right. I was confused about ->cpu and cwq in ->data.
Yeah, let's just add ->wq as the original patch.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/