Skip to content
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

Validate NUMA support and sockets equal to NUMA nodes for resize and pin #76

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

liranr23
Copy link
Member

When running a VM with 'Resize and Pin' CPU pinning policy, the algorithm
expects the host to have the same number of sockets and NUMA nodes. That
way the algorithm fits the topology and leaves the first core on each
socket free to the host.

This patch filters out hosts that don't have an equal number of sockets
and NUMA nodes in the NUMA filter policy when trying to run a VM with CPU
pinning policy Resize and Pin.

Change-Id: Icdc1ac910eb733f6edd861d0505fb90a581224b5
Bug-Url: https://bugzilla.redhat.com/1955388
Signed-off-by: Liran Rotenberg lrotenbe@redhat.com

@ahadas ahadas added the virt label Feb 14, 2022
@liranr23 liranr23 changed the title core: validate amount of sockets equal to that of numa nodes Validate NUMA support and sockets equal to NUMA nodes for resize and pin Jun 22, 2022
@liranr23
Copy link
Member Author

/ost

Copy link
Contributor

@ljelinkova ljelinkova left a comment

Choose a reason for hiding this comment

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

Why already handle some topology requirements for resize and pin in CpuTopologyPolicyUnit - what about adding it there so that it is in one place?

@liranr23
Copy link
Member Author

Why already handle some topology requirements for resize and pin in CpuTopologyPolicyUnit - what about adding it there so that it is in one place?

Well, it relates to both. But it felt to me more related to NUMA. This will also solve two bugs (not allowing resize and pin on host without NUMA support and, making sure the host hardware is correct with sockets==numa nodes.

I can switch the equality check to CpuTopologyPolicyUnit if you really think it fits there

@ljelinkova
Copy link
Contributor

Yes, I really think it would make the code more readable when all cpu topology checks are in one place.

@liranr23
Copy link
Member Author

Yes, I really think it would make the code more readable when all cpu topology checks are in one place.

done

@liranr23
Copy link
Member Author

/ost

@liranr23
Copy link
Member Author

I split the PR into 2 separate commit as discussed offline with Lucia.

@liranr23
Copy link
Member Author

/ost

@ljelinkova
Copy link
Contributor

/ost

1 similar comment
@liranr23
Copy link
Member Author

/ost

@mz-pdm
Copy link
Member

mz-pdm commented Jul 14, 2022

@ahadas, any comments or can it be merged?

Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

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

please also make sure the first commit has everything that is needed to compile (it seems you added a missing import in the second commit)

@liranr23 liranr23 force-pushed the valid_equal_numa_autopin branch 2 times, most recently from a6e57d0 to 37927ad Compare July 18, 2022 08:38
@liranr23
Copy link
Member Author

/ost

1 similar comment
@liranr23
Copy link
Member Author

/ost

Copy link
Member

@ahadas ahadas left a comment

Choose a reason for hiding this comment

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

looks correct, minor comment inside

When running a VM with 'Resize and Pin' CPU pinning policy, the algorithm
expects the host to have the same number of sockets and NUMA nodes. That
way the algorithm fits the topology and leaves the first core on each
socket free to the host.

This patch filters out hosts that don't have an equal number of sockets
and NUMA nodes when trying to run a VM with CPU pinning policy
`Resize and Pin`.

Change-Id: Icdc1ac910eb733f6edd861d0505fb90a581224b5
Bug-Url: https://bugzilla.redhat.com/1955388
Signed-off-by: Liran Rotenberg <lrotenbe@redhat.com>
When having `Resize and Pin NUMA` VM that tries to schedule on a host,
it shouldn't run on a host without NUMA support.
This patch filter these host in the above scenario.

Change-Id: I41ae6d54625a2c14b749f6393c29059cbd53a6d7
Bug-Url: https://bugzilla.redhat.com/2056950
Signed-off-by: Liran Rotenberg <lrotenbe@redhat.com>
@ahadas
Copy link
Member

ahadas commented Jul 20, 2022

/ost

@ahadas ahadas merged commit 1ad0b10 into oVirt:master Jul 20, 2022
@liranr23 liranr23 deleted the valid_equal_numa_autopin branch July 20, 2022 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants