Skip to content

Commit

Permalink
Allocate resources based on partitions instead of co-locales
Browse files Browse the repository at this point in the history
If the number of nodes does not evenly divide the number of locales there will
be a "remainder node" that has fewer co-locales than the other nodes.
Previously, there was some special-casing to deal with the remainder node
which was clunky and error-prone. This commit introduces the "partition"
abstraction in which the number of partitions on each node is the expected
number of co-locales on the node. All nodes, including the remainder node,
allocate resources based on partitions, then assign co-locales to partitions.
On the remainder node this means that some partitions (and therefore
resources) go unused, but this is what we want because all locales should
have the same amount of resources. This greatly cleans up the code.

In addition, oversubscription handling is cleaner. If there are locales on
the node, but the expected number of co-locales is zero, the node is
oversubscribed and all locales share all resources.

Also added some remainder node and oversubsciption tests.

Signed-off-by: John H. Hartman <jhh67@users.noreply.github.com>
  • Loading branch information
jhh67 committed Oct 8, 2024
1 parent b49c745 commit 7a25877
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 119 deletions.
Loading

0 comments on commit 7a25877

Please sign in to comment.