[Bug 210098] Refine slightly search of highest priority thread on the queue(sleepq_signal).

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jun 7 12:34:50 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210098

            Bug ID: 210098
           Summary: Refine slightly search of highest priority thread on
                    the queue(sleepq_signal).
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: bltsrc at mail.ru

Created attachment 171139
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=171139&action=edit
patch loop by eliminating otherwise redundant comparisons besttd against NULL.

File:          kern/subr_sleepqueue.c
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list