# US 2019/0377612 A1 · VCPU Thread Scheduling Method and Apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0377612 A1
- Document ID: US20190377612A1
- Status: Published application
- Kind: A1
- Application number: 16/545,093
- Filed: 2019-08-20
- Published: 2019-12-12
- Earliest claimed: 2017-02-20
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Yijun Zhu; Shenglong Zhao
- Web page: https://patentgrep.com/patent/US20190377612A1

## CPC

- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06F 9/5044: {considering hardware capabilities}
- G06F 9/5077: {Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455)}
- G06F 9/45533: {Hypervisors; Virtual machine monitors}
- G06F 2209/501: Performance criteria
- G06F 2209/5018: Thread allocation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A virtual central processing unit (VCPU) thread scheduling method and apparatus includes obtaining a performance indicator required by a VCPU thread in a to-be-created VM, where the performance indicator indicates a specification feature required by the VM; creating the VCPU thread according to the performance indicator required by the VCPU thread; determining, from physical CPU information, a target physical CPU group that satisfies the performance indicator of the VCPU thread, where the physical CPU information includes at least one physical CPU group and each physical CPU group includes at least one physical CPU with a same performance indicator; and running the VCPU thread on at least one physical CPU in the target physical CPU group.

## Claims

### Claim 1

A virtual central processing unit (VCPU) thread scheduling method, comprising:
obtaining a performance indicator required by a VCPU thread of a virtual machine (VM), wherein the performance indicator indicates a specification feature of the VCPU;
creating the VCPU thread according to the performance indicator;
determining, from physical central processing unit (CPU) information, a target physical CPU group that satisfies the performance indicator, wherein the physical CPU information comprises information on at least one physical CPU group, and wherein the at least one physical CPU group comprises a first physical CPU with a same performance indicator as the performance indicator; and
running the VCPU thread on the first physical CPU in the target physical CPU group.

### Claim 2 (depends on 1)

The VCPU thread scheduling method of claim 1, wherein before the determining, the VCPU thread scheduling method further comprises:
obtaining performance indicators of N physical CPUs, wherein N>1; and
classifying, according to the performance indicators of the N physical CPUs, physical CPUs comprising the performance indicator into one physical CPU group to obtain the at least one physical CPU group.

### Claim 3 (depends on 2)

The VCPU thread scheduling method of claim 2, further comprising using, as the physical CPU information, a correspondence between each of the at least one physical CPU group and a performance indicator indicated by the physical CPU group.

### Claim 4 (depends on 1)

The VCPU thread scheduling method of claim 1, wherein the obtaining comprises:
creating a virtual operating system emulator (QEMU) main thread of the VM; and
using a performance indicator of a second physical CPU running the QEMU main thread as the performance indicator required by the VCPU thread.

### Claim 5 (depends on 1)

The VCPU thread scheduling method of claim 1, wherein the obtaining comprises obtaining preset VM configuration information, wherein the preset VM configuration information comprises the performance indicator.

### Claim 6 (depends on 1)

The VCPU thread scheduling method of claim 1, wherein the performance indicator comprises model information of the VCPU, and wherein a performance indicator of the physical CPU is model information of the physical CPU.

### Claim 7

A physical computer, comprising:
a hardware layer comprising N physical central processing units (CPUs), wherein N>1;
a host running on the hardware layer;
at least one virtual machine (VM) running on the host, wherein the host is configured to:
obtain a performance indicator required by a virtual central processing unit (VCPU) thread for a VM, wherein the performance indicator indicates a specification feature of the VCPU thread;
create the VCPU thread according to the performance indicator;
determine, from physical central processing unit (CPU) information, a target physical CPU group that satisfies the performance indicator, wherein the physical CPU information comprises information on at least one physical CPU group, and wherein the at least one physical CPU group comprises a first physical CPU with a same performance indicator as the performance indicator; and
run the VCPU thread on the first physical CPU in the target physical CPU group.

### Claim 8 (depends on 7)

The physical computer of claim 7, wherein the host is further configured to:
obtain performance indicators of the N physical CPUs; and
classify, according to the performance indicators of the N physical CPUs, physical CPUs comprising the performance indicator into one physical CPU group to obtain the at least one physical CPU group.

### Claim 9 (depends on 8)

The physical computer of claim 8, wherein the host is further configured to use, as the physical CPU information, a correspondence between each of the at least one physical CPU group and a performance indicator indicated by the physical CPU group.

### Claim 10 (depends on 7)

The physical computer of claim 7, wherein the host is further configured to:
create a virtual operating system emulator (QEMU) main thread of the at least one VM; and
use a performance indicator of a second physical CPU running the QEMU main thread as the performance indicator required by the VCPU thread.

### Claim 11 (depends on 7)

The physical computer of claim 7, wherein the host is further configured to obtain preset VM configuration information, wherein the preset VM configuration information comprises the performance indicator.

### Claim 12 (depends on 7)

The physical computer of claim 7, wherein the performance indicator comprises model information of the VCPU, and wherein a performance indicator of the first physical CPU is model information of the first physical CPU.

### Claim 13

A computer program product comprising computer executable instructions stored on a non-transitory computer-readable medium that, when executed by one or more physical processors, cause the o apparatus to:
obtain a performance indicator required by a virtual central processing unit (VCPU) thread in a virtual machine (VM), wherein the performance indicator indicates a specification feature of the VCPU thread;
create the VCPU thread according to the performance indicator;
determine, from physical CPU information, a target physical CPU group that satisfies the performance indicator, wherein the physical CPU information comprises information on at least one physical CPU group, and wherein the at least one physical CPU group comprises a first physical CPU with a same performance indicator as the performance indicator; and
run the VCPU thread the first physical CPU in the target physical CPU group.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the instructions further cause the apparatus to:
obtain performance indicators of N physical CPUs, wherein N>1; and
classify, according to the performance indicators of the N physical CPUs, physical CPUs comprising the performance indicator into one physical CPU group to obtain the at least one physical CPU group.

### Claim 15 (depends on 14)

The computer program product of claim 14, wherein the computer readable instructions further cause the one or more physical processors to use, as the physical CPU information, a correspondence between each of the at least one physical CPU group and a performance indicator indicated by the physical CPU group.

### Claim 16 (depends on 13)

The computer program product of claim 13, wherein the computer readable instructions further cause the one or more physical processors to:
create a virtual operating system emulator (QEMU) main thread of the VM; and
use a performance indicator of a second physical CPU running the QEMU main thread as the performance indicator required by the VCPU thread.

### Claim 17 (depends on 13)

The computer program product of claim 13, wherein the computer readable instructions further cause the one or more physical processors to obtain preset virtual machine configuration information, wherein the preset VM configuration information comprises the performance indicator.

### Claim 18 (depends on 13)

The computer program product of claim 13, wherein the performance indicator comprises model information of the VCPU, and wherein a performance indicator of the first physical CPU is model information of the first physical CPU.
