lkml.org 
[lkml]   [2010]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] workqueues: microoptimize set_wq_data()
Hello, again.

On 02/25/2010 12:10 PM, Tejun Heo wrote:
>> @@ -220,12 +220,9 @@ struct cpu_workqueue_struct *wq_per_cpu(
>> static inline void set_wq_data(struct work_struct *work,
>> struct cpu_workqueue_struct *cwq)
>> {
>> - unsigned long new;
>> -
>> - BUG_ON(!work_pending(work));
>> -
>> - new = (unsigned long) cwq | (1UL << WORK_STRUCT_PENDING);
>> + unsigned long new = (unsigned long)cwq;
>> new |= WORK_STRUCT_FLAG_MASK & *work_data_bits(work);
>> + BUG_ON(!(new & (1UL << WORK_STRUCT_PENDING)));
>> atomic_long_set(&work->data, new);
>
> Will apply under cmwq patches for the next merge window.

Turns out I already have a patch which kills the second
work_data_bits() dereferencing in the series. The first one is now in
the cmwq series which is about to be posted again.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2010-02-25 11:27    [W:0.078 / U:4.336 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site