[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c76f371a0912230101s7930a437h9c9582be34fc934e@mail.gmail.com>
Date: Wed, 23 Dec 2009 10:01:26 +0100
From: Stijn Devriendt <highguy@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Andi Kleen <andi@...stfloor.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>,
Arjan van de Ven <arjan@...ux.intel.com>,
Jens Axboe <jens.axboe@...cle.com>, awalls@...ix.net,
linux-kernel@...r.kernel.org, jeff@...zik.org, mi@...per.es
Subject: Re: workqueue thing
On Wed, Dec 23, 2009 at 9:43 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Wed, 2009-12-23 at 09:17 +0100, Stijn Devriendt wrote:
>> On Tue, Dec 22, 2009 at 7:07 PM, Andi Kleen <andi@...stfloor.org> wrote:
>> > One reason I liked a more dynamic frame work for this is that it
>> > has the potential to be exposed to user space and allow automatic
>> > work partitioning there based on available cores. User space
>> > has a lot more CPU consumption than the kernel.
>> >
>> Basically, this is exactly what I was trying to solve with my
>> sched_wait_block patch. It was broken in all ways, but the ultimate
>> goal was to have concurrency managed workqueues (to nick the term)
>> in userspace and have a way out when I/O hits the workqueue.
>
> Don't we have the problem of wakeup concurrency here?
>
> Forking on blocking is only half the problem (and imho the easy half).
>
>
The original design was to always have 1 spare thread handy that would
wait until the worker-thread blocked. At that point it would wakeup and
continue trying to keep the CPU busy.
The current perf-event approach is to have threads poll based upon the
concurrency as measured in the kernel by the perf-event. When too many
threads are on the runqueue, the poll() blocks. When threads go to sleep/block
another thread falls out of poll()to continue work.
Stijn
--
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