[go: up one dir, main page]

CN111857996A - Interrupt processing method, system, device and computer-readable storage medium - Google Patents

Interrupt processing method, system, device and computer-readable storage medium Download PDF

Info

Publication number
CN111857996A
CN111857996A CN202010616611.4A CN202010616611A CN111857996A CN 111857996 A CN111857996 A CN 111857996A CN 202010616611 A CN202010616611 A CN 202010616611A CN 111857996 A CN111857996 A CN 111857996A
Authority
CN
China
Prior art keywords
real
time
interrupt
utilization rate
cpu utilization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010616611.4A
Other languages
Chinese (zh)
Other versions
CN111857996B (en
Inventor
王芳
吴睿振
崔健
肖明
徐江波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Computer Technology Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202010616611.4A priority Critical patent/CN111857996B/en
Publication of CN111857996A publication Critical patent/CN111857996A/en
Application granted granted Critical
Publication of CN111857996B publication Critical patent/CN111857996B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses an interrupt processing method, a system, equipment and a computer readable storage medium, which are applied to a server and used for acquiring the real-time CPU utilization rate of own service; judging whether the real-time CPU utilization rate exceeds a preset CPU utilization rate or not; if the real-time CPU utilization rate exceeds the preset CPU utilization rate, generating interrupt merging information based on the real-time CPU utilization rate; transmitting the interrupt merging information to a hardware accelerator connected with the server; and controlling the hardware accelerator to perform interrupt merging so that the hardware accelerator performs interrupt merging based on the interrupt merging information. In the application, the server generates the interruption combination information based on the real-time CPU utilization rate under the condition that the real-time CPU utilization rate exceeds the preset CPU utilization rate, and controls the hardware accelerator to perform interruption combination based on the interruption combination information, so that the interruption times of the hardware accelerator are reduced, the utilization rate of the hardware accelerator to the server CPU resource is reduced, and the utilization rate of a service to the server CPU resource is ensured.

Description

一种中断处理方法、系统、设备及计算机可读存储介质An interrupt processing method, system, device and computer-readable storage medium

技术领域technical field

本申请涉及中断处理技术领域,更具体地说,涉及一种中断处理方法、系统、设备及计算机可读存储介质。The present application relates to the technical field of interrupt processing, and more particularly, to an interrupt processing method, system, device, and computer-readable storage medium.

背景技术Background technique

随着网络业务的蓬勃发展,海量数据处理已经成为各种应用领域尤其是服务器领域的常态,单纯依靠软件进行数据处理显然不能满足海量数据处理的速度需求,在这种情况下各种硬件加速器应用而生,比如PCIe(peripheral component interconnectexpress)硬件加速器等。PCIe硬件加速器通过使用硬件代替软件的方式对数据进行处理以提高数据处理的速度,在数据处理完成之后通过中断的方式通知服务器处理结果,服务器获得硬件加速器处理之后的数据进行后续操作。With the vigorous development of network services, massive data processing has become the norm in various application fields, especially in the server field. Relying solely on software for data processing obviously cannot meet the speed requirements of massive data processing. In this case, various hardware accelerator applications Instead, such as PCIe (peripheral component interconnectexpress) hardware accelerators, etc. The PCIe hardware accelerator processes data by using hardware instead of software to improve the speed of data processing. After the data processing is completed, the server is notified of the processing result by means of an interrupt, and the server obtains the data processed by the hardware accelerator for subsequent operations.

然而,通常服务器上还会有一些别的业务在同时进行,如果加速器过于频繁使用中断打断服务器,则会消耗服务器CPU(central processing unit,中央处理器)的大量资源,影响服务器其他业务的处理,从而导致服务器CPU使用效率不理想。However, there are usually other services running on the server at the same time. If the accelerator interrupts the server too frequently, it will consume a lot of resources of the server CPU (central processing unit, central processing unit) and affect the processing of other services on the server. , resulting in unsatisfactory server CPU usage efficiency.

综上所述,如何提高服务器的业务CPU使用效率是目前本领域技术人员亟待解决的问题。To sum up, how to improve the service CPU usage efficiency of the server is an urgent problem to be solved by those skilled in the art.

发明内容SUMMARY OF THE INVENTION

本申请的目的是提供一种中断处理方法,其能在一定程度上解决如何提高服务器的业务CPU使用效率的技术问题。本申请还提供了一种中断处理系统、设备及计算机可读存储介质。The purpose of this application is to provide an interrupt processing method, which can solve the technical problem of how to improve the service CPU usage efficiency of the server to a certain extent. The present application also provides an interrupt processing system, device and computer-readable storage medium.

为了实现上述目的,本申请提供如下技术方案:In order to achieve the above purpose, the application provides the following technical solutions:

一种中断处理方法,应用于服务器,包括:An interrupt handling method, applied to a server, includes:

获取自身业务的实时CPU使用率;Get the real-time CPU usage of your own business;

判断所述实时CPU使用率是否超出预设CPU使用率;Determine whether the real-time CPU usage exceeds the preset CPU usage;

若所述实时CPU使用率超出所述预设CPU使用率,则基于所述实时CPU使用率生成中断合并信息;If the real-time CPU usage exceeds the preset CPU usage, generating interrupt merge information based on the real-time CPU usage;

传输所述中断合并信息至所述服务器连接的硬件加速器;transmitting the interrupt coalescing information to a hardware accelerator connected to the server;

控制所述硬件加速器进行中断合并,以使所述硬件加速器基于所述中断合并信息进行中断合并。Controlling the hardware accelerator to perform interrupt merging, so that the hardware accelerator performs interrupt merging based on the interrupt merging information.

优选的,所述判断所述实时CPU使用率是否超出预设CPU使用率,包括:Preferably, the judging whether the real-time CPU usage exceeds the preset CPU usage includes:

按照预设的负载等级与CPU使用率间的对应关系,基于所述实时CPU使用率确定所述业务的实时负载等级;According to the corresponding relationship between the preset load level and the CPU usage rate, determine the real-time load level of the service based on the real-time CPU usage rate;

基于所述预设CPU使用率确定所述负载等级中业务的最大量;determining the maximum amount of traffic in the load level based on the preset CPU usage;

确定出所述实时负载等级中的实时业务量;determining the real-time traffic in the real-time load level;

判断所述实时业务量是否大于所述实时负载等级的最大量,若所述实时业务量大于所述实时负载等级的最大量,则判定所述实时CPU使用率超出所述预设CPU使用率,若所述实时业务量小于等于所述实时负载等级的最大量,则判定所述实时CPU使用率未超出所述预设CPU使用率。determining whether the real-time traffic volume is greater than the maximum amount of the real-time load level, and if the real-time traffic volume is greater than the maximum amount of the real-time load level, determining that the real-time CPU usage exceeds the preset CPU usage, If the real-time traffic volume is less than or equal to the maximum amount of the real-time load level, it is determined that the real-time CPU usage rate does not exceed the preset CPU usage rate.

优选的,所述基于所述实时CPU使用率生成中断合并信息,包括:Preferably, the generating interrupt merge information based on the real-time CPU usage includes:

获取所述实时负载等级对应的中断时隙;obtaining the interruption time slot corresponding to the real-time load level;

基于所述实时业务量及所述实时负载等级的最大量,在所述中断时隙中确定出待合并的实时时隙;determining a real-time time slot to be merged in the outage time slot based on the real-time traffic volume and the maximum amount of the real-time load level;

将所述实时时隙作为所述中断合并信息。The real-time time slot is used as the interrupt merge information.

优选的,所述控制所述硬件加速器进行中断合并,包括:Preferably, the controlling the hardware accelerator to perform interrupt merging includes:

发送控制所述硬件加速器进行中断合并的信息至所述硬件加速器。Sending information for controlling the hardware accelerator to perform interrupt merging to the hardware accelerator.

优选的,所述控制所述硬件加速器进行中断合并,包括:Preferably, the controlling the hardware accelerator to perform interrupt merging includes:

置位IO请求中的interupt on completion标志位来控制所述硬件加速器进行中断合并。The interrupt on completion flag in the IO request is set to control the hardware accelerator to perform interrupt merging.

优选的,所述获取自身业务的实时CPU使用率,包括:Preferably, the obtaining the real-time CPU usage of the own business includes:

按照预设周期获取自身业务的所述实时CPU使用率。Acquire the real-time CPU usage of the own service according to a preset period.

一种中断处理方法,应用于硬件加速器,包括:An interrupt handling method, applied to a hardware accelerator, includes:

接收所述硬件加速器连接的服务器传输的中断合并信息;receiving the interrupt merge information transmitted by the server connected to the hardware accelerator;

在所述服务器的控制下,基于所述中断合并信息进行中断合并;Under the control of the server, interrupt merging is performed based on the interrupt merging information;

其中,所述服务器获取自身业务的实时CPU使用率,判断所述实时CPU使用率是否超出预设CPU使用率,若所述实时CPU使用率超出所述预设CPU使用率,则基于所述实时CPU使用率生成所述中断合并信息。The server obtains the real-time CPU usage of its own business, and determines whether the real-time CPU usage exceeds the preset CPU usage. If the real-time CPU usage exceeds the preset CPU usage, the real-time CPU usage CPU usage generates the interrupt coalescing information.

一种中断处理系统,应用于服务器,包括:An interrupt handling system, applied to a server, includes:

第一获取模块,用于获取自身业务的实时CPU使用率;The first obtaining module is used to obtain the real-time CPU usage of its own business;

第一判断模块,用于判断所述实时CPU使用率是否超出预设CPU使用率;若所述实时CPU使用率超出所述预设CPU使用率,则基于所述实时CPU使用率生成中断合并信息;a first judging module, configured to judge whether the real-time CPU usage exceeds the preset CPU usage; if the real-time CPU usage exceeds the preset CPU usage, generate interrupt merge information based on the real-time CPU usage ;

第一传输模块,用于传输所述中断合并信息至所述服务器连接的硬件加速器;a first transmission module, configured to transmit the interrupt merge information to a hardware accelerator connected to the server;

第一控制模块,用于控制所述硬件加速器进行中断合并,以使所述硬件加速器基于所述中断合并信息进行中断合并。A first control module, configured to control the hardware accelerator to perform interrupt merging, so that the hardware accelerator performs interrupt merging based on the interrupt merging information.

一种中断处理设备,包括:An interrupt handling device, comprising:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序时实现如上任一所述中断处理方法的步骤。The processor is configured to implement the steps of any of the above interrupt processing methods when executing the computer program.

一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被处理器执行时实现如上任一所述中断处理方法的步骤。A computer-readable storage medium, storing a computer program in the computer-readable storage medium, when the computer program is executed by a processor, implements the steps of any of the above interrupt processing methods.

本申请提供的一种中断处理方法,应用于服务器,获取自身业务的实时CPU使用率;判断实时CPU使用率是否超出预设CPU使用率;若实时CPU使用率超出预设CPU使用率,则基于实时CPU使用率生成中断合并信息;传输中断合并信息至服务器连接的硬件加速器;控制硬件加速器进行中断合并,以使硬件加速器基于中断合并信息进行中断合并。本申请中,服务器在实时CPU使用率超出预设CPU使用率的情况下,会基于实时CPU使用率生成中断合并信息,并基于中断合并信息控制硬件加速器进行中断合并,以此减少硬件加速器的中断次数,降低硬件加速器对服务器CPU资源的使用率,保证业务对服务器CPU资源的使用率。本申请提供的一种中断处理系统、设备及计算机可读存储介质也解决了相应技术问题。An interrupt processing method provided by this application is applied to a server to obtain the real-time CPU usage rate of its own business; it is judged whether the real-time CPU usage rate exceeds the preset CPU usage rate; if the real-time CPU usage rate exceeds the preset CPU usage rate, based on The real-time CPU usage generates interrupt coalescing information; transmits the interrupt coalescing information to a hardware accelerator connected to the server; controls the hardware accelerator to perform interrupt coalescing, so that the hardware accelerator performs interrupt coalescing based on the interrupt coalescing information. In this application, when the real-time CPU usage exceeds the preset CPU usage, the server will generate interrupt merging information based on the real-time CPU usage, and control the hardware accelerator to perform interrupt merging based on the interrupt merging information, thereby reducing the interruption of the hardware accelerator The number of times, reduce the utilization rate of the server CPU resources by the hardware accelerator, and ensure the utilization rate of the server CPU resources by the business. The interrupt processing system, device and computer-readable storage medium provided by the present application also solve the corresponding technical problems.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only It is an embodiment of the present application. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without any creative effort.

图1为本申请实施例提供的一种中断处理方法的第一流程图;FIG. 1 is a first flowchart of an interrupt processing method provided by an embodiment of the present application;

图2为本申请实施例提供的一种中断处理方法的第二流程图;2 is a second flowchart of an interrupt processing method provided by an embodiment of the present application;

图3为本申请实施例提供的一种中断处理系统的第一结构示意图;3 is a schematic diagram of a first structure of an interrupt processing system provided by an embodiment of the present application;

图4为本申请实施例提供的一种中断处理系统的第二结构示意图;4 is a schematic diagram of a second structure of an interrupt processing system provided by an embodiment of the present application;

图5为本申请实施例提供的一种中断处理设备的结构示意图;FIG. 5 is a schematic structural diagram of an interrupt processing device provided by an embodiment of the present application;

图6为本申请实施例提供的一种中断处理设备的另一结构示意图。FIG. 6 is another schematic structural diagram of an interrupt processing device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

随着网络业务的蓬勃发展,海量数据处理已经成为各种应用领域尤其是服务器领域的常态,单纯依靠软件进行数据处理显然不能满足海量数据处理的速度需求,在这种情况下各种硬件加速器应用而生,比如PCIe(peripheral component interconnectexpress)硬件加速器等。PCIe硬件加速器通过使用硬件代替软件的方式对数据进行处理以提高数据处理的速度,在数据处理完成之后通过中断的方式通知服务器处理结果,服务器获得硬件加速器处理之后的数据进行后续操作。然而,通常服务器上还会有一些别的业务在同时进行,如果加速器过于频繁使用中断打断服务器,则会消耗服务器CPU(centralprocessing unit,中央处理器)的大量资源,影响服务器其他业务的处理,从而导致服务器CPU使用效率不理想。而本申请提供的一种中断处理方法可以提高服务器的业务CPU使用效率。With the vigorous development of network services, massive data processing has become the norm in various application fields, especially in the server field. Relying solely on software for data processing obviously cannot meet the speed requirements of massive data processing. In this case, various hardware accelerator applications Instead, such as PCIe (peripheral component interconnectexpress) hardware accelerators, etc. The PCIe hardware accelerator processes data by using hardware instead of software to improve the speed of data processing. After the data processing is completed, the server is notified of the processing result by means of an interrupt, and the server obtains the data processed by the hardware accelerator for subsequent operations. However, there are usually other services running on the server at the same time. If the accelerator interrupts the server too frequently, it will consume a lot of resources of the server CPU (central processing unit, central processing unit) and affect the processing of other services on the server. As a result, the server CPU usage efficiency is not ideal. The interrupt processing method provided by the present application can improve the service CPU usage efficiency of the server.

请参阅图1,图1为本申请实施例提供的一种中断处理方法的第一流程图。Please refer to FIG. 1. FIG. 1 is a first flowchart of an interrupt processing method provided by an embodiment of the present application.

本申请实施例提供的一种中断处理方法,应用于服务器,可以包括以下步骤:An interrupt processing method provided by an embodiment of the present application, applied to a server, may include the following steps:

步骤S101:获取自身业务的实时CPU使用率。Step S101: Obtain the real-time CPU usage of the own service.

实际应用中,服务器可以先获取自身业务的实时CPU使用率,实时CPU使用率也即在获取时刻下,业务的CPU使用率。In practical applications, the server can first obtain the real-time CPU usage of its own business. The real-time CPU usage is the CPU usage of the business at the moment of acquisition.

应当指出,获取业务的实时CPU使用率的获取时刻可以根据实际需要灵活确定,比如可以按照预设周期来获取业务的实时CPU使用率等。It should be pointed out that the acquisition moment for acquiring the real-time CPU usage of the service can be flexibly determined according to actual needs, for example, the real-time CPU usage of the service can be acquired according to a preset period.

步骤S102:判断实时CPU使用率是否超出预设CPU使用率;若实时CPU使用率超出预设CPU使用率,则执行步骤S103;若实时CPU使用率未超出预设CPU使用率,则执行步骤S106。Step S102: judging whether the real-time CPU usage exceeds the preset CPU usage; if the real-time CPU usage exceeds the preset CPU usage, execute step S103; if the real-time CPU usage does not exceed the preset CPU usage, execute step S106 .

步骤S103:基于实时CPU使用率生成中断合并信息,执行步骤S104。Step S103: Generate interrupt merge information based on the real-time CPU usage, and execute Step S104.

实际应用中,由于硬件加速器向服务器发送中断的话,会占用服务器的CPU,所以在获取自身业务的实时CPU使用率之后,需判断实时CPU使用率是否超出预设CPU使用率,根据实时CPU使用率与预设CPU使用率间的比较结果来决定对硬件加速器的中断处理方式,以此保证业务的CPU使用率,比如在实时CPU使用率超出预设CPU使用率的情况下,可以基于实时CPU使用率生成中断合并信息,在实时CPU使用率未超出预设CPU使用率的情况下,可以保持硬件加速器的中断不变。In practical applications, since the hardware accelerator sends an interrupt to the server, it will occupy the server's CPU. Therefore, after obtaining the real-time CPU usage of its own business, it is necessary to determine whether the real-time CPU usage exceeds the preset CPU usage. According to the real-time CPU usage The comparison result with the preset CPU usage determines the interrupt handling method for the hardware accelerator, so as to ensure the CPU usage of the business. For example, when the real-time CPU usage exceeds the preset CPU usage, it can be based on the real-time CPU usage The interrupt merge information is generated at a rate, and the interrupt of the hardware accelerator can be kept unchanged under the condition that the real-time CPU usage does not exceed the preset CPU usage.

步骤S104:传输中断合并信息至服务器连接的硬件加速器。Step S104: Transmit the interrupt merge information to the hardware accelerator connected to the server.

步骤S105:控制硬件加速器进行中断合并,以使硬件加速器基于中断合并信息进行中断合并。Step S105: Control the hardware accelerator to perform interrupt merging, so that the hardware accelerator performs interrupt merging based on the interrupt merging information.

实际应用中,由于在实时CPU使用率超出预设CPU使用率的情况下,可以基于实时CPU使用率生成中断合并信息,而中断合并信息指的是将中断进行合并,由此可以减少硬件加速器对服务器CPU资源的占用,所以服务器在基于实时CPU使用率生成中断合并信息之后,需传输中断合并信息至服务器连接的硬件加速器,控制硬件加速器进行中断合并,以使硬件加速器基于中断合并信息进行中断合并。In practical applications, since the real-time CPU usage exceeds the preset CPU usage, the interrupt merge information can be generated based on the real-time CPU usage, and the interrupt merge information refers to merging the interrupts, which can reduce the number of hardware accelerators. The server CPU resources are occupied, so after the server generates the interrupt merge information based on the real-time CPU usage, it needs to transmit the interrupt merge information to the hardware accelerator connected to the server, and control the hardware accelerator to perform interrupt merge, so that the hardware accelerator can perform interrupt merge based on the interrupt merge information. .

应当指出,在实时CPU使用率未超出预设CPU使用率的情况下,服务器存在较多的闲置CPU,此时硬件加速器多次向服务器发送中断的话,对业务的CPU使用率的影响较轻,所以此时可以保持硬件加速器的中断不变;而在实时CPU使用率超出预设CPU使用率的情况下,服务器存在较少的闲置CPU,此时硬件加速器多次向服务器发送中断的话,对业务的CPU使用率的影响较重,可能使得服务器降低业务的CPU使用率,所以此时需降低硬件加速器的中断发射频率,降低硬件加速器对服务器CPU资源的消耗。It should be pointed out that when the real-time CPU usage does not exceed the preset CPU usage, there are many idle CPUs on the server. At this time, if the hardware accelerator sends interrupts to the server for many times, the impact on the CPU usage of the business is relatively light. Therefore, the interruption of the hardware accelerator can be kept unchanged at this time; however, when the real-time CPU usage exceeds the preset CPU usage, the server has less idle CPUs. At this time, if the hardware accelerator sends interruptions to the server for many times, the service will not be affected. The impact of the CPU usage of the server is relatively heavy, which may cause the server to reduce the CPU usage of the business. Therefore, at this time, it is necessary to reduce the interrupt transmission frequency of the hardware accelerator and reduce the consumption of the server CPU resources by the hardware accelerator.

步骤S106:保持硬件加速器的中断不变。Step S106: Keep the interrupt of the hardware accelerator unchanged.

本申请提供的一种中断处理方法,应用于服务器,获取自身业务的实时CPU使用率;判断实时CPU使用率是否超出预设CPU使用率;若实时CPU使用率超出预设CPU使用率,则基于实时CPU使用率生成中断合并信息;传输中断合并信息至服务器连接的硬件加速器;控制硬件加速器进行中断合并,以使硬件加速器基于中断合并信息进行中断合并。本申请中,服务器在实时CPU使用率超出预设CPU使用率的情况下,会基于实时CPU使用率生成中断合并信息,并基于中断合并信息控制硬件加速器进行中断合并,以此减少硬件加速器的中断次数,降低硬件加速器对服务器CPU资源的使用率,保证业务对服务器CPU资源的使用率。An interrupt processing method provided by this application is applied to a server to obtain the real-time CPU usage rate of its own business; it is judged whether the real-time CPU usage rate exceeds the preset CPU usage rate; if the real-time CPU usage rate exceeds the preset CPU usage rate, based on The real-time CPU usage generates interrupt coalescing information; transmits the interrupt coalescing information to a hardware accelerator connected to the server; controls the hardware accelerator to perform interrupt coalescing, so that the hardware accelerator performs interrupt coalescing based on the interrupt coalescing information. In this application, when the real-time CPU usage exceeds the preset CPU usage, the server will generate interrupt merging information based on the real-time CPU usage, and control the hardware accelerator to perform interrupt merging based on the interrupt merging information, thereby reducing the interruption of the hardware accelerator The number of times, reduce the utilization rate of the server CPU resources by the hardware accelerator, and ensure the utilization rate of the server CPU resources by the business.

本申请提供的一种中断处理方法,应用于服务器中,由于各个业务本身对服务器的CPU使用率情况不同,所以单个业务会影响服务器的业务CPU使用率,而所有的业务又决定了服务器中业务的CPU使用率,所以可以根据单个业务的业务CPU使用率及业务量来决定服务器中的业务CPU使用率,所以在判断实时CPU使用率是否超出预设CPU使用率的过程中,可以按照预设的负载等级与CPU使用率间的对应关系,基于实时CPU使用率确定业务的实时负载等级;基于预设CPU使用率确定负载等级中业务的最大量;确定出实时负载等级中的实时业务量;判断实时业务量是否大于实时负载等级的最大量,若实时业务量大于实时负载等级的最大量,则判定实时CPU使用率超出预设CPU使用率,若实时业务量小于等于实时负载等级的最大量,则判定实时CPU使用率未超出预设CPU使用率。An interrupt processing method provided by this application is applied to a server. Since each service has different CPU usage on the server, a single service will affect the service CPU usage of the server, and all services determine the services in the server. Therefore, in the process of judging whether the real-time CPU usage exceeds the preset CPU usage, you can follow the preset CPU usage. The corresponding relationship between the load level and the CPU usage rate, determine the real-time load level of the business based on the real-time CPU usage rate; determine the maximum amount of business in the load level based on the preset CPU usage rate; determine the real-time business volume in the real-time load level; Determine whether the real-time traffic volume is greater than the maximum amount of the real-time load level. If the real-time traffic volume is greater than the maximum amount of the real-time load level, it is determined that the real-time CPU usage exceeds the preset CPU usage rate. If the real-time traffic volume is less than or equal to the maximum amount of the real-time load level , it is determined that the real-time CPU usage does not exceed the preset CPU usage.

为了便于理解,假设负载等级分为第一负载等级、第二负载等级和第三负载等级,且第一负载等级的业务CPU使用率大于第二负载等级,第二负载等级的业务CPU使用率又大于第三负载等级,那么,即使在第一负载等级中的业务量较少的情况下,第一负载等级中所有业务的CPU使用率总值仍可能较大,而在第三负载等级中的业务量较多的情况下,第三负载等级中所有业务的CPU使用率总值才可能较大,所以可以根据负载等级中单个业务的CPU使用率及负载等级中业务量来决定预设CPU使用率。For ease of understanding, it is assumed that the load level is divided into a first load level, a second load level and a third load level, and the service CPU usage of the first load level is greater than that of the second load level, and the service CPU usage of the second load level is is greater than the third load level, then, even in the case where the traffic volume in the first load level is small, the total CPU usage of all services in the first load level may still be relatively large, while in the third load level When there is a lot of business volume, the total CPU usage of all services in the third load level may be larger. Therefore, the default CPU usage can be determined according to the CPU usage of a single business in the load level and the business volume in the load level. Rate.

本申请提供的一种中断处理方法,应用于服务器中,基于实时CPU使用率生成中断合并信息的过程中,可以获取实时负载等级对应的中断时隙;基于实时业务量及实时负载等级的最大量,在中断时隙中确定出待合并的实时时隙;将实时时隙作为中断合并信息。An interrupt processing method provided by the present application is applied to a server. In the process of generating interrupt merge information based on the real-time CPU usage, the interrupt time slot corresponding to the real-time load level can be obtained; based on the real-time traffic volume and the maximum real-time load level , determine the real-time time slot to be merged in the interruption time slot; take the real-time time slot as the interruption merge information.

也即实际应用中,可以根据各个实时负载等级对应的中断时隙来确定中断合并信息;具体应用场景中,基于实时业务量及实时负载等级的最大量,在中断时隙中确定出待合并的实时时隙的过程中,可以计算实时业务量与实时负载等级的最大量的差值,按照实时时隙的数量等于该差值的原则确定实时时隙;当然,也可以按照实时时隙的数量大于该差值的原则确定实时时隙,或者按照实时时隙的数量小于该差值的原则确定实时时隙等;且在此过程中,可以优先将时长短的中断时隙作为实时时隙,或者优先将时长长的中断时隙作为实时间隙等,本申请在此不做具体限定。That is to say, in practical applications, the interruption merge information can be determined according to the interruption time slot corresponding to each real-time load level; in a specific application scenario, based on the maximum amount of real-time traffic and real-time load level, the interruption time slot is determined to be merged. In the process of real-time time slots, the difference between the real-time traffic volume and the maximum real-time load level can be calculated, and the real-time time slots can be determined according to the principle that the number of real-time time slots is equal to the difference; The real-time time slot is determined according to the principle that the difference is greater than the difference, or the real-time time slot is determined according to the principle that the number of real-time time slots is less than the difference value; Alternatively, the interrupted time slot with a long duration is preferentially used as a real-time slot, etc., which is not specifically limited in this application.

本申请提供的一种中断处理方法,应用于服务器中,服务器在控制硬件加速器进行中断合并的过程中,可以直接发送控制硬件加速器进行中断合并的信息至硬件加速器;或者置位IO请求中的interupt on completion标志位来控制硬件加速器进行中断合并。An interrupt processing method provided by the present application is applied to a server. In the process of controlling the hardware accelerator to perform interrupt merging, the server can directly send the information of controlling the hardware accelerator to perform interrupt merging to the hardware accelerator; or set the interupt in the IO request. The on completion flag is used to control the hardware accelerator for interrupt merging.

请参阅图2,图2为本申请实施例提供的一种中断处理方法的第二流程图。Please refer to FIG. 2 , which is a second flowchart of an interrupt processing method provided by an embodiment of the present application.

本申请实施例提供的一种中断处理方法,应用于硬件加速器,可以包括以下步骤:An interrupt processing method provided by an embodiment of the present application, applied to a hardware accelerator, may include the following steps:

步骤S201:接收硬件加速器连接的服务器传输的中断合并信息。Step S201: Receive the interrupt merge information transmitted by the server connected to the hardware accelerator.

步骤S202:在服务器的控制下,基于中断合并信息进行中断合并;其中,服务器获取自身业务的实时CPU使用率,判断实时CPU使用率是否超出预设CPU使用率,若实时CPU使用率超出预设CPU使用率,则基于实时CPU使用率生成中断合并信息。Step S202: Under the control of the server, interrupt merging is performed based on the interrupt merging information; wherein, the server obtains the real-time CPU usage of its own business, and determines whether the real-time CPU usage exceeds the preset CPU usage, and if the real-time CPU usage exceeds the preset CPU usage CPU usage, the interrupt coalescing information is generated based on real-time CPU usage.

本申请实施例提供的应用于硬件加速器的中断处理方法中各个步骤的描述请参阅上述实施例,在此不再赘述。For the description of each step in the interrupt processing method applied to the hardware accelerator provided by the embodiment of the present application, please refer to the foregoing embodiment, and details are not repeated here.

请参阅图3,图3为本申请实施例提供的一种中断处理系统的第一结构示意图。Please refer to FIG. 3 , which is a schematic diagram of a first structure of an interrupt processing system provided by an embodiment of the present application.

本申请实施例提供的一种中断处理系统,应用于服务器,可以包括:An interrupt processing system provided by an embodiment of the present application, applied to a server, may include:

第一获取模块101,用于获取自身业务的实时CPU使用率;The first obtaining module 101 is used to obtain the real-time CPU usage of its own business;

第一判断模块102,用于判断实时CPU使用率是否超出预设CPU使用率;若实时CPU使用率超出预设CPU使用率,则基于实时CPU使用率生成中断合并信息;The first judgment module 102 is used for judging whether the real-time CPU usage exceeds the preset CPU usage; if the real-time CPU usage exceeds the preset CPU usage, the interrupt merge information is generated based on the real-time CPU usage;

第一传输模块103,用于传输中断合并信息至服务器连接的硬件加速器;a first transmission module 103, configured to transmit the interrupt merge information to the hardware accelerator connected to the server;

第一控制模块104,用于控制硬件加速器进行中断合并,以使硬件加速器基于中断合并信息进行中断合并。The first control module 104 is configured to control the hardware accelerator to perform interrupt merging, so that the hardware accelerator performs interrupt merging based on the interrupt merging information.

本申请实施例提供的一种中断处理系统,应用于服务器,第一判断模块可以包括:An interrupt processing system provided by an embodiment of the present application is applied to a server, and the first judgment module may include:

第一确定子模块,用于按照预设的负载等级与CPU使用率间的对应关系,基于实时CPU使用率确定业务的实时负载等级;The first determination submodule is configured to determine the real-time load level of the service based on the real-time CPU usage rate according to the preset correspondence between the load level and the CPU usage rate;

第二确定子模块,用于基于预设CPU使用率确定负载等级中业务最大量;The second determination submodule is used to determine the maximum amount of business in the load level based on the preset CPU usage;

第三确定子模块,用于确定出实时负载等级中的实时业务量;The third determination sub-module is used to determine the real-time traffic volume in the real-time load level;

第一判断子模块,用于判断实时业务量是否大于实时负载等级最大量,若实时业务量大于实时负载等级的最大量,则判定实时CPU使用率超出预设CPU使用率,若实时业务量小于等于实时负载等级的最大量,则判定实时CPU使用率未超出预设CPU使用率。The first judgment sub-module is used to judge whether the real-time traffic volume is greater than the maximum amount of the real-time load level. If the real-time traffic volume is greater than the maximum amount of the real-time load level, it is determined that the real-time CPU usage exceeds the preset CPU usage, and if the real-time traffic is less than is equal to the maximum amount of the real-time load level, it is determined that the real-time CPU usage does not exceed the preset CPU usage.

本申请实施例提供的一种中断处理系统,应用于服务器,第一判断模块可以包括:An interrupt processing system provided by an embodiment of the present application is applied to a server, and the first judgment module may include:

第一获取单元,用于获取实时负载等级对应的中断时隙;a first obtaining unit, configured to obtain the interrupt time slot corresponding to the real-time load level;

第一确定单元,用于基于实时业务量及实时负载等级的最大量,在中断时隙中确定出待合并的实时时隙;a first determining unit, configured to determine the real-time time slot to be merged in the interruption time slot based on the maximum amount of real-time traffic and real-time load level;

第一设置单元,用于将实时时隙作为中断合并信息。The first setting unit is used for taking the real-time time slot as interrupt combining information.

本申请实施例提供的一种中断处理系统,应用于服务器,第一控制模块可以包括:An interrupt processing system provided by an embodiment of the present application is applied to a server, and the first control module may include:

第一发送单元,用于发送控制硬件加速器进行中断合并的信息至硬件加速器。The first sending unit is configured to send information for controlling the hardware accelerator to perform interrupt merging to the hardware accelerator.

本申请实施例提供的一种中断处理系统,应用于服务器,第一控制模块可以包括:An interrupt processing system provided by an embodiment of the present application is applied to a server, and the first control module may include:

第一置位单元,用于置位IO请求中的interupt on completion标志位来控制硬件加速器进行中断合并。The first setting unit is used to set the interrupt on completion flag in the IO request to control the hardware accelerator to perform interrupt merging.

本申请实施例提供的一种中断处理系统,应用于服务器,第一获取模块可以包括:An interrupt processing system provided by an embodiment of the present application is applied to a server, and the first obtaining module may include:

第二获取单元,用于按照预设周期获取自身业务的实时CPU使用率。The second obtaining unit is configured to obtain the real-time CPU usage of the own service according to a preset period.

请参阅图4,图4为本申请实施例提供的一种中断处理系统的第二结构示意图。Please refer to FIG. 4 , which is a schematic diagram of a second structure of an interrupt processing system provided by an embodiment of the present application.

本申请实施例提供的一种中断处理系统,应用于硬件加速器,可以包括:An interrupt processing system provided by an embodiment of the present application, applied to a hardware accelerator, may include:

第一接收模块201,用于接收硬件加速器连接的服务器传输的中断合并信息;The first receiving module 201 is configured to receive the interrupt merge information transmitted by the server connected by the hardware accelerator;

第一合并模块202,在服务器的控制下,基于中断合并信息进行中断合并;The first merging module 202, under the control of the server, performs interrupt merging based on the interrupt merging information;

其中,服务器获取自身业务的实时CPU使用率,判断实时CPU使用率是否超出预设CPU使用率,若实时CPU使用率超出预设CPU使用率,则基于实时CPU使用率生成中断合并信息。The server obtains the real-time CPU usage of its own business, determines whether the real-time CPU usage exceeds the preset CPU usage, and if the real-time CPU usage exceeds the preset CPU usage, generates interrupt merge information based on the real-time CPU usage.

本申请还提供了一种中断处理设备及计算机可读存储介质,其均具有本申请实施例提供的一种中断处理方法具有的对应效果。请参阅图5,图5为本申请实施例提供的一种中断处理设备的结构示意图。The present application further provides an interrupt processing device and a computer-readable storage medium, both of which have the corresponding effects of the interrupt processing method provided by the embodiments of the present application. Please refer to FIG. 5 , which is a schematic structural diagram of an interrupt processing device according to an embodiment of the present application.

本申请实施例提供的一种中断处理设备,应用于服务器,包括存储器201和处理器202,存储器201中存储有计算机程序,处理器202执行计算机程序时实现如下步骤:An interrupt processing device provided by an embodiment of the present application is applied to a server, and includes a memory 201 and a processor 202. A computer program is stored in the memory 201, and the processor 202 implements the following steps when executing the computer program:

获取自身业务的实时CPU使用率;Get the real-time CPU usage of your own business;

判断实时CPU使用率是否超出预设CPU使用率;Determine whether the real-time CPU usage exceeds the preset CPU usage;

若实时CPU使用率超出预设CPU使用率,则基于实时CPU使用率生成中断合并信息;If the real-time CPU usage exceeds the preset CPU usage, interrupt merge information is generated based on the real-time CPU usage;

传输中断合并信息至服务器连接的硬件加速器;A hardware accelerator that transmits interrupt coalescing information to the server connection;

控制硬件加速器进行中断合并,以使硬件加速器基于中断合并信息进行中断合并。The hardware accelerator is controlled to perform interrupt coalescence, so that the hardware accelerator performs interrupt coalescence based on the interrupt coalescing information.

本申请实施例提供的一种中断处理设备,应用于服务器,包括存储器201和处理器202,存储器201中存储有计算机程序,处理器202执行计算机程序时实现如下步骤:按照预设的负载等级与CPU使用率间的对应关系,基于实时CPU使用率确定业务的实时负载等级;基于预设CPU使用率确定负载等级中业务的最大量;确定出实时负载等级中的实时业务量;判断实时业务量是否大于实时负载等级的最大量,若实时业务量大于实时负载等级的最大量,则判定实时CPU使用率超出预设CPU使用率,若实时业务量小于等于实时负载等级的最大量,则判定实时CPU使用率未超出预设CPU使用率。An interrupt processing device provided by an embodiment of the present application is applied to a server, and includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: according to the preset load level and The corresponding relationship between the CPU usage rates, determine the real-time load level of the service based on the real-time CPU usage rate; determine the maximum amount of services in the load level based on the preset CPU usage rate; determine the real-time traffic volume in the real-time load level; determine the real-time traffic volume Whether it is greater than the maximum amount of the real-time load level, if the real-time traffic volume is greater than the maximum amount of the real-time load level, it is determined that the real-time CPU usage exceeds the preset CPU usage rate. The CPU usage does not exceed the preset CPU usage.

本申请实施例提供的一种中断处理设备,应用于服务器,包括存储器201和处理器202,存储器201中存储有计算机程序,处理器202执行计算机程序时实现如下步骤:获取实时负载等级对应的中断时隙;基于实时业务量及实时负载等级的最大量,在中断时隙中确定出待合并的实时时隙;将实时时隙作为中断合并信息。An interrupt processing device provided by an embodiment of the present application is applied to a server, and includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: acquiring an interrupt corresponding to a real-time load level Time slot; based on the maximum amount of real-time traffic and real-time load level, the real-time time slot to be merged is determined in the interruption time slot; the real-time time slot is used as interruption merge information.

本申请实施例提供的一种中断处理设备,应用于服务器,包括存储器201和处理器202,存储器201中存储有计算机程序,处理器202执行计算机程序时实现如下步骤:发送控制硬件加速器进行中断合并的信息至硬件加速器。An interrupt processing device provided by an embodiment of the present application is applied to a server, and includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: sending a control hardware accelerator to perform interrupt merging information to the hardware accelerator.

本申请实施例提供的一种中断处理设备,应用于服务器,包括存储器201和处理器202,存储器201中存储有计算机程序,处理器202执行计算机程序时实现如下步骤:置位IO请求中的interupt on completion标志位来控制硬件加速器进行中断合并。An interrupt processing device provided by an embodiment of the present application is applied to a server, and includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: set the interupt in the IO request. The on completion flag is used to control the hardware accelerator for interrupt merging.

本申请实施例提供的一种中断处理设备,应用于服务器,包括存储器201和处理器202,存储器201中存储有计算机程序,处理器202执行计算机程序时实现如下步骤:按照预设周期获取自身业务的实时CPU使用率。An interrupt processing device provided by an embodiment of the present application is applied to a server, and includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: obtaining its own service according to a preset period real-time CPU usage.

本申请实施例提供的一种中断处理设备,应用于硬件加速器,包括存储器201和处理器202,存储器201中存储有计算机程序,处理器202执行计算机程序时实现如下步骤:接收硬件加速器连接的服务器传输的中断合并信息;在服务器的控制下,基于中断合并信息进行中断合并;其中,服务器获取自身业务的实时CPU使用率,判断实时CPU使用率是否超出预设CPU使用率,若实时CPU使用率超出预设CPU使用率,则基于实时CPU使用率生成中断合并信息。An interrupt processing device provided by an embodiment of the present application is applied to a hardware accelerator, and includes a memory 201 and a processor 202. A computer program is stored in the memory 201, and the processor 202 implements the following steps when executing the computer program: receiving a server connected to the hardware accelerator Interrupt merging information transmitted; under the control of the server, interrupt merging is performed based on the interrupt merging information; wherein, the server obtains the real-time CPU usage of its own business, and determines whether the real-time CPU usage exceeds the preset CPU usage, if the real-time CPU usage If the preset CPU usage is exceeded, interrupt coalescing information is generated based on the real-time CPU usage.

请参阅图6,本申请实施例提供的另一种中断处理设备中还可以包括:与处理器202连接的输入端口203,用于传输外界输入的命令至处理器202;与处理器202连接的显示单元204,用于显示处理器202的处理结果至外界;与处理器202连接的通信模块205,用于实现中断处理设备与外界的通信。显示单元204可以为显示面板、激光扫描使显示器等;通信模块205所采用的通信方式包括但不局限于移动高清链接技术(HML)、通用串行总线(USB)、高清多媒体接口(HDMI)、无线连接:无线保真技术(WiFi)、蓝牙通信技术、低功耗蓝牙通信技术、基于IEEE802.11s的通信技术。Referring to FIG. 6 , another interrupt processing device provided in this embodiment of the present application may further include: an input port 203 connected to the processor 202 for transmitting external input commands to the processor 202 ; an input port 203 connected to the processor 202 The display unit 204 is used for displaying the processing result of the processor 202 to the outside world; the communication module 205 connected with the processor 202 is used for realizing the communication between the interrupt processing device and the outside world. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication mode adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (HML), universal serial bus (USB), high-definition multimedia interface (HDMI), Wireless connection: wireless fidelity technology (WiFi), Bluetooth communication technology, Bluetooth low energy communication technology, communication technology based on IEEE802.11s.

本申请实施例提供的一种计算机可读存储介质,应用于服务器,计算机可读存储介质中存储有计算机程序,计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium provided by an embodiment of the present application is applied to a server, where a computer program is stored in the computer-readable storage medium, and the computer program is executed by a processor to implement the following steps:

获取自身业务的实时CPU使用率;Get the real-time CPU usage of your own business;

判断实时CPU使用率是否超出预设CPU使用率;Determine whether the real-time CPU usage exceeds the preset CPU usage;

若实时CPU使用率超出预设CPU使用率,则基于实时CPU使用率生成中断合并信息;If the real-time CPU usage exceeds the preset CPU usage, interrupt merge information is generated based on the real-time CPU usage;

传输中断合并信息至服务器连接的硬件加速器;A hardware accelerator that transmits interrupt coalescing information to the server connection;

控制硬件加速器进行中断合并,以使硬件加速器基于中断合并信息进行中断合并。The hardware accelerator is controlled to perform interrupt coalescence, so that the hardware accelerator performs interrupt coalescence based on the interrupt coalescing information.

本申请实施例提供的一种计算机可读存储介质,应用于服务器,计算机可读存储介质中存储有计算机程序,计算机程序被处理器执行时实现如下步骤:按照预设的负载等级与CPU使用率间的对应关系,基于实时CPU使用率确定业务的实时负载等级;基于预设CPU使用率确定负载等级中业务的最大量;确定出实时负载等级中的实时业务量;判断实时业务量是否大于实时负载等级的最大量,若实时业务量大于实时负载等级的最大量,则判定实时CPU使用率超出预设CPU使用率,若实时业务量小于等于实时负载等级的最大量,则判定实时CPU使用率未超出预设CPU使用率。A computer-readable storage medium provided by an embodiment of the present application is applied to a server. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the following steps are implemented: according to a preset load level and CPU usage rate The corresponding relationship between the two, determine the real-time load level of the business based on the real-time CPU usage; determine the maximum amount of business in the load level based on the preset CPU usage; determine the real-time business volume in the real-time load level; determine whether the real-time business volume is greater than the real-time business volume The maximum amount of load level. If the real-time business volume is greater than the maximum amount of the real-time load level, it is determined that the real-time CPU usage exceeds the preset CPU usage rate. If the real-time business volume is less than or equal to the maximum amount of the real-time load level, the real-time CPU usage is determined. The preset CPU usage is not exceeded.

本申请实施例提供的一种计算机可读存储介质,应用于服务器,计算机可读存储介质中存储有计算机程序,计算机程序被处理器执行时实现如下步骤:获取实时负载等级对应的中断时隙;基于实时业务量及实时负载等级的最大量,在中断时隙中确定出待合并的实时时隙;将实时时隙作为中断合并信息。A computer-readable storage medium provided by an embodiment of the present application is applied to a server, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the following steps are implemented: acquiring an interruption time slot corresponding to a real-time load level; Based on the maximum amount of real-time traffic and real-time load level, the real-time time slot to be merged is determined in the interruption time slot; the real-time time slot is used as interruption merge information.

本申请实施例提供的一种计算机可读存储介质,应用于服务器,计算机可读存储介质中存储有计算机程序,计算机程序被处理器执行时实现如下步骤:发送控制硬件加速器进行中断合并的信息至硬件加速器。A computer-readable storage medium provided by an embodiment of the present application is applied to a server, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the following steps are implemented: sending information for controlling a hardware accelerator to perform interrupt merging to hardware accelerator.

本申请实施例提供的一种计算机可读存储介质,应用于服务器,计算机可读存储介质中存储有计算机程序,计算机程序被处理器执行时实现如下步骤:置位IO请求中的interupt on completion标志位来控制硬件加速器进行中断合并。A computer-readable storage medium provided by an embodiment of the present application is applied to a server, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the following steps are implemented: an interupt on completion flag in an IO request is set. bit to control the hardware accelerator for interrupt coalescing.

本申请实施例提供的一种计算机可读存储介质,应用于服务器,计算机可读存储介质中存储有计算机程序,计算机程序被处理器执行时实现如下步骤:按照预设周期获取自身业务的实时CPU使用率。A computer-readable storage medium provided by an embodiment of the present application is applied to a server. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the following steps are implemented: obtaining a real-time CPU of its own service according to a preset period usage.

本申请实施例提供的一种计算机可读存储介质,应用于硬件加速器,计算机可读存储介质中存储有计算机程序,计算机程序被处理器执行时实现如下步骤:接收硬件加速器连接的服务器传输的中断合并信息;在服务器的控制下,基于中断合并信息进行中断合并;其中,服务器获取自身业务的实时CPU使用率,判断实时CPU使用率是否超出预设CPU使用率,若实时CPU使用率超出预设CPU使用率,则基于实时CPU使用率生成中断合并信息。A computer-readable storage medium provided by an embodiment of the present application is applied to a hardware accelerator, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the following steps are implemented: receiving an interruption of transmission from a server connected to the hardware accelerator Merge information; under the control of the server, interrupt merging is performed based on the interrupt merging information; wherein, the server obtains the real-time CPU usage of its own business, and determines whether the real-time CPU usage exceeds the preset CPU usage. If the real-time CPU usage exceeds the preset CPU usage CPU usage, the interrupt coalescing information is generated based on real-time CPU usage.

本申请所涉及的计算机可读存储介质包括随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质。The computer-readable storage medium referred to in this application includes random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs , or any other form of storage medium known in the art.

本申请实施例提供的中断处理系统、设备及计算机可读存储介质中相关部分的说明请参见本申请实施例提供的中断处理方法中对应部分的详细说明,在此不再赘述。另外,本申请实施例提供的上述技术方案中与现有技术中对应技术方案实现原理一致的部分并未详细说明,以免过多赘述。For the description of the relevant parts of the interrupt processing system, device, and computer-readable storage medium provided by the embodiments of the present application, please refer to the detailed description of the corresponding parts of the interrupt processing method provided by the embodiments of the present application, and details are not repeated here. In addition, parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail, so as to avoid redundant descriptions.

还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply those entities or operations There is no such actual relationship or order between them. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

对所公开的实施例的上述说明,使本领域技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, this application is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An interrupt processing method, applied to a server, includes:
acquiring the real-time CPU utilization rate of the self service;
judging whether the real-time CPU utilization rate exceeds a preset CPU utilization rate or not;
if the real-time CPU utilization rate exceeds the preset CPU utilization rate, generating interrupt merging information based on the real-time CPU utilization rate;
transmitting the interrupt merge information to a hardware accelerator connected to the server;
and controlling the hardware accelerator to perform interrupt merging so that the hardware accelerator performs interrupt merging based on the interrupt merging information.
2. The method of claim 1, wherein the determining whether the real-time CPU usage rate exceeds a preset CPU usage rate comprises:
determining the real-time load grade of the service based on the real-time CPU utilization rate according to the corresponding relation between the preset load grade and the CPU utilization rate;
determining the maximum amount of traffic in the load class based on the preset CPU usage rate;
determining real-time traffic in the real-time load level;
and judging whether the real-time traffic is greater than the maximum of the real-time load level, if so, judging that the utilization rate of the real-time CPU exceeds the preset CPU utilization rate, and if not, judging that the utilization rate of the real-time CPU does not exceed the preset CPU utilization rate.
3. The method of claim 2, wherein generating interrupt coalescing information based on the real-time CPU utilization comprises:
acquiring an interrupt time slot corresponding to the real-time load grade;
determining a real-time slot to be merged in the interrupt time slot based on the real-time traffic and the maximum amount of the real-time load level;
and taking the real-time slot as the interrupt merging information.
4. The method of claim 1, wherein the controlling the hardware accelerator to perform interrupt coalescing comprises:
and sending information for controlling the hardware accelerator to perform interrupt merging to the hardware accelerator.
5. The method of claim 1, wherein the controlling the hardware accelerator to perform interrupt coalescing comprises:
setting an interrupt on completion flag bit in the IO request to control the hardware accelerator to perform interrupt merging.
6. The method according to claim 1, wherein the obtaining the real-time CPU utilization of the self-service comprises:
and acquiring the real-time CPU utilization rate of the self service according to a preset period.
7. An interrupt processing method applied to a hardware accelerator, comprising:
Receiving interrupt merging information transmitted by a server connected with the hardware accelerator;
performing interrupt merging based on the interrupt merging information under the control of the server;
the server acquires the real-time CPU utilization rate of own service, judges whether the real-time CPU utilization rate exceeds a preset CPU utilization rate, and generates the interruption merging information based on the real-time CPU utilization rate if the real-time CPU utilization rate exceeds the preset CPU utilization rate.
8. An interrupt processing system, applied to a server, comprising:
the first acquisition module is used for acquiring the real-time CPU utilization rate of the self service;
the first judgment module is used for judging whether the real-time CPU utilization rate exceeds a preset CPU utilization rate or not; if the real-time CPU utilization rate exceeds the preset CPU utilization rate, generating interrupt merging information based on the real-time CPU utilization rate;
the first transmission module is used for transmitting the interrupt merging information to a hardware accelerator connected with the server;
and the first control module is used for controlling the hardware accelerator to perform interrupt merging so as to enable the hardware accelerator to perform interrupt merging based on the interrupt merging information.
9. An interrupt processing device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the interrupt handling method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the interrupt processing method according to any one of claims 1 to 7.
CN202010616611.4A 2020-06-30 2020-06-30 Interrupt processing method, system, equipment and computer readable storage medium Active CN111857996B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010616611.4A CN111857996B (en) 2020-06-30 2020-06-30 Interrupt processing method, system, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010616611.4A CN111857996B (en) 2020-06-30 2020-06-30 Interrupt processing method, system, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111857996A true CN111857996A (en) 2020-10-30
CN111857996B CN111857996B (en) 2023-04-07

Family

ID=72989384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010616611.4A Active CN111857996B (en) 2020-06-30 2020-06-30 Interrupt processing method, system, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111857996B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342274A (en) * 2021-06-10 2021-09-03 北京字节跳动网络技术有限公司 Data processing method and device
CN115185779A (en) * 2022-07-14 2022-10-14 上海芯钛信息科技有限公司 An outage monitoring system and method
CN120123105A (en) * 2025-05-13 2025-06-10 山东云海国创云计算装备产业创新中心有限公司 A performance control method, device, equipment, program product and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013134636A (en) * 2011-12-27 2013-07-08 Hitachi Ltd Computer load control method
CN104756095A (en) * 2012-10-25 2015-07-01 高通股份有限公司 Dynamic adjustment of an interrupt latency threshold and a resource supporting a processor in a portable computing device
CN107402894A (en) * 2016-05-19 2017-11-28 三星电子株式会社 Method for performing the adaptive computer system for interrupting control and its control interruption
CN107431666A (en) * 2015-03-23 2017-12-01 思科技术公司 For realizing the technology of low time delay in data center network environment
CN108628777A (en) * 2017-03-24 2018-10-09 西部数据技术公司 Dynamic and the adaptively combined system and method for interruption
US20190163538A1 (en) * 2012-08-03 2019-05-30 Amazon Technologies, Inc. Performance tuning of virtual resources

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013134636A (en) * 2011-12-27 2013-07-08 Hitachi Ltd Computer load control method
US20190163538A1 (en) * 2012-08-03 2019-05-30 Amazon Technologies, Inc. Performance tuning of virtual resources
CN104756095A (en) * 2012-10-25 2015-07-01 高通股份有限公司 Dynamic adjustment of an interrupt latency threshold and a resource supporting a processor in a portable computing device
CN107431666A (en) * 2015-03-23 2017-12-01 思科技术公司 For realizing the technology of low time delay in data center network environment
CN107402894A (en) * 2016-05-19 2017-11-28 三星电子株式会社 Method for performing the adaptive computer system for interrupting control and its control interruption
CN108628777A (en) * 2017-03-24 2018-10-09 西部数据技术公司 Dynamic and the adaptively combined system and method for interruption

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
杨洪波: "高性能网络虚拟化技术研究", 《中国优秀博硕士学位论文全文数据库(博士) 信息科技辑》 *
第三机械工业部第615研究所,上海科学技术大学三系: "《国外通信技术》", 30 April 1982 *
钱正宇: "高性能网络虚拟化环境下动态中断频率协同控制技术研究", 《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342274A (en) * 2021-06-10 2021-09-03 北京字节跳动网络技术有限公司 Data processing method and device
CN113342274B (en) * 2021-06-10 2024-01-30 北京火山引擎科技有限公司 Data processing method and device
CN115185779A (en) * 2022-07-14 2022-10-14 上海芯钛信息科技有限公司 An outage monitoring system and method
CN120123105A (en) * 2025-05-13 2025-06-10 山东云海国创云计算装备产业创新中心有限公司 A performance control method, device, equipment, program product and storage medium

Also Published As

Publication number Publication date
CN111857996B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN111857996B (en) Interrupt processing method, system, equipment and computer readable storage medium
CN109614227B (en) Task resource allocation method, apparatus, electronic device, and computer-readable medium
CN111737030A (en) A control instruction processing method, apparatus, device and computer storage medium
CN111367693B (en) Method, system, device and medium for scheduling plug-in tasks based on message queue
US12487777B2 (en) Apparatus for a first device MMIO mapped with a second device and a method of performing data processing operations therebetween
CN114826749A (en) Interface access control method, device and medium
CN116150054A (en) Interrupt information processing method based on PCIE
WO2021164163A1 (en) Request processing method and apparatus, device and storage medium
US20220053382A1 (en) Method and apparatus for handling protocol data unit session, and electronic device
CN105718318B (en) An Integrated Scheduling Optimization Method Based on Auxiliary Engineering Design Software
CN114356547A (en) Low-priority blocking method and device based on processor virtualization environment
CN111459634B (en) Task scheduling method, device, terminal and storage medium
CN110247815A (en) A kind of data transmission method, device, system and computer readable storage medium
CN112667368B (en) Task data processing method and device
US11847089B2 (en) Electronic device and method for sharing data lanes of a network interface device between two or more computing devices
EP3723343B1 (en) Resource processing method and system, storage medium and electronic device
CN113079152B (en) Data transmission method, device and medium
CN109995595A (en) A kind of RGW quota determines method, system, equipment and computer media
CN107766268A (en) Interruption sending method, device, system, equipment and the storage medium of storage device
CN114968551A (en) Process management method, device, electronic device and storage medium
WO2025222984A1 (en) Access control method and apparatus, and electronic device and computer-readable storage medium
CN107632893A (en) Message queue processing method and device
CN111130863A (en) Virtual network card management method, system, equipment and computer storage medium
CN107689979B (en) method and equipment for processing download request
CN111353811B (en) Unified resource issuing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240702

Address after: 2324, Building 1, Aosheng Building, No. 1166 Xinluo Street, High tech Zone, Jinan City, Shandong Province, 250000

Patentee after: Inspur Computer Technology Co.,Ltd.

Country or region after: China

Address before: 35th floor, S01 building, Inspur science and Technology Park, 1036 Inspur Road, Jinan area, Jinan pilot Free Trade Zone, Jinan City, Shandong Province

Patentee before: Shandong Yunhai guochuang cloud computing equipment industry innovation center Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right