IP Library Granted Patent US 11,550,607
Granted Patent B2
US 11,550,607 · App. 16/585,067 · Granted Jan 10, 2023

Processor core power management in a virtualized environment

Inventor: Bandan Das (Westford, MA)
Assignee: Red Hat, Inc.
G06F9/45558G06F1/28G06F9/4856G06F9/5094G06F2009/4557
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,550,607
App. No.
16/585,067
Granted
Jan 10, 2023
Kind
B2
Abstract

Processor core power management in a virtualized environment. A hypervisor, executing on a processor device of a computing host, the processor device having a plurality of processor cores, receives from a guest operating system of a virtual machine, a request to set a virtual central processing unit (VCPU) of the virtual machine to a first requested P-state level of a plurality of P-state levels. Based on the request, the hypervisor associates the VCPU with a first processor core having a P-state that corresponds to the first requested P-state level.

Claims (74)

1. A method comprising:

determining, by a first guest operating system (OS) of a first virtual machine (VM), that a first process is to be initiated, the first guest OS executing on a processor device of a computing host, the processor device having a plurality of processor cores;

accessing a data structure that identifies a plurality of processes including the first process and a second process that is not executing, and, for each process of the plurality of processes, identifies a corresponding P-state level or C-state level;

determining, by the first guest OS based on the data structure, that a first P-state level of a plurality of P-state levels corresponds to the first process;

communicating a request to a hypervisor executing on the computing host to set a virtual central processing unit (VCPU) of the first VM to the first P-state level;

receiving, by the hypervisor from the first guest OS, the request;

based on the request, associating, by the hypervisor, the VCPU with a first processor core having a P-state that corresponds to the first P-state level;

executing the first virtual machine utilizing the VCPU associated with the first processor core:

subsequent to associating the VCPU with the first processor core, having the P-state that corresponds to the first P-state level, receiving, by the hypervisor from the first guest OS, a request to set the VCPU to a first idle C-state level; and

in response to the request to set the VCPU to the first idle C-state level, associating the VCPU with a processor core having a C-state that corresponds to the first idle C-state level.

2. The method of claim 1 further comprising:

determining, by the hypervisor, a plurality of different P-states to which the plurality of processor cores of the processor device can be set; and

communicating, by the hypervisor to the first guest OS, the plurality of P-state levels based on the plurality of different P-states.

3. The method of claim 2 wherein the plurality of P-state levels is a subset of the plurality of different P-states.

4. The method of claim 1 further comprising:

subsequent to associating the VCPU with the first processor core having the P-state that corresponds to the first P-state level, receiving, by the hypervisor from the first guest OS, a request to set the VCPU to a second P-state level; and

in response to the request to set the VCPU to the second P-state level, associating the VCPU with a processor core having a P-state that corresponds to the second P-state level.

5. The method of claim 1 wherein associating the VCPU with the first processor core having the P-state that corresponds to the first P-state level comprises setting a P-state of the first processor core that is associated with the VCPU to the P-state that corresponds to the first P-state level.

6. The method of claim 1 wherein associating the VCPU with the first processor core having the P-state that corresponds to the first P-state level comprises:

identifying, based on the first P-state level, a particular computing host of a plurality of computing hosts; and

migrating the first VM to the particular computing host.

7. The method of claim 6 wherein identifying, based on the first P-state level, the particular computing host of the plurality of computing hosts further comprises:

accessing a computing host table that correlates each computing host of the plurality of computing hosts to a corresponding P-state; and

determining, based on the computing host table, that the corresponding P-state of the particular computing host corresponds to the first P-state level.

8. The method of claim 1 further comprising:

receiving, by the hypervisor from a second guest OS of a second VM executing on the computing host, a request to set a VCPU of the second VM to a second P-state level of the plurality of P-state levels; and

based on the request, associating the VCPU of the second VM with a second processor core having a P-state that corresponds to the second P-state level.

9. The method of claim 1 further comprising:

receiving, by the hypervisor from a second guest OS of a second VM executing on the computing host, a request to set a VCPU of the second VM to a second P-state level of the plurality of P-state levels;

accessing a P-state authorization list that identifies a subset of P-state levels of the plurality of P-state levels to which the second guest OS can request a VCPU be set;

determining that the second P-state level is not in the subset of P-state levels; and

in response to determining that the second P-state level is not in the subset of P-state levels, rejecting the request to set the VCPU of the second VM to the second P-state level and not associating the VCPU of the second VM with a second processor core having a P-state that corresponds to the second P-state level.

