[libdispatch-dev] linux pthread_workqueue support

Pierre Habouzit pierre.habouzit at intersec.com
Tue Feb 7 04:55:27 PST 2012


I've written a proof-of-concept module of what could be a Linux way of
supporting thread pool regulation, and in particular pthread_worqueue
kind of API. [0]

I've published the code on [1] and you can have a look at how the kernel
support "works" on [2] (asciidoc generated, may be a bit late from the
one in the repository).

On [3] there is a small "library", more like hints of how to use the
API. I sadly don't have enough time to make a tentative port of mark's
libpthread-workqueue using this kernel module, hence wonder if there are
people who would be interested into that kind of work.


PS: the kernel module has been tested very lightly with stuff like [4],
    I've, *I think*, found all the possible issues and are reasonably
    confident with the correctness of the code. Though I'd strongly
    advise you to use it in a virtual machine at first. It mucks about
    with the scheduler, very bad things can happen which often results
    in deadlocked kernel at best, kernel panics at worst…

 [0] https://plus.google.com/102418560027665797123/posts/jQMUfb53c5n
 [1] http://git.madism.org/?p=~madcoder/pwqr.git;a=summary
 [2] http://madism.org/~madcoder/pwqr.html
 [3] http://git.madism.org/?p=~madcoder/pwqr.git;a=blob;f=lib/libpwqr.c;hb=HEAD
 [4] http://git.madism.org/?p=~madcoder/pwqr.git;a=blob;f=test/test.c;hb=HEAD

Intersec <http://www.intersec.com>
Pierre Habouzit <pierre.habouzit at intersec.com> | Chief Scientist
Mob : +33 (0)6 1636 8131
37 Rue Pierre Lhomme
92400 Courbevoie

More information about the libdispatch-dev mailing list