summaryrefslogtreecommitdiff
path: root/mm/util.c
diff options
context:
space:
mode:
authorJoonsoo Kim <js1304@gmail.com>2012-08-15 14:25:38 (GMT)
committerTejun Heo <tj@kernel.org>2012-08-16 21:21:15 (GMT)
commite42986de481238204f6e0b0f4434da428895c20b (patch)
tree613150adf76500507ca69d59d5448fa05affbc98 /mm/util.c
parentb75cac9368fa91636e17d0f7950b35d837154e14 (diff)
downloadlinux-fsl-qoriq-e42986de481238204f6e0b0f4434da428895c20b.tar.xz
workqueue: change value of lcpu in __queue_delayed_work_on()
We assign cpu id into work struct's data field in __queue_delayed_work_on(). In current implementation, when work is come in first time, current running cpu id is assigned. If we do __queue_delayed_work_on() with CPU A on CPU B, __queue_work() invoked in delayed_work_timer_fn() go into the following sub-optimal path in case of WQ_NON_REENTRANT. gcwq = get_gcwq(cpu); if (wq->flags & WQ_NON_REENTRANT && (last_gcwq = get_work_gcwq(work)) && last_gcwq != gcwq) { Change lcpu to @cpu and rechange lcpu to local cpu if lcpu is WORK_CPU_UNBOUND. It is sufficient to prevent to go into sub-optimal path. tj: Slightly rephrased the comment. Signed-off-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'mm/util.c')
0 files changed, 0 insertions, 0 deletions