10. The method of claim 1 further comprising:

determining, by the first guest OS, that the second process is to be initiated;

accessing the data structure to determine the P-state level corresponding to the second process; and

communicating, by the first guest OS, a request to the hypervisor to set a VCPU of the first VM to the P-state level corresponding to the second process.

11. A computing device comprising:

a memory; and

a processor device having a plurality of processor cores, the processor device being coupled to the memory to:

determine, by a first guest operating system (OS) of a first virtual machine (VM), that a first process is to be initiated, the first guest OS executing on the processor device of the computing device;

access a data structure that identifies a plurality of processes including the first process and a second process that is not executing, and, for each process of the plurality of processes, identifies a corresponding P-state level or C-state level;

determine, by the first guest OS based on the data structure, that a first P-state level of a plurality of P-state levels corresponds to the first process;

communicate a request to a hypervisor executing on the computing host to set a virtual central processing unit (VCPU) of the first VM to the first P-state level;

receive, by the hypervisor from the first guest OS, the request;

based on the request, associate, by the hypervisor, the VCPU with a first processor core having a P-state that corresponds to the first P-state level;

execute the first virtual machine utilizing the VCPU associated with the first processor core;

subsequent to associating the VCPU with the first processor core, having the P-state that corresponds to the first P-state level, receive, by the hypervisor from the first guest OS, a request to set the VCPU to a first idle C-state level; and

in response to the request to set the VCPU to the first idle C-state level, associate the VCPU with a processor core having a C-state that corresponds to the first idle C-state level.

12. The computing device of claim 11 wherein to associate the VCPU with the first processor core having the P-state that corresponds to the first P-state level, the processor device is to:

identify, based on the first P-state level, a particular computing host of a plurality of computing hosts; and

migrate the first VM to the particular computing host.

13. The computing device of claim 11 wherein the processor device is further to:

determine, by the first guest OS, the first P-state level of the plurality of P-state levels; and

communicate the request to the hypervisor to set the VCPU to the first P-state level.

14. The computing device of claim 13 wherein to communicate the request to the hypervisor to set the VCPU to the first P-state level, the processor device is further to write the first P-state level to a model specific register (MSR) of the VCPU.

15. The computing device of claim 13 wherein to determine, by the first guest OS, the first P-state level of the plurality of P-state levels, the processor device is further to receive, via an operator command, information that identifies the first P-state level.

16. The computing device of claim 13 wherein to determine, by the first guest OS, the first P-state level of the plurality of P-state levels, the processor device is further to:

determine, by the first guest OS, that a process is to be initiated; and

access the data structure that identifies the process and the first P-state level.

17. The computing device of claim 13 wherein to determine, by the first guest OS, the first P-state level of the plurality of P-state levels, the processor device is further to:

determine that a process is to be initiated by the first guest OS;

access the data structure that identifies the plurality of processes and, for each process, identifies the corresponding P-state level or C-state level;

determine that the process is not identified in the data structure; and

determine a default P-state level, wherein the first P-state level is set to the default P-state level.

18. A non-transitory computer-readable storage medium that includes executable instructions to cause a processor device to:

determine, by a first guest operating system (OS) of a first virtual machine (VM), that a first process is to be initiated, the first guest OS executing on a processor device of a computing host, the processor device having a plurality of processor cores;

access a data structure that identifies a plurality of processes including the first process and a second process that is not executing, and, for each process of the plurality of processes, identifies a corresponding P-state level or C-state level;

determine, by the first guest OS based on the data structure, that a first P-state level of a plurality of P-state levels corresponds to the first process;

communicate a request to a hypervisor executing on the computing host to set a virtual central processing unit (VCPU) of the first VM to the first P-state level;

receive, by the hypervisor from the first guest OS, the request;

based on the request, associate, by the hypervisor, the VCPU with a first processor core having a P-state that corresponds to the first P-state level;

execute the first virtual machine utilizing the VCPU associated with the first processor core;

subsequent to associating the VCPU with the first processor core, having the P-state that corresponds to the first P-state level, receive, by the hypervisor from the first guest OS, a request to set the VCPU to a first idle C-state level; and

in response to the request to set the VCPU to the first idle C-state level, associate the VCPU with a processor core having a C-state that corresponds to the first idle C-state level.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 27, 2019
From: DAS, BANDAN
To: RED HAT, INC.
Reel/Frame 050510/0570 →
Continuity (1)
Related Publication 20210096896A1 · Apr 1, 2021