Re: [PATCH 2/3] workqueues: microoptimize set_wq_data()

From: Oleg Nesterov
Date: Thu Feb 25 2010 - 08:57:00 EST


Hi,

On 02/25, Tejun Heo wrote:
>
> 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.

OK, good.

Tejun, where can I find your cmwq patches? I'd like to take a look.

Thanks,

Oleg.

--
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/