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: [email protected]
          Reporter: [email protected]

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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to