[Bug 197923] [patch] [sched] Fix comment in sched_balance_pair and move load check ahead of lock
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Mar 22 22:19:21 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197923
Mark Johnston <markj at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |markj at FreeBSD.org
--- Comment #7 from Mark Johnston <markj at FreeBSD.org> ---
The comment was corrected in r329844. I think the rest of the patch is not
correct: high->tdq_transferable == 0 implies that the run queue contains no
thread that can migrate, so tdq_move() will always fail. We also should
perform the queue load comparison with the queue locks held, since the
situation may change after the queues are locked and we might end up migrating
a thread from a less-loaded queue to a more-loaded queue, which defeats the
goal of the code. sched_balance_pair()'s caller already does the work of
locklessly finding a pair of unbalanced queues.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list