Created attachment 171139 [details]
patch loop by eliminating otherwise redundant comparisons besttd against NULL.
File revision: r300109
Slightly optimise searching of highest priority thread
on the queue by initializing besttd to first element on the tailq
and then iterating over sq_blocked[queue] starting from second element, thus utilizing TAILQ_FOREACH_FROM. Also catch empty queue of blocked threads by early testing besttd after first assignment.
Mark, could you please mark the bug as solved? Thanks.