[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B02CE28.1070209@kernel.org>
Date: Wed, 18 Nov 2009 01:24:08 +0900
From: Tejun Heo <tj@...nel.org>
To: Johannes Berg <johannes@...solutions.net>
CC: linux-kernel@...r.kernel.org, jeff@...zik.org, mingo@...e.hu,
akpm@...ux-foundation.org, jens.axboe@...cle.com,
rusty@...tcorp.com.au, cl@...ux-foundation.org,
dhowells@...hat.com, arjan@...ux.intel.com,
torvalds@...ux-foundation.org, avi@...hat.com,
peterz@...radead.org, andi@...stfloor.org, fweisbec@...il.com
Subject: Re: [PATCH 17/21] workqueue: simple reimplementation of SINGLE_THREAD
workqueue
Hello,
11/17/2009 11:03 PM, Johannes Berg wrote:
> 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.
Thanks for pointing it out.
> 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.
Well, most single threaded users which chose single threaded queue to
reduce the number of threads won't need to, so I'm expecting the
number of single threaded users to drop. I'll probably drop the
unlikely on the next round.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists