lkml.org 
[lkml]   [2012]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 2/6] workqueue: correct req_cpu in trace_workqueue_queue_work()
From
2012/8/15 Tejun Heo <tj@kernel.org>:
> Hello,
>
> On Wed, Aug 15, 2012 at 03:10:12AM +0900, Joonsoo Kim wrote:
>> When we do tracing workqueue_queue_work(), it records requested cpu.
>> But, if !(@wq->flag & WQ_UNBOUND) and @cpu is WORK_CPU_UNBOUND,
>> requested cpu is changed as local cpu.
>> In case of @wq->flag & WQ_UNBOUND, above change is not occured,
>> therefore it is reasonable to correct it.
>>
>> Use temporary local variable for storing local cpu.
>>
>> Signed-off-by: Joonsoo Kim <js1304@gmail.com>
>>
>> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
>> index 49d8f4a..6a17ab0 100644
>> --- a/kernel/workqueue.c
>> +++ b/kernel/workqueue.c
>> @@ -1198,6 +1198,7 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq,
>> struct cpu_workqueue_struct *cwq;
>> struct list_head *worklist;
>> unsigned int work_flags;
>> + unsigned int lcpu;
>
> @lcpu in __queue_delayed_work() stands for "last cpu", which is kinda
> weird here. Maybe just add "unsigned int req_cpu = cpu" at the top of
> the function and use it for the TP?

Okay! It looks better.
I will re-send v3 of two patches commented from u.
Thanks!


\
 
 \ /
  Last update: 2012-08-14 21:42    [W:0.078 / U:1.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site