Date: Mon, 27 Nov 2017 17:51:02 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 223914] [PATCH] Fix bug in which the long term ULE load balancer is executed only once Message-ID: <bug-223914-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223914 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: freebsd-bugs@FreeBSD.org Reporter: justinien.bouron@epfl.ch Keywords: patch Created attachment 188323 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D188323&action= =3Dedit 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 fir= st 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 =3D=3D 0 ", once balance_ticks is 0, this condition will never be met, and thus the load balancer will never be execu= ted 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 va= lue *before* the if branch "if (smp_started =3D=3D 0 || rebalance =3D=3D 0)". T= hat way we are sure that the load balancer is re-scheduled. --=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-223914-8>