lkml.org 
[lkml]   [2009]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 17/21] workqueue: simple reimplementation of SINGLE_THREAD workqueue
From
Date
On Tue, 2009-11-17 at 02:15 +0900, Tejun Heo wrote:
> SINGLE_THREAD workqueues are used to reduce the number of worker
> threads and ease synchronization.

Wireless (mac80211) also requires that the order in which different work
structs are queued up is identical to the processing order. At least
some code was written with that assumption in mind, and I think it's
actually required in a few places.

Also, that unlikely() here:

> + if (unlikely(single_thread)) {
> + mutex_lock(&wq->single_thread_mutex);
> + f(work);
> + mutex_unlock(&wq->single_thread_mutex);
> + } else
> + f(work);

seems wrong, there are many single-threaded workqueues after all.

johannes
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-11-17 15:07    [W:1.707 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site