Bandwidth cooperative control device and method for PCIe SSD multi-virtual function device

文档序号:1849653 发布日期:2021-11-16 浏览:11次 中文

阅读说明:本技术 一种PCIe SSD多虚拟功能设备的带宽协同控制装置及方法 (Bandwidth cooperative control device and method for PCIe SSD multi-virtual function device ) 是由 吴斌 王璞 段好强 乔子龙 孙中琳 于 2021-07-30 设计创作,主要内容包括:本发明公开一种PCIe SSD多虚拟功能设备的带宽协同控制装置及方法,增加了SSD流量检测与控制单元,该模块可以利用总线上数据传输信息计算出各个控制器的带宽,根据流量控制寄存器中设定的带宽比例,实现限速甄别和信号发送;增加了中断控制单元,用于将流量控制模块发出的限速信号转换成中断,发送到cpu核。通过本专利的方法,硬件模块精确计算各个控制器的带宽,与cpu固件一起,实现了虚拟设备的带宽约束功能,具有支持数据流控占比可调、功能灵活的特点,有效分担了服务器主机的计算压力,为服务器运行更多用户服务提供可能性。(The invention discloses a bandwidth cooperative control device and method of PCIe SSD multi-virtual function equipment.A SSD flow detection and control unit is added, and a module can calculate the bandwidth of each controller by utilizing data transmission information on a bus and realize speed limit discrimination and signal transmission according to the bandwidth proportion set in a flow control register; and an interrupt control unit is additionally arranged and used for converting the speed limit signal sent by the flow control module into an interrupt and sending the interrupt to the cpu core. According to the method, the hardware module accurately calculates the bandwidth of each controller, the bandwidth constraint function of the virtual equipment is realized together with the CPU firmware, the method has the characteristics of supporting adjustable data flow control ratio and flexible functions, the calculation pressure of the server host is effectively shared, and the possibility is provided for the server to run more user services.)

1. A bandwidth cooperative control device of PCIe SSD multi-virtual function equipment is characterized in that: the device is arranged inside an SSD main control chip and comprises a flow detection and control unit, an interrupt control unit and a register;

the traffic detection and control unit is connected between the nvme controllers and the PCIe interface module, calculates the data volume contained in the data packet sent by each nvme controller, calculates the bandwidth occupied by each controller according to the sampling time, calculates the bandwidth proportion occupied by each controller according to the current link establishment rate, and sends an interrupt request when the bandwidth proportion occupied by a certain controller reaches a set proportion a;

the interrupt control unit is connected with the flow detection and control unit and used for generating an interrupt signal, when the flow detection and control unit initiates an interrupt request, the interrupt control unit generates the interrupt signal, and simultaneously, a corresponding bit is marked in the interrupt identification register and used for reading firmware;

the registers comprise a group of flow control registers and a flow state register, the number of the flow controller registers is determined according to the number of functional devices supported by the SSD and is used for setting the flow proportion of each controller, and the flow state register is used for identifying the controller with flow limitation;

and after receiving the interrupt signal, the CPU core temporarily limits the corresponding nvme controller to occupy the DMA request so as to limit the data transmission quantity of the corresponding nvme controller, and when the statistical flow proportion is lower than b, the internal firmware clears the corresponding identification bit and cancels the flow limitation on the nvme controller.

2. The apparatus of claim 1, wherein the apparatus comprises: the data packets sent by the nvme controllers contain read-write mark information including controller numbers and data volumes, and the flow detection and control unit calculates the data volumes contained in the data packets sent by the nvme controllers based on the read-write mark information.

3. The apparatus of claim 1, wherein the apparatus comprises: a =99%, b = 97%.

4. The apparatus of claim 1, wherein the apparatus comprises: each bit of the flow status register represents a controller.

5. A bandwidth cooperative control method for PCIe SSD multi-virtual function devices is characterized in that: the method comprises the following steps:

s01), the SSD firmware configures the flow proportion of each nvme controller through a register;

s02), in the process of normal reading and writing of SSD, the flow detection and control unit automatically enters a carrying state, calculates the data volume contained in the data packet sent by each nvme controller, calculates the bandwidth occupied by each controller according to the sampling time, calculates the bandwidth proportion occupied by each controller according to the current link establishment rate, marks a flow state register and sends a signal to the interrupt control unit when monitoring that the bandwidth proportion of a certain controller reaches a;

s03), after receiving the signal, the interrupt control unit generates an interrupt signal and sends the interrupt signal to a CPU core in the SSD master control chip;

s04), after the CPU core responds to the interrupt exception request, inquiring a flow state register, identifying the controller ID generating speed limit, triggering a speed limit algorithm, and then limiting when the controller acquires a DMA request, so that the controller sends the DMA request to carry out pending processing;

s05), when the flow detection and control unit detects that the bandwidth proportion of the controller returns to b and below the limited proportion, clearing the value of the corresponding register;

s06), after the controller which is set by the firmware polling detection is recovered to be normal, the limitation that the corresponding controller initiates the DMA request is cancelled, and the data transmission of the controller is recovered to be normal.

