~sdeziel/apparmor/wireshark-refresh

Viewing all changes in revision 3436.

  • Committer: John Johansen
  • Date: 2016-04-11 23:22:12 UTC
  • Revision ID: john.johansen@canonical.com-20160411232212-309i9zc6sx7x3vwk
Enable dynamically scaling max jobs if new resources are brought online

BugLink: http://bugs.launchpad.net/bugs/1566490

This patch enables to parser to scale the max jobs if new resources are
being brought online by the scheduler.

It only enables the scaling check if there is a difference between the
maximum number of cpus (CONF) and the number of online (ONLN) cpus.

Instead of checking for more resources regardless, of whether the online
cpu count is increasing it limits its checking to a maximum of
MAX CPUS + 1 - ONLN cpus times. With each check coming after fork spawns a
new work unit, giving the scheduler a chance to bring new cpus online
before the next check.  The +1 ensures the checks will be done at least
once after the scheduling task sleeps waiting for its children giving
the scheduler an extra chance to bring cpus online.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: