[libdispatch-dev] testing tree now ported/automaked and committed

Robert Watson robert at fledge.watson.org
Thu Nov 5 07:52:27 PST 2009

On Thu, 5 Nov 2009, William Siegrist wrote:

> On Nov 5, 2009, at 1:18 AM, Robert Watson wrote:
>> Failure:
>>  dispatch_priority        * Blocks complete but fails precedence test
> Part (or all) of your problem might be not feeding the test enough work. If 
> your machine is powerful enough, all of the work will get to run as soon as 
> its ready and priority will never come into play. So try increasing the 
> amount of work you give the test.

I wondered this, but when I increased the work by an order of magnitude, the 
same issue occurred:

[TEST] Dispatch Priority
[PID] 9828

LOW: 68
HIGH: 65
 	Actual: 192
 	Expected: 192
[PASS] blocks completed
 	Actual: 68
 	Expected: <65
[FAIL] high priority precedence (dispatch_priority.c:86)

So it looks like they're being scheduled moderately fairly.  A bit of 
grepping, but perhaps not entirely mature, search of the libdispatch code 
suggests that GCD priorities are not propagated to kernel thread priorities 
unless pthread work queues are used?

Robert N M Watson
Computer Laboratory
University of Cambridge

More information about the libdispatch-dev mailing list