Francois Gouget : testbot: Make the job scheduler more extensible.

Alexandre Julliard julliard at winehq.org
Mon Feb 19 13:24:19 CST 2018


Module: tools
Branch: master
Commit: 66723015efdc15538bbb8c01ea91543f68893627
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=66723015efdc15538bbb8c01ea91543f68893627

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Feb 19 04:25:04 2018 +0100

testbot: Make the job scheduler more extensible.

- The new scheduler splits the work into smaller steps: assessing the
  current situation, starting tasks on idle VMs and building a list of
  needed VMs, reverting the VMs, powering off the remaining VMs,
  updating the activity records. Each part can be analyzed
  independently. It uses the $Sched structure to pass information
  between these functions.
- Sometimes a VM that no Task needs must be powered off in order to be
  able to prepare a VM that is needed. The job of picking which VM to
  sacrifice is now delegated to _SacrificeVM().
- The scheduler used to handle each VM host independently. As a result
  it was unable to prepare a VM for the 'next step' if that VM was on
  another VM host. The lack of a global picture also made many other
  extensions impossible. The new scheduler handles scheduling on all
  VM hosts at the same time, thus solving this issue.
- This and other improvements mean the scheduler no longer needs to loop
  over the jobs and tasks multiple times.
- In order to respect the per-VM-host limits the scheduler stores the
  host-related counters and limits in the $Sched->{hosts} table.
- The scheduler also used to build multiple lists of VMs to revert
  depending on whether they were needed now, for the next step, or for
  future jobs. The new scheduler builds a single prioritised list of
  VMs to revert which can be handled in one go. It also keeps more
  information so it can better decide which VM to prepare next.
- The scheduler can now also prepare VMs for the 'next step' earlier,
  thus making it more likely they will be ready in time.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/lib/WineTestBot/Jobs.pm | 914 ++++++++++++++++++++++++++++------------
 1 file changed, 637 insertions(+), 277 deletions(-)

Diff:   https://source.winehq.org/git/tools.git/?a=commitdiff;h=66723015efdc15538bbb8c01ea91543f68893627



More information about the wine-cvs mailing list