6. The method of claim 5, wherein the method further comprises: a =99%, b = 97%.

Technical Field

The invention relates to the field of storage, in particular to a bandwidth cooperative control device and method for PCIe SSD multi-virtual function equipment.

Background

With the deep development of cloud computing services, a server host puts new requirements on SSDs, and especially PCIe SSDs of multiple virtual function devices (VFs) are becoming a development trend. Common enterprise-level SSDs support a specification number of 16VFs, 32VFs, supporting multiple namespace functionality. A VF may provide a relatively independent PCIe device space, support for mounting to different virtual machines and identifying as an nvme device, providing upper-level client applications. In the application process of the server, in order to ensure the access load balance of different clients to the SSD and the traffic balance among different virtual devices, the traffic control is often performed at the server side, which consumes the CPU operation performance to a certain extent.

Disclosure of Invention

Aiming at the defects of the prior art, the invention provides a bandwidth cooperative control device and method of PCIe SSD multi-virtual function equipment, which achieve the effect of controlling data flow by monitoring the data flow receiving and sending occupation ratio of different virtual equipment on an internal bus in an SSD controller and matching hardware and software, have the characteristics of adjustable occupation ratio and flexible functions of supporting data flow control, effectively reduce the calculation pressure of a server host and provide possibility for supporting more user services for services.

In order to solve the technical problem, the technical scheme adopted by the invention is as follows: a bandwidth cooperative control device of PCIe SSD multi-virtual function equipment is characterized in that: the device is arranged inside an SSD main control chip and comprises a flow detection and control unit, an interrupt control unit and a register;

the traffic detection and control unit is connected between the nvme controllers and the PCIe interface module, calculates the data volume contained in the data packet sent by each nvme controller, calculates the bandwidth occupied by each controller according to the sampling time, calculates the bandwidth proportion occupied by each controller according to the current link establishment rate, and sends an interrupt request when the bandwidth proportion occupied by a certain controller reaches a set proportion a;

the interrupt control unit is connected with the flow detection and control unit and used for generating an interrupt signal, when the flow detection and control unit initiates an interrupt request, the interrupt control unit generates the interrupt signal, and simultaneously, a corresponding bit is marked in the interrupt identification register and used for reading firmware;

the registers comprise a group of flow control registers and a flow state register, the number of the flow controller registers is determined according to the number of functional devices supported by the SSD and is used for setting the flow proportion of each controller, and the flow state register is used for identifying the controller with flow limitation;

and after receiving the interrupt signal, the CPU core temporarily limits the corresponding nvme controller to occupy the DMA request so as to limit the data transmission quantity of the corresponding nvme controller, and when the statistical flow proportion is lower than b, the internal firmware clears the corresponding identification bit and cancels the flow limitation on the nvme controller.

Furthermore, the data packets sent by the nvme controllers contain read-write flag information including controller numbers and data volumes, and the flow detection and control unit calculates the data volumes contained in the data packets sent by the nvme controllers based on the read-write flag information.

Further, a =99%, b = 97%.

Further, each bit of the flow status register represents a controller.

The invention also discloses a bandwidth cooperative control method of PCIe SSD multi-virtual function equipment, which comprises the following steps:

s01), the SSD firmware configures the flow proportion of each nvme controller through a register;

s02), in the process of normal reading and writing of SSD, the flow detection and control unit automatically enters a carrying state, calculates the data volume contained in the data packet sent by each nvme controller, calculates the bandwidth occupied by each controller according to the sampling time, calculates the bandwidth proportion occupied by each controller according to the current link establishment rate, marks a flow state register and sends a signal to the interrupt control unit when monitoring that the bandwidth proportion of a certain controller reaches a;

s03), after receiving the signal, the interrupt control unit generates an interrupt signal and sends the interrupt signal to a CPU core in the SSD master control chip;

s04), after the CPU core responds to the interrupt exception request, inquiring a flow state register, identifying the controller ID generating speed limit, triggering a speed limit algorithm, and then limiting when the controller acquires a DMA request, so that the controller sends the DMA request to carry out pending processing;

s05), when the flow detection and control unit detects that the bandwidth proportion of the controller returns to b and below the limited proportion, clearing the value of the corresponding register;

s06), after the controller which is set by the firmware polling detection is recovered to be normal, the limitation that the corresponding controller initiates the DMA request is cancelled, and the data transmission of the controller is recovered to be normal.

Further, a =99%, b = 97%.

The invention has the beneficial effects that: the invention provides a bandwidth cooperative control device and a bandwidth cooperative control method for PCIe SSD multi-virtual function equipment, wherein an SSD flow detection and control unit is added, and the module can calculate the bandwidth of each controller by utilizing data transmission information on a bus, and realizes speed limit discrimination and signal transmission according to the bandwidth proportion set in a flow control register; and an interrupt control unit is additionally arranged and used for converting the speed limit signal sent by the flow control module into an interrupt and sending the interrupt to the cpu core. According to the method, the hardware module accurately calculates the bandwidth of each controller, the bandwidth constraint function of the virtual equipment is realized together with the CPU firmware, the method has the characteristics of supporting adjustable data flow control ratio and flexible functions, the calculation pressure of the server host is effectively shared, and the possibility is provided for the server to run more user services.

Drawings

FIG. 1 is a schematic block diagram of an apparatus according to embodiment 1;

FIG. 2 is a flow chart of the method described in example 2.

Detailed Description

The invention is further described with reference to the following figures and specific embodiments.

Example 1

The embodiment discloses a bandwidth cooperative control device of PCIe SSD multiple virtual function devices, as shown in fig. 1, an SSD board card includes an SOC main control chip, a nand flash, ram, and a PCIe golden finger interface, and the device is implemented inside the SSD main control chip.

The cooperative control apparatus in this embodiment includes a flow detection and control unit, an interrupt control unit, and a register.

The traffic detection and control unit is connected between the nvme controller and the PCIe interface module, and in a data packet sent by the nvme controller c0 … cx (x =1, 2., VFnum) to an internal bus of the SSD, the traffic detection and control unit contains read-write mark information related to a controller number, a data volume and the like, calculates the data volume contained in the data packet sent by each nvme controller by using the information, calculates the bandwidth occupied by each controller according to sampling time, calculates the bandwidth proportion occupied by each controller according to the rate of a currently established link, marks a corresponding Bit of a traffic state register when the bandwidth proportion occupied by a certain controller reaches 99% of the set proportion, and sends an interrupt request.

The interrupt control unit is connected with the flow detection and control unit and used for generating an interrupt signal, when the flow detection and control unit initiates an interrupt request, the interrupt control unit generates the interrupt signal, and simultaneously, a corresponding bit is identified in the interrupt identification register and used for reading firmware.

The registers comprise a group of flow control registers and a flow state register, the number of the flow controller registers is determined according to the number of the functional devices supported by the SSD and is used for setting the flow proportion of each controller, and the flow state register is used for identifying the controller with flow limitation.

The CPU core runs the firmware to realize read-write command and interrupt processing. When the system is powered on, the firmware sets the flow control proportion corresponding to each nvme controller in the flow control register. Under normal conditions, after receiving and analyzing the read-write command of the host, a DMA request is initiated to transmit the required user data to the host. After receiving the request of the interrupt controller, judging the controller ID of the current limit according to the flag bit of the interrupt state controller, temporarily limiting the corresponding nvme controller to occupy the DMA request by the internal firmware, thereby limiting the data transmission quantity of the corresponding nvme controller, and when the statistical flow proportion is lower than 97%, clearing the corresponding identification bit and canceling the flow limitation of the nvme controller.

In this embodiment, the number of the flow controller registers is determined according to the number of the functional devices supported by the SSD, and if 8 flow controller registers are supported, 2 32-bit flow controller registers need to be set. Each bit of the flow status register represents a controller.

Example 2

The embodiment discloses a bandwidth coordination control method for PCIe SSD multiple virtual function devices, as shown in fig. 2, including the following steps:

s01), the SSD firmware configures the flow proportion of each nvme controller through a register;

s02), in the process of normal reading and writing of SSD, the flow detection and control unit automatically enters a carrying state, calculates the data volume contained in the data packet sent by each nvme controller, calculates the bandwidth occupied by each controller according to the sampling time, calculates the bandwidth proportion occupied by each controller according to the current link establishment rate, marks a flow state register and sends a signal to the interrupt control unit when the bandwidth proportion of one controller reaches 99 percent;

s03), after receiving the signal, the interrupt control unit generates an interrupt signal and sends the interrupt signal to a CPU core in the SSD master control chip;

s04), after the CPU core responds to the interrupt exception request, inquiring a flow state register, identifying the controller ID generating speed limit, triggering a speed limit algorithm, and then limiting when the controller acquires a DMA request, so that the controller sends the DMA request to carry out pending processing;

the speed-limiting algorithm means that the read-write command of the speed-limiting controller does not allocate DMA resources temporarily, namely, the read-write command stops sending a new data transmission request. After a certain sampling time, the bandwidth of the controller will decrease.

S05), when the flow detecting and controlling unit detects that the bandwidth proportion of the controller returns to 97% of the limited proportion or less, clearing the value of the corresponding register;

s06), after the controller which is set by the firmware polling detection is recovered to be normal, the limitation that the corresponding controller initiates the DMA request is cancelled, and the data transmission of the controller is recovered to be normal.

According to the method, the hardware module accurately calculates the bandwidth of each controller, the bandwidth constraint function of the virtual equipment is realized together with the CPU firmware, the method has the characteristics of supporting adjustable data flow control ratio and flexible functions, the calculation pressure of the server host is effectively shared, and the possibility is provided for the server to run more user services.

The foregoing description is only for the basic principle and the preferred embodiments of the present invention, and modifications and substitutions by those skilled in the art are included in the scope of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种数据存储方法、装置、终端及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!