On 21.06.25 16:14, Koichiro Den wrote:
When a running unit is about to be scheduled out due to a competing unit with the highest remaining credit, the residual credit of the previous unit is currently ignored in csched2_runtime() because it hasn't yet been reinserted into the runqueue.As a result, two equally weighted, busy units can often each be granted almost the maximum possible runtime (i.e. consuming CSCHED2_CREDIT_INIT in one shot) when only those two are active. In broad strokes two units switch back and forth every 10ms (CSCHED2_MAX_TIMER). In contrast, when more than two busy units are competing, such coarse runtime allocations are rarely seen, since at least one active unit remains in the runqueue. To ensure consistent behavior, have csched2_runtime() take into account the previous unit's latest credit when it still can/wants to run. Signed-off-by: Koichiro Den <d...@valinux.co.jp>
Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature