https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223914
Bug ID: 223914
Summary: [PATCH] Fix bug in which the long term ULE load
balancer is executed only once
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Keywords: patch
Severity: Affects Many People
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
Keywords: patch
Created attachment 188323
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=188323&action=edit
Patch for the ULE load balancer solving the issue of this bug report.
The load balancer of ULE has a bug which cause it to be executed only once at
startup, and it will *never* be executed again.
The reason is simple, when the sched_balance function is called for the first
time, the smp is not yet setup, and the function returns.
However the balance_tick variable is not resetted before the return and thus
will remains 0 for ever.
Because the condition in sched_clock to trigger the load balancer is :
" balance_ticks && --balance_ticks == 0 ", once balance_ticks is 0, this
condition will never be met, and thus the load balancer will never be executed
again.
To convince yourself you can even put a panic right before the call to
sched_balance_group in sched_balance, it will never panic ...
The fix is rather simple, just move the line resetting the balance_ticks value
*before* the if branch "if (smp_started == 0 || rebalance == 0)". That way we
are sure that the load balancer is re-scheduled.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"