10 years agorework the quarantine: it doesn't really need to be accounted.
Pierre Habouzit [Sat, 14 Jan 2012 20:36:45 +0000 (21:36 +0100)]
rework the quarantine: it doesn't really need to be accounted.

The notion of quarantine is purely virtual and we only care about it at
WAKE time. It significantly simplifies the fastpath of our code, namely

Also allow the WAKE command to directly unpark threads if that fits with
the concurrency level. I don't really expect userland to really use that,
but it doesn't break anything and makes sense.

Signed-off-by: Pierre Habouzit <pierre.habouzit@intersec.com>
10 years agoImplement the reluctancy to unpark threads.
Pierre Habouzit [Sat, 14 Jan 2012 20:01:47 +0000 (21:01 +0100)]
Implement the reluctancy to unpark threads.

This means that a pool needs to undercommit for 0.1s before we allow it to
grow its number of in-pool threads.

Document the last todo: how to reduce the pool when we're overcommiting.
Right now we only pray that userland will put some threads to WAIT. But
frankly it's less than ideal. With the repulsion to start a new thread we
hope though that the overcommit will never ever grow out of proportion for

Signed-off-by: Pierre Habouzit <pierre.habouzit@intersec.com>
10 years agotypo
Pierre Habouzit [Sat, 14 Jan 2012 19:19:46 +0000 (20:19 +0100)]

Signed-off-by: Pierre Habouzit <pierre.habouzit@intersec.com>
10 years agoWrite some nice documentation about the design and APIs.
Pierre Habouzit [Sat, 14 Jan 2012 18:22:49 +0000 (19:22 +0100)]
Write some nice documentation about the design and APIs.

Signed-off-by: Pierre Habouzit <pierre.habouzit@intersec.com>
10 years agoPthread Workqueue Regulator (pwqr) initial commit.
Pierre Habouzit [Fri, 16 Dec 2011 15:24:24 +0000 (16:24 +0100)]
Pthread Workqueue Regulator (pwqr) initial commit.

This contains an alpha/beta quality kernel proof-of-concept driver, plus
some code concepts to wrap the syscall in lib/libpwqr.c

Signed-off-by: Pierre Habouzit <pierre.habouzit@intersec.com>