credit2: avoid picking a spurious idle unit when caps are used
authorDario Faggioli <dfaggioli@suse.com>
Wed, 25 Aug 2021 13:10:45 +0000 (15:10 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Aug 2021 13:10:45 +0000 (15:10 +0200)
commit58570591db5e29dd111db0aac4e8551b60718ae4
tree793019b5f965e5e4f7b02e3e8b43b982c47e534b
parent8df03ef746dec2d4612ef7ea1933e8066783ad27
credit2: avoid picking a spurious idle unit when caps are used

Commit 07b0eb5d0ef0 ("credit2: make sure we pick a runnable unit from the
runq if there is one") did not fix completely the problem of potentially
selecting a scheduling unit that will then not be able to run.

In fact, in case caps are used and the unit we are currently looking
at, during the runqueue scan, does not have enough budget for being run,
we should continue looking instead than giving up and picking the idle
unit.

Suggested-by: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 0f742839ae57e10687e7a573070c37430f31068c
master date: 2021-08-10 09:29:10 +0200
xen/common/sched/credit2.c