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

Dedicated CPUs #65

Merged
merged 3 commits into from Mar 2, 2022
Merged

Dedicated CPUs #65

merged 3 commits into from Mar 2, 2022

Conversation

liranr23
Copy link
Member

@liranr23 liranr23 commented Feb 9, 2022

This PR is the implementation of https://bugzilla.redhat.com/1782077 on the engine side.

@ahadas ahadas added the virt label Feb 14, 2022
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.

don't get scared by the amount of comments, it's just a big PR

Copy link
Collaborator

@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.

The patch looks good, I have some comments but they can be addressed in follow up patches if needed.

@liranr23 liranr23 force-pushed the dedicated_cpus2 branch 2 times, most recently from 5af48ac to 1543954 Compare February 24, 2022 17:31
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.

partially reviewed

Copy link
Collaborator

@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.

Few comments (yeah, Github did not allow me to post my code comments without "Few comments" comment)

@liranr23
Copy link
Member Author

Something not good happened and I think I somehow mixed 2 commits into one...

Copy link
Collaborator

@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.

More comments

@liranr23 liranr23 force-pushed the dedicated_cpus2 branch 3 times, most recently from 0d4fb9b to 36757ba Compare March 1, 2022 15:32
@liranr23
Copy link
Member Author

liranr23 commented Mar 1, 2022

/ost

@liranr23
Copy link
Member Author

liranr23 commented Mar 1, 2022

/ost

1 similar comment
@liranr23
Copy link
Member Author

liranr23 commented Mar 1, 2022

/ost

This patch will hold the CpuTopology in VdsManager. Each VdsCpuUnit can
be pinned. Automatically, we pin the CPU that VDSM runs on.
The dedicated CPUs will be represented in a new PendingResource.

Once the host is initialized, the engine will look on the current
running VMs to set the CpuTopology pinned CPUs correctly. Upon shutdown,
we will clear the pinned CPUs.

A logic was added to the CpuPolicyUnit filtering, we will drop the
current pinned CPUs in order to let new VMs to run on that host, having
the right number of CPUs they can use. Also, when scheduling a dedicated
CPU VM, we check if the existing VMs would be able to schedule on that
host. If one of the condition is false, we will filter that host.

As for the CpuPinningPolicyUnit, we will check if we have the topology
data and if so, if we actually can pin the VM into the host. We wish to
have it with usage within the same socket (when the number of CPUs can
be within one socket), and the same for cores.

Change-Id: Ie258d30ce0696c79ad5432c270f4d94e6ef834ba
Bug-Url: https://bugzilla.redhat.com/1782077
Signed-off-by: Liran Rotenberg <lrotenbe@redhat.com>
Signed-off-by: Saif Abu Saleh <sabusale@redhat.com>
Copy link
Collaborator

@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.

LGTM

@liranr23
Copy link
Member Author

liranr23 commented Mar 2, 2022

/ost

This patch will take the VM's dedicate policy and pass it to the domxml
to let VDSM to consume it.

A metadata of cpuPolicy added to every policy. Once the CPU policy is
dedicated we will set it to the dynamic VM data and add it to the
domxml.

Change-Id: Ifa9376dc80e661d0a85435d2d7c72c5be838b06d
Bug-Url: https://bugzilla.redhat.com/1782077
Signed-off-by: Liran Rotenberg <lrotenbe@redhat.com>
Change-Id: Ic93761f565728d18e84b2c84d07e2ba600aaeba3
Bug-Url: https://bugzilla.redhat.com/1782077
Signed-off-by: Liran Rotenberg <lrotenbe@redhat.com>
@liranr23
Copy link
Member Author

liranr23 commented Mar 2, 2022

/ost

@ahadas ahadas merged commit 47eec5a into oVirt:master Mar 2, 2022
@liranr23 liranr23 deleted the dedicated_cpus2 branch March 15, 2022 07:46
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