Change the tryAlloc/tryReloc workflow
Currently, the tryAlloc and tryReloc function return a list with all the results, both failures and successes. This is fine for hail, which does one round of allocations, but is not so good for hspace, which does iterative rounds; since at each (successful) step we only take the best solution, it means that we're using lots of heap space to compute and store node lists which are thrown away at the end of the step. This patch changes these two functions and their callers in hail/hspace to only return the best solution, and error/success counters. This allows hspace to run in a much smaller space, and reduces GC cost greatly. Overall, it is a cleanup, as hail/hspace did a lot of work to chose this best solution, whereas now it's automatically promoted within Cluster.concatAllocs.
Loading
Please register or sign in to comment