Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Jun 2016 12:34:50 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 210098] Refine slightly search of highest priority thread on the queue(sleepq_signal).
Message-ID:  <bug-210098-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D210098

            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@FreeBSD.org
          Reporter: bltsrc@mail.ru

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

File:          kern/subr_sleepqueue.c
File revision: r300109

Slightly optimise searching of highest priority thread=20
on the queue by initializing besttd to first element on the tailq=20
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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-210098-8>