IP Library › Granted Patent US 10,768,960
Granted Patent B2
US 10,768,960 · App. 15/187,458 · Granted Sep 8, 2020

Method for affinity binding of interrupt of virtual network interface card, and computer device

Inventor: Hai Xia (Shenzhen, CN)
Assignee: Huawei Technologies Co., Ltd.
G06F9/45558G06F9/45537G06F9/4812G06F9/5077H04L12/4641G06F2009/45579G06F2009/45595
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 10,768,960
App. No.
15/187,458
Granted
Sep 8, 2020
Kind
B2
Abstract

The present invention discloses a method for affinity binding of interrupt of a virtual network interface card, and a computer device. The method includes: receiving a request message sent by an IaaS resource management system, where the request message carries an interrupt affinity policy parameter of a virtual network interface card; performing one-to-one correspondence affinity binding between multiple virtual central processing units VCPUs and multiple physical central processing units PCPUs; performing affinity binding between a virtual interrupt of the virtual network interface card and a VCPU; and performing affinity binding between a physical interrupt of the virtual network interface card and a corresponding PCPU according to the affinity policy parameter.

Claims (30)

1. A method for affinity binding of an interrupt of a virtual network interface card, wherein the method comprises:

receiving, by a computer device, a request message from an Infrastructure as a Service (IaaS) resource management system, wherein the request message carries an interrupt affinity policy parameter of the virtual network interface card;

enabling a capturing module included in a host operating system executed by the computer device based on the interrupt affinity policy parameter, wherein the capturing module is configured to, when enabled, capture an operation executed by a guest operating system of a virtual machine for performing an affinity binding of a virtual interrupt of the virtual network interface card and a first virtual central processing unit (CPU);

performing, by the computer device and in response to the capturing module being enabled, affinity binding between a physical interrupt of the virtual network interface card and a first physical CPU, wherein the first virtual CPU is in affinity binding with the first physical CPU;

processing interrupts of the virtual network interface card; and

performing affinity binding between the physical interrupt of the virtual network interface card and a second physical CPU in response to the capturing module detecting the virtual interrupt of the virtual network interface card changing to be in affinity binding with a second virtual CPU, wherein the second virtual CPU is in affinity binding with the second physical CPU.

2. The method according to claim 1 , wherein performing the affinity binding between the physical interrupt of the virtual network interface card and the first physical CPU further comprises:

finding a corresponding physical interrupt number according to a virtual interrupt number of the virtual network interface card; and

determining the first physical CPU according to the affinity binding between the first virtual CPU and the first physical CPU.

3. The method according to claim 1 , wherein performing the affinity binding between the physical interrupt of the virtual network interface card and the second physical CPU further comprises:

finding a corresponding physical interrupt number according to a virtual interrupt number of the virtual network interface card; and

determining the second physical CPU according to the affinity binding between the second virtual CPU and the second physical CPU.

4. A computer device comprising:

a non-transitory memory comprising processor-executable instructions; and

one or more processors in communication with the memory, wherein the one or more processors are configured to execute the processor-executable instructions to facilitate:

receiving a request message from an Infrastructure as a Service (IaaS) resource management system, wherein the request message carries an interrupt affinity policy parameter of a virtual network interface card;

enabling a capturing module included in a host operating system based on the interrupt affinity policy parameter, wherein the capturing module is configured to, when enabled, capture an operation executed by a guest operating system of a virtual machine for performing an affinity binding of a virtual interrupt of the virtual network interface card and a first virtual central processing unit (CPU);

performing affinity binding between a physical interrupt of the virtual network interface card and a first physical CPU in response to the capturing module being enabled, wherein the first virtual CPU is in affinity binding with the first physical CPU;

processing interrupts of the virtual network interface card; and

performing affinity binding between the physical interrupt of the virtual network interface card and a second physical CPU in response to the capturing module detecting the virtual interrupt of the virtual network interface card changing to be in affinity binding with a second virtual CPU, wherein the second virtual CPU is in affinity binding with the second physical CPU.

5. The computer device according to claim 4 , wherein the one or more processors are further configured to execute the processor-executable instructions to facilitate:

capturing, when the capturing module is enabled, an operation of performing affinity binding between the virtual interrupt of the virtual network interface card and one of multiple virtual CPUs.

6. A non-transitory memory storage comprising processor-executable instructions, that when executed by a processor, cause the processor to facilitate:

receiving a request message from an Infrastructure as a Service (IaaS) resource management system, wherein the request message carries an interrupt affinity policy parameter of a virtual network interface card;

enabling a capturing module included in a host operating system based on the interrupt affinity policy parameter, wherein the capturing module is configured to, when enabled, capture an operation executed by a quest operating system of a virtual machine for performing an affinity binding of a virtual interrupt of the virtual network interface card and a first virtual central processing unit (CPU);

performing affinity binding between a physical interrupt of the virtual network interface card and a first physical CPU in response to the capturing module being enabled, wherein the first virtual CPU is in affinity binding with the first physical CPU;

processing interrupts of the virtual network interface card; and

performing affinity binding between the physical interrupt of the virtual network interface card and a second physical CPU in response to the capturing module detecting the virtual interrupt of the virtual network interface card changing to be in affinity binding with a second virtual CPU, wherein the second virtual CPU is in affinity binding with the second physical CPU.

7. The non-transitory memory according to claim 6 , wherein the processor-executable instructions further include instructions for a processor to facilitate:

capturing, when the capturing module is enabled, an operation of performing affinity binding between the virtual interrupt of the virtual network interface card and one of multiple virtual CPUs.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 17, 2017
From: XIA, HAI
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 042031/0099 →
Priority Claims (1)
CN 2013 1 0716755 · Dec 20, 2013 · national
Continuity (2)
Continuation PCTCN2014093686 · Dec 12, 2014
Related Publication 20160306647A1 · Oct 20, 2016