[DGD] Rewriting the main loop

Raymond Jennings shentino at gmail.com
Thu Nov 29 06:42:54 CET 2018


I rewrote dgd's main loop in a strict priority, with higher steps taking
strict precedence over those below, enforced by restarting the main loop
and not allowing lower priority tasks until the higher ones are completed.

1.  Interrupts
2.  I/O
3.  Callouts
4.  Swapping if ndata or nctrl > fragment
5.  Rebuild

For 3, callouts are done one at a time
For 2, pending rebuilds or swapping join pending callouts as a reason to
shorten the timeout
For 4, one object is swapped out at a time
For 5, one object is restored at a time

Interestingly enough I noticed about a 4 fold speedup in steps 2 and 3.



More information about the DGD mailing list