As outlined in the previous design doc (design-predictive-queue.rst),
this commit provides the first (partial) implementation of such plan.

There is no starvation prevention yet, I will submit that in a follow-up
patch as this one was getting pretty big already.
The testing infrastructure is still a bit rough but I have another
patch ready to be sent that optimizes it with smarter quickcheck-generated
data after this one.

While most of this patch seems to be very verbose, it is because of the
need to export all the static lock declarations of each opcode, and
there are a lot of them unfortunately. I've tried to separate them and
make them as readable as possible as much as I could, but still it's
quite a lot.

What is still missing from this implementation, aside from the starvation
prevention system, is the ability to read locks from runtime data yet.
As outlined in the design doc, this will also be implemented in a further
patch.


Federico Morg Pareschi (1):
  First implementation of the predictive scheduler

 src/Ganeti/Config.hs                    |   1 +
 src/Ganeti/Constants.hs                 |  27 ++
 src/Ganeti/JQScheduler.hs               |  26 +-
 src/Ganeti/JQueue.hs                    |   1 +
 src/Ganeti/JQueue/LockDecls.hs          | 590 ++++++++++++++++++++++++
 src/Ganeti/Objects.hs                   |   1 -
 test/hs/Test/Ganeti/JQueue/LockDecls.hs | 150 ++++++
 test/hs/Test/Ganeti/Objects.hs          |  31 +-
 test/hs/Test/Ganeti/OpCodes.hs          | 777 ++++++++++++++++----------------
 test/hs/Test/Ganeti/TestCommon.hs       |  13 +-
 test/hs/htest.hs                        |   2 +
 11 files changed, 1221 insertions(+), 398 deletions(-)
 create mode 100644 src/Ganeti/JQueue/LockDecls.hs
 create mode 100644 test/hs/Test/Ganeti/JQueue/LockDecls.hs

--
2.8.0.rc3.226.g39d4020

Reply via email to