Skip to content

Add bind modes tests and run on multi-numa machine #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 25, 2024

Conversation

lukaszstolarczuk
Copy link
Contributor

@lukaszstolarczuk lukaszstolarczuk commented Apr 5, 2024

Description

Continuation of #241.

  • Rebased on the latest main
  • Added multi_numa workflow

Ref: #242

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

Copy link
Member

@igchor igchor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you going to address the following in this PR?:

We should check that policies like 'preferred' actually fall back to other nodes in case there is not enough memory on the specified node. Also, for modes that should fail if there is not enough memory we should test they actually do fail. One way to do that would be to add some kind of env variable which, if set, we could use to specify NUMA node on which we want to allocate (and use it for all binding tests). Then, we could run those tests in an environment with some custom NUMA nodes

// Test for allocations on numa nodes. This test will be executed for all numa nodes
// available on the system. The available nodes are returned in vector from the
// get_available_numa_nodes_numbers() function and passed to test as parameters.
TEST_P(testNumaNodes, checkNumaNodesAllocations) {
TEST_P(testNumaOnAllNodes, checkNumaNodesAllocations) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to have a test case for BIND where you set multiple NUMA nodes in node mask. This is allowed according to the documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, but I'm not sure which exactly node should be retrieved.

According to man mbind:

If nodemask specifies more than one node, page allocations
will come from the node with sufficient free memory that
is closest to the node where the allocation takes place.

According to man set_mempolicy:

If nodemask specifies more than one node, page allocations will come from
the node with the lowest numeric node ID first

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we rely on the mbind behavior (proximity of the nodes) so it would be good to verify that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, you're right. Done.

@lukaszstolarczuk lukaszstolarczuk marked this pull request as draft April 15, 2024 09:41
@lukaszstolarczuk lukaszstolarczuk marked this pull request as ready for review April 23, 2024 13:02
@lukaszstolarczuk
Copy link
Contributor Author

@lukaszstolarczuk lukaszstolarczuk force-pushed the dd_bind_modes_tests branch 2 times, most recently from 2033b40 to c53884a Compare April 25, 2024 10:53
Extend current tests with more checks and more cases.
Run selected cases on all CPUs or all NUMA nodes.
The version we install is probably too old for multi-numa tests.
@bratpiorka bratpiorka merged commit 129a2ad into oneapi-src:main Apr 25, 2024
@lukaszstolarczuk lukaszstolarczuk deleted the dd_bind_modes_tests branch April 25, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants