lkml.org 
[lkml]   [2013]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/13] workqueue: don't set work cwq until we queued it on pool
Hey, Lai.

On Tue, Feb 05, 2013 at 11:00:42PM +0800, Lai Jiangshan wrote:
> The @cpu can be WORK_CPU_UNBOUND, and the current code will delay
> to determine on which cpu should this work be queued until timeout,
> I didn't want to change this behavior when I wrote the patch.

Hmmm? The current code determines the CPU on queue_delayed_work().

/*
* If we cannot get the last pool from @work directly,
* select the last CPU such that it avoids unnecessarily
* triggering non-reentrancy check in __queue_work().
*/
lcpu = cpu;
if (pool)
lcpu = pool->cpu;
if (lcpu == WORK_CPU_UNBOUND)
lcpu = raw_smp_processor_id();

@lcpu is never WORK_CPU_UNBOUND for bound workqueues and for unbound
workqueues we of course have cwq for WORK_CPU_UNBOUND.

> PS, again, @cpu and @wq can be saved/encoded in dwork.work.entry if needed.

If possible, I'd much prefer to keep it inside delayed_work() proper.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2013-02-05 18:42    [W:0.476 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site