Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Mar 2020 22:19:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 197923] [patch] [sched] Fix comment in sched_balance_pair and move load check ahead of lock
Message-ID:  <bug-197923-227-ynwH79lrvs@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-197923-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-197923-227@https.bugs.freebsd.org/bugzilla/>

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

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markj@FreeBSD.org

--- Comment #7 from Mark Johnston <markj@FreeBSD.org> ---
The comment was corrected in r329844.  I think the rest of the patch is not
correct: high->tdq_transferable =3D=3D 0 implies that the run queue contain=
s 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 migrat=
ing
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.

--=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-197923-227-ynwH79lrvs>