# US 10,768,960 B2 · Method for affinity binding of interrupt of virtual network interface card, and computer device

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

- Number: US 10,768,960 B2
- Document ID: US10768960B2
- Status: Granted
- Kind: B2
- Application number: 15/187,458
- Filed: 2016-06-20
- Published: 2016-10-20
- Granted: 2020-09-08
- Earliest claimed: 2013-12-20
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Hai Xia
- Web page: https://patentgrep.com/patent/US10768960B2

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/45537: {Provision of facilities of other operating environments, e.g. WINE (I/O emulation G06F13/105)}
- G06F 9/4812: {by interrupt, e.g. masked}
- 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)}
- H04L 12/4641: {Virtual LANs, VLANs, e.g. virtual private networks [VPN] (LAN interconnection over a bridge based backbone H04L12/462; encapsulation techniques H04L12/4633; routing of packets H04L45/00; packet switches H04L49/00; virtual private networks for security H04L63/0272)}
- G06F 2009/45579: {I/O management, e.g. providing access to device drivers or storage}
- G06F 2009/45595: {Network integration; Enabling network access in virtual machine instances}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## 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

### Claim 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.

### Claim 2 (depends on 1)

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.

### Claim 3 (depends on 1)

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.

### Claim 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.

### Claim 5 (depends on 4)

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.

### Claim 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.

### Claim 7 (depends on 6)

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.
