CN114020353B - Bypass unloading method, device, computer equipment and storage medium - Google Patents

Bypass unloading method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN114020353B
CN114020353B CN202111266350.9A CN202111266350A CN114020353B CN 114020353 B CN114020353 B CN 114020353B CN 202111266350 A CN202111266350 A CN 202111266350A CN 114020353 B CN114020353 B CN 114020353B
Authority
CN
China
Prior art keywords
chip
request
computer
memory
equipment
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.)
Active
Application number
CN202111266350.9A
Other languages
Chinese (zh)
Other versions
CN114020353A (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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202111266350.9A priority Critical patent/CN114020353B/en
Publication of CN114020353A publication Critical patent/CN114020353A/en
Application granted granted Critical
Publication of CN114020353B publication Critical patent/CN114020353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/509Offload
    • 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

Abstract

The invention discloses a bypass unloading method, a bypass unloading device, computer equipment and a storage medium, and relates to the technical field of computers. A system on a chip applied to a computer device; the method comprises the following steps: mapping the memory of the computer device to a system on chip; receiving an IO request sent by computer equipment or back-end equipment connected with the computer equipment; the IO request is completed based on the memory mapped to the system on chip. By adopting the method, memory copying of a system on chip and a host end of computer equipment can be avoided, IO zero copying is achieved, the IO zero copying is directly unloaded to the system on chip, and a CPU of the computer equipment is not required to process IO requests sent by back-end equipment. And further, the CPU utilization rate of the host end is improved, IO inquiry and switching are reduced, and IO overhead is reduced.

Description

Bypass unloading method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a bypass unloading method, a device, a computer device, and a storage medium.
Background
In the age of information explosion growth, CPU development encounters bottlenecks, and moore's law gradually fails in CPU development. The consumption of CPU calculation is larger and larger, the situation of CPU resource shortage often occurs, and the task processing of the CPU is adversely affected. Therefore, offloading of the local CPU is required to relieve the local CPU from the pressure.
In the related art, it is common practice to locally use some kind of hardware to optimize and compute offload for some kind of usage scenario of the service program CPU.
However, in the above method, this hardware device is added to all servers where such a service program needs to be deployed, and is limited by hardware, and therefore, it is difficult to implement.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a bypass unloading method, device, computer apparatus and storage medium, so as to solve the problem that the conventional method is greatly limited by hardware.
According to a first aspect, an embodiment of the present invention provides a bypass offload method applied to a system on a chip in a computer device; the method comprises the following steps: mapping the memory of the computer device to a system on chip; receiving an IO request sent by computer equipment or back-end equipment connected with the computer equipment; the IO request is completed based on the memory mapped to the system on chip.
In an embodiment of the application, the system-on-chip maps the memory of the computer device to the system-on-chip; receiving an IO request sent by computer equipment or back-end equipment connected with the computer equipment; the IO request is completed based on the memory mapped to the system on chip. Therefore, the system on chip can finish IO requests sent by the computer equipment or the back-end equipment based on the memory mapped to the system on chip, avoid the memory copies of the system on chip and the host end of the computer equipment, achieve IO zero copy, directly unload the IO zero copy to the system on chip, and do not need the CPU of the computer equipment to process the IO requests sent by the back-end equipment. And further, the CPU utilization rate of the host end is improved, IO inquiry and switching are reduced, and IO overhead is reduced.
With reference to the first aspect, in a first implementation manner of the first aspect, mapping a memory of a computer device to a system on a chip includes: and based on the large page memory registered in the computer equipment, establishing a mapping relation between the computer equipment and the system on chip, and mapping the memory of the computer equipment to the system on chip.
In the embodiment of the application, the on-chip system registration is performed through the large page memory, so that the on-chip system and the host memory copy of the computer equipment are avoided, IO zero copy is achieved, the IO zero copy is directly unloaded to the on-chip system, IO access is reduced, IO performance is improved, and IO time delay is reduced. And meanwhile, the large page memory is used for avoiding page missing interruption, reducing CPU context switching and improving storage performance.
With reference to the first aspect, in a second implementation manner of the first aspect, before receiving an IO request sent by the backend device, the method further includes: acquiring attribute information of each back-end device, marking each back-end device according to the attribute information, and determining marking information; and based on the labeling information, unified management is carried out on the back-end equipment.
In the embodiment of the application, the system on a chip acquires attribute information of each back-end device, marks each back-end device according to the attribute information, and determines marking information; and based on the labeling information, unified management is carried out on the back-end equipment. Therefore, all protocol types of the back-end equipment can be directly unloaded to the system on chip, CPU intervention of a host end of the computer equipment is reduced, and the CPU utilization rate is improved.
With reference to the first aspect, in a third implementation manner of the first aspect, if the IO request is sent by the back-end device, completing the IO request based on the memory mapped to the system on chip includes: judging whether at least two back-end devices corresponding to the IO request are in the same system or not; if at least two back-end devices are in the same system, unloading the IO request to a first storage device in the back-end devices; based on the first storage device, the IO request is completed.
In the embodiment of the application, whether at least two back-end devices corresponding to the IO request are in the same system is judged, and then the mode of completing the IO request is determined according to whether the at least two back-end devices are in the same system, so that the efficiency of completing the IO request is improved. Unloading the IO request to a first storage device in the back-end devices when at least two back-end devices are in the same system; based on the first storage device, the IO request is completed, so that the unloading of the data copies among the devices stored in the plurality of back ends by directly using the storage device is realized, the IO is unloaded onto the storage device, the CPU overhead of the system on chip is reduced, meanwhile, the IO path is reduced, the internal data copies are directly stored, the IO overhead and the IO delay are reduced, the storage performance is improved, and meanwhile, the IO delay of the IO is reduced, so that the IO performance of the computer device is improved.
With reference to the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the method further includes: if at least two back-end devices are not in the same system, calling a second storage device of each back-end device; and according to the IO request, issuing the task in the IO request to the second storage device corresponding to each back-end device.
In the embodiment of the application, if at least two back-end devices are not in the same system, invoking a second storage device of each back-end device; and according to the IO request, issuing the task in the IO request to the second storage device corresponding to each back-end device. The memory zero copy among the back-end devices under different systems is realized, the second storage device of the back-end device is directly called by the system on chip to carry out IO issuing, the IO unloading among the storage devices is achieved, the IO is completely unloaded to the system on chip, the participation of the host end of the computer device is reduced, the CPU overhead of the host end IO request of the computer device is reduced, and the storage performance is improved.
With reference to the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, issuing, according to the IO request, a task in the IO request to a second storage device corresponding to each back-end device includes: according to the IO request, determining first target back-end equipment from the back-end equipment, and determining second storage equipment corresponding to the first target back-end equipment; acquiring target data in second storage equipment corresponding to the first target back-end equipment; determining a second target back-end device corresponding to the target data and a second storage device corresponding to the second target back-end device, and transmitting the target data to the second storage device corresponding to the second target back-end device.
In the embodiment of the application, the system on a chip determines a first target back-end device from back-end devices according to the IO request, and determines a second storage device corresponding to the first target back-end device; acquiring target data in second storage equipment corresponding to the first target back-end equipment; determining a second target back-end device corresponding to the target data and a second storage device corresponding to the second target back-end device, and transmitting the target data to the second storage device corresponding to the second target back-end device. Therefore, zero copy of the memory among the back-end devices under different systems is realized, the second storage device of the back-end device is directly called by the system on chip to carry out IO issuing, IO unloading among the storage devices is achieved, IO is completely unloaded to the system on chip, participation of a host end of the computer device is reduced, CPU overhead of the host end IO of the computer device is reduced, and storage performance is improved.
With reference to the first aspect, in a sixth implementation manner of the first aspect, if the IO request is sent by the back-end device, and the back-end device is connected to the system on chip through a network, the completing the IO request based on the memory mapped to the system on chip includes: acquiring first data mapped in a memory of a system on chip; the first data is sent to the backend device based on network communication with the backend device.
In the embodiment of the application, a system on chip acquires first data mapped in a memory of the system on chip; the first data is sent to the backend device based on network communication with the backend device. Therefore, the back-end equipment can access the memory mapped on the system on chip based on network communication, and directly issue IO tasks, reduce memory copying, improve storage performance, unload the network and the storage, reduce the CPU utilization rate of the computer equipment, and improve the storage performance.
According to a second aspect, an embodiment of the present invention provides a bypass offload device applied to a system on a chip in a computer apparatus; the bypass unloader apparatus includes:
the mapping module is used for mapping the memory of the computer equipment to the system on chip;
the receiving module is used for receiving the IO request sent by the computer equipment or the back-end equipment connected with the computer equipment;
and the completion module is used for completing the IO request based on the memory mapped to the system on chip.
With reference to the second aspect, in a first implementation manner of the second aspect, the mapping module is specifically configured to establish a mapping relationship between the computer device and the system on chip based on a large page of memory registered in the computer device, and map the memory of the computer device to the system on chip.
With reference to the second aspect, in a second implementation manner of the second aspect, before receiving an IO request sent by the backend device, the bypass offload apparatus further includes:
the acquisition module acquires attribute information of each back-end device, marks each back-end device according to the attribute information and determines marking information;
and the management module is used for uniformly managing the back-end equipment based on the labeling information.
With reference to the second aspect, in a third embodiment of the second aspect, if the IO request is sent by a backend device, the completion module is specifically configured to determine whether at least two backend devices corresponding to the IO request are in the same system; if at least two back-end devices are in the same system, unloading the IO request to a first storage device in the back-end devices; based on the first storage device, the IO request is completed.
With reference to the third implementation manner of the second aspect, in a fourth implementation manner of the second aspect, the completion module is further configured to invoke a second storage device of each back-end device if at least two back-end devices are not in the same system; and according to the IO request, issuing the task in the IO request to the second storage device corresponding to each back-end device.
With reference to the fourth embodiment of the second aspect, in a fifth embodiment of the second aspect, the completion module is specifically configured to determine, according to an IO request, a first target backend device from backend devices, and determine a second storage device corresponding to the first target backend device; acquiring target data in second storage equipment corresponding to the first target back-end equipment; determining a second target back-end device corresponding to the target data and a second storage device corresponding to the second target back-end device, and transmitting the target data to the second storage device corresponding to the second target back-end device.
With reference to the second aspect, in a sixth implementation manner of the second aspect, if the IO request is sent by a back-end device, and the back-end device is connected to a system-on-chip network, the completion module is specifically configured to obtain first data mapped in a memory of the system-on-chip; the first data is sent to the backend device based on network communication with the backend device.
According to a third aspect, an embodiment of the present invention provides a computer device including a system on a chip, the system on a chip including: the system comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions so as to execute the bypass unloading method in the first aspect or any implementation manner of the first aspect.
According to a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer instructions for causing a computer to perform the first aspect or any one of the implementation manners of the first aspect.
According to a fifth aspect, an embodiment of the present invention provides a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the bypass offload method of the first aspect or any one of the embodiments of the first aspect.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and should not be construed as limiting the invention in any way, in which:
FIG. 1 illustrates a flow diagram of the steps of a bypass offload method in one embodiment;
FIG. 2 shows a flow chart of the steps of a bypass offload method in another embodiment;
FIG. 3 shows a flow chart of the steps of a bypass offload method in another embodiment;
FIG. 4 shows a flow chart of the steps of a bypass offload method in another embodiment;
FIG. 5 shows a flow chart of the steps of a bypass offload method in another embodiment;
FIG. 6 shows a flow chart of steps of a bypass offload method in another embodiment;
FIG. 7 shows a schematic diagram of the internal architecture of a computer device in a bypass offload method in another embodiment;
FIG. 8 illustrates a block diagram of a bypass unloader in one embodiment;
FIG. 9 illustrates a block diagram of a bypass unloader in one embodiment;
FIG. 10 illustrates an internal block diagram of one embodiment when the computer device is a server;
fig. 11 shows an internal structural diagram of the case where the computer device is a terminal according to one embodiment.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
It should be noted that, the execution body of the bypass unloading method provided in the embodiment of the present application may be a bypass unloading device, and the bypass unloading device may be implemented as part or all of a computer device in a manner of software, hardware or a combination of software and hardware, where the computer device may be a server or a terminal, where the server in the embodiment of the present application may be a server or a server cluster formed by multiple servers, and the terminal in the embodiment of the present application may be an intelligent mobile phone, a personal computer, a tablet computer, a wearable device, and other intelligent hardware devices such as an intelligent robot. In the following method embodiments, the execution subject is a computer device.
In one embodiment of the present application, a bypass offload method is provided, as shown in fig. 1, and the method is applied to a system on a chip in a computer device for example, and includes the following steps:
101, mapping a memory of a computer device to a system on a chip.
In an alternative manner of the present application, the system-on-chip may map the memory of the computer device to the system-on-chip through a large page of memory registered by the computer device.
In another alternative embodiment of the present application, the system-on-chip may run a storage performance development tool and map the memory of the computer device to the system-on-chip by way of the storage performance development tool.
102, receiving an IO request sent by the computer device or the back-end device connected with the computer device.
In an alternative embodiment of the present application, the system-on-chip may receive a transmitted IO request from a computer device based on communication with the computer device.
In an optional embodiment of the application, the system on chip may further run a storage performance development tool, and shield the perception of the back-end device by the computer device through the storage performance development tool, so that the system on chip may receive the IO request sent by the back-end device.
103, based on the memory mapped to the system on chip, the IO request is completed.
Specifically, the system-on-chip completes the IO request sent by the computer device or the backend device based on the memory mapped to the system-on-chip.
In an embodiment of the application, the system-on-chip maps the memory of the computer device to the system-on-chip; receiving an IO request sent by computer equipment or back-end equipment connected with the computer equipment; the IO request is completed based on the memory mapped to the system on chip. Therefore, the system on chip can finish IO requests sent by the computer equipment or the back-end equipment based on the memory mapped to the system on chip, avoid the memory copies of the system on chip and the host end of the computer equipment, achieve IO zero copy, directly unload the IO zero copy to the system on chip, and do not need the CPU of the computer equipment to process the IO requests sent by the back-end equipment. And further, the CPU utilization rate of the host end is improved, IO inquiry and switching are reduced, and IO overhead is reduced.
In one embodiment of the present application, "mapping the memory of the computer device to the system on chip" in 101 above may include the following:
and based on the large page memory registered in the computer equipment, establishing a mapping relation between the computer equipment and the system on chip, and mapping the memory of the computer equipment to the system on chip.
Specifically, the computer device performs large page memory registration, then the on-chip system establishes a mapping relation between the computer device and the on-chip system based on the large page memory registered in the computer device, maps the memory of the computer device to the on-chip system, realizes IO request and network communication of the on-chip system to use the large page memory of the computer device, achieves data RDMA, direct memory writing, reduces memory copying, and improves the performance of network and storage.
In the embodiment of the application, the on-chip system registration is performed through the large page memory, so that the on-chip system and the host memory copy of the computer equipment are avoided, IO zero copy is achieved, the IO zero copy is directly unloaded to the on-chip system, IO access is reduced, IO performance is improved, and IO time delay is reduced. And meanwhile, the large page memory is used for avoiding page missing interruption, reducing CPU context switching and improving storage performance.
In one embodiment of the present application, as shown in fig. 2, before receiving the IO request sent by the backend device, the method further includes:
and 201, acquiring attribute information of each back-end device, labeling each back-end device according to the attribute information, and determining labeling information.
Specifically, the system on a chip may run a storage performance development tool that connects back-end devices through a device layer in the storage performance development tool. And then, acquiring attribute information of each back-end device through connection with each back-end device, marking each back-end device according to the attribute information, and determining marking information.
The storage performance development tool may be a SPDK (Storage performance development kit) tool, among others. The goal of SPDK is to maximize the efficacy of solid state storage media by using Intel's network, processing, storage technology.
202, based on the labeling information, unified management is performed on the back-end equipment.
Specifically, the system on chip performs unified management on the back-end devices based on the labeling information of each back-end device after labeling.
In an alternative embodiment, the system on chip can map the backend device to the host end of the computer device by using the virtio-blk of the storage performance development tool, so that the host end of the computer device sees the backend device of the same type, and all protocol types of the backend device are directly unloaded to the system on chip, thereby reducing the intervention of the host end CPU of the computer device and improving the CPU utilization rate.
In the embodiment of the application, the system on a chip acquires attribute information of each back-end device, marks each back-end device according to the attribute information, and determines marking information; and based on the labeling information, unified management is carried out on the back-end equipment. Therefore, all protocol types of the back-end equipment can be directly unloaded to the system on chip, CPU intervention of a host end of the computer equipment is reduced, and the CPU utilization rate is improved.
In one embodiment of the present application, if the IO request is sent by the backend device, as shown in fig. 3, the "completing the IO request based on the memory mapped to the system on chip" in the step 103 may include the following steps:
301, judging whether at least two back-end devices corresponding to the IO request are in the same system, and if the at least two back-end devices are in the same system, executing step 302; if at least two backend devices are not in the same system, step 304 is performed.
Specifically, after receiving an IO request sent by a back-end device, the system on a chip determines at least two back-end devices corresponding to the IO request, and determines whether the at least two back-end devices are in the same system according to labeling information of the at least two back-end devices.
302, offloading the IO request to a first storage device in the backend device.
Specifically, if at least two backend devices are in the same system, the system on chip determines a first storage device corresponding to the system, and uninstalls the IO request to the first storage device.
In an optional implementation manner, the system on chip may run a storage performance development tool, connect each back-end device through a device layer in the storage performance development tool, implement unified management on the back-end devices, and if at least two back-end devices are in the same system, the system on chip determines a first storage device corresponding to the system, and offload an IO request to the first storage device.
303, based on the first storage device, completing the IO request.
Specifically, the system-on-chip may fulfill the IO request based on the first storage device.
304, a second storage device of each backend device is invoked.
Specifically, if at least two back-end devices are not in the same system, the system on chip determines a second storage device corresponding to each back-end device according to the labeling information of each back-end device, and then calls the second storage device corresponding to each back-end device.
And 305, according to the IO request, issuing the task in the IO request to the second storage device corresponding to each back-end device.
Specifically, the system on a chip analyzes the IO request, acquires at least one task in the IO request, issues the task in the IO request to a second storage device corresponding to each back-end device, and then completes the IO request based on the second storage device.
In an optional embodiment of the present application, the system on a chip may run a storage performance development tool, and connect each backend device through a device layer in the storage performance development tool, so as to implement unified management on the backend device. When at least two back-end devices are not in the same system, the system on chip can provide data copy based on IO requests for the back-end devices which are not in the same system, the data stream is carried out through a device layer in a storage performance development tool running in the system on chip, the IO requests are directly forwarded from the system on chip, intervention of a host end of computer equipment is not needed, zero copy is stored at the same time, copying IO is directly unloaded to the system on chip, CPU use of the host end of the computer equipment is reduced, CPU use rate of the host end is improved, IO links are reduced, storage performance is improved, and IO delay is reduced.
In the embodiment of the application, whether at least two back-end devices corresponding to the IO request are in the same system is judged, and then the mode of completing the IO request is determined according to whether the at least two back-end devices are in the same system, so that the efficiency of completing the IO request is improved. Unloading the IO request to a first storage device in the back-end devices when at least two back-end devices are in the same system; based on the first storage device, the IO request is completed, so that the unloading of the data copies among the devices stored in the plurality of back ends by directly using the storage device is realized, the IO is unloaded onto the storage device, the CPU overhead of the system on chip is reduced, meanwhile, the IO path is reduced, the internal data copies are directly stored, the IO overhead and the IO delay are reduced, the storage performance is improved, and meanwhile, the IO delay of the IO is reduced, so that the IO performance of the computer device is improved. If at least two back-end devices are not in the same system, calling a second storage device of each back-end device; and according to the IO request, issuing the task in the IO request to the second storage device corresponding to each back-end device. The memory zero copy among the back-end devices under different systems is realized, the second storage device of the back-end device is directly called by the system on chip to carry out IO issuing, the IO unloading among the storage devices is achieved, the IO is completely unloaded to the system on chip, the participation of the host end of the computer device is reduced, the CPU overhead of the host end IO of the computer device is reduced, and the storage performance is improved.
In one embodiment of the present application, as shown in fig. 4, the "issuing, according to the IO request, the task in the IO request to the second storage device corresponding to each back-end device" in step 305 may include the following steps:
401, determining a first target back-end device from back-end devices according to the IO request, and determining a second storage device corresponding to the first target back-end device.
Specifically, under the condition that at least two back-end devices are not in the same system, the system on a chip reads the IO request, determines a first target back-end device from the back-end devices according to the IO request and labeling information of the back-end devices, and determines a second storage device corresponding to the first target back-end device.
And 402, acquiring target data in a second storage device corresponding to the first target back-end device.
Specifically, the system on chip acquires target data in a second storage device corresponding to the first target back-end device according to the IO request.
403, determining a second target back-end device corresponding to the target data and a second storage device corresponding to the second target back-end device, and transmitting the target data to the second storage device corresponding to the second target back-end device.
Specifically, after determining the first target back-end device, the system on a chip may determine, according to the labeling information of each back-end device, a second target back-end device from the back-end devices, and determine a second storage device corresponding to the second target back-end device. And then, the system on chip transmits the target data acquired from the second storage device corresponding to the first target back-end device to the second storage device corresponding to the second target back-end device, so that the IO request is completed.
In the embodiment of the application, the system on a chip determines a first target back-end device from back-end devices according to the IO request, and determines a second storage device corresponding to the first target back-end device; acquiring target data in second storage equipment corresponding to the first target back-end equipment; determining a second target back-end device corresponding to the target data and a second storage device corresponding to the second target back-end device, and transmitting the target data to the second storage device corresponding to the second target back-end device. Therefore, zero copy of the memory among the back-end devices under different systems is realized, the second storage device of the back-end device is directly called by the system on chip to carry out IO issuing, IO unloading among the storage devices is achieved, IO is completely unloaded to the system on chip, participation of a host end of the computer device is reduced, CPU overhead of the host end IO of the computer device is reduced, and storage performance is improved.
In one embodiment of the present application, if the IO request is sent by the back-end device and the back-end device is connected to the system on chip network, as shown in fig. 5, the "completing the IO request based on the memory mapped to the system on chip" in 103 includes:
501, obtaining first data mapped in a memory of a system-on-chip.
Specifically, the backend device sends IO requests to the system-on-chip based on network communications with the system-on-chip. After receiving an IO request sent by the back-end device, the system-on-chip acquires first data mapped in a memory of the system-on-chip based on the IO request.
And 502, transmitting first data to the back-end device based on network communication with the back-end device.
Specifically, the system-on-chip transmits the acquired first data to the backend device based on network communication with the backend device.
In the embodiment of the application, a system on chip acquires first data mapped in a memory of the system on chip; the first data is sent to the backend device based on network communication with the backend device. Therefore, the back-end equipment can access the memory mapped on the system on chip based on network communication, and directly issue IO tasks, reduce memory copying, improve storage performance, unload the network and the storage, reduce the CPU utilization rate of the computer equipment, and improve the storage performance.
In order to better explain the bypass unloading method provided in the embodiment of the present application, as shown in fig. 6, the embodiment of the present application provides an overall flowchart of the bypass unloading method, which may include the following steps:
And 601, establishing a mapping relation between the computer equipment and the system-on-chip based on the large page memory registered in the computer equipment, and mapping the memory of the computer equipment to the system-on-chip.
And 602, acquiring attribute information of each back-end device, labeling each back-end device according to the attribute information, and determining labeling information.
603, based on the labeling information, uniformly managing the back-end equipment.
And 604, receiving an IO request sent by the computer equipment or the back-end equipment connected with the computer equipment. If the IO request is sent by the backend device, executing 605; if the IO request is sent by the back-end device and the back-end device is connected to the system-on-chip network, then 612 is performed.
605, determining whether at least two back-end devices corresponding to the IO request are in the same system, and if the at least two back-end devices are in the same system, executing step 606; if at least two backend devices are not in the same system, then step 608 is performed.
606, offloading the IO request to a first storage device in the back-end device.
607, based on the first storage device, the IO request is completed.
608, a second storage device of each back-end device is invoked.
And 609, determining a first target back-end device from the back-end devices according to the IO request, and determining a second storage device corresponding to the first target back-end device.
And 610, acquiring target data in a second storage device corresponding to the first target back-end device.
611, determining a second target back-end device corresponding to the target data and a second storage device corresponding to the second target back-end device, and transmitting the target data to the second storage device corresponding to the second target back-end device.
And 612, acquiring first data mapped in the memory of the system-on-chip.
613, transmitting first data to the back-end device based on network communication with the back-end device.
In one embodiment of the present application, as shown in fig. 7, which is an internal structure diagram of a computer device, as can be seen from fig. 7, the computer device includes a system on chip, the computer device performs large-page memory registration, and then the system on chip establishes a mapping relationship between the computer device and the system on chip based on the large-page memory registered in the computer device, and maps the memory of the computer device to the system on chip. And a storage performance development tool (SPDK, storage performance development kit) runs in the system on chip, and is connected with the back-end equipment of each computer equipment through an equipment layer bdev in the storage performance development tool so as to realize unified management of the back-end equipment. The system on chip maps the back-end equipment to the host end of the computer equipment through the virtio-blk in the storage performance development tool, shields the perception of the host end of the computer equipment to the back-end equipment, enables the host end of the computer equipment to see the back-end equipment of the same type, directly unloads all protocol types of the back-end equipment to the system on chip, reduces the intervention of a CPU (Central processing Unit) of the host end, and improves the CPU utilization rate.
It should be understood that, although the steps in the flowcharts of fig. 1-6 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in FIGS. 1-6 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
Accordingly, referring to fig. 8, an embodiment of the present invention provides a bypass unloading device 800, where the bypass unloading device 800 is applied to a system on a chip in a computer device; the bypass unloader 800 includes:
the mapping module 810 is configured to map a memory of the computer device to a system on a chip.
And the receiving module 820 is configured to receive an IO request sent by the computer device or a backend device connected to the computer device.
A completion module 830, configured to complete the IO request based on the memory mapped to the system on chip.
In one embodiment of the present application, the mapping module 810 is specifically configured to establish a mapping relationship between the computer device and the system on chip based on a large page of memory registered in the computer device, and map the memory of the computer device to the system on chip.
In one embodiment of the present application, as shown in fig. 9, the bypass unloader 800 further includes:
the obtaining module 840 obtains attribute information of each back-end device, marks each back-end device according to the attribute information, and determines marking information;
and the management module 850 is configured to perform unified management on the backend device based on the labeling information.
In one embodiment of the present application, if the IO request is sent by a backend device, the completion module 830 is specifically configured to determine whether at least two backend devices corresponding to the IO request are in the same system; if at least two back-end devices are in the same system, unloading the IO request to a first storage device in the back-end devices; based on the first storage device, the IO request is completed.
In one embodiment of the present application, the completing module 830 is further configured to invoke the second storage device of each back-end device if at least two back-end devices are not in the same system; and according to the IO request, issuing the task in the IO request to the second storage device corresponding to each back-end device.
In one embodiment of the present application, the completion module 830 is specifically configured to determine, according to an IO request, a first target backend device from among backend devices, and determine a second storage device corresponding to the first target backend device; acquiring target data in second storage equipment corresponding to the first target back-end equipment; determining a second target back-end device corresponding to the target data and a second storage device corresponding to the second target back-end device, and transmitting the target data to the second storage device corresponding to the second target back-end device.
In one embodiment of the present application, if the IO request is sent by a back-end device and the back-end device is connected to the system on chip through a network, the completion module 830 is specifically configured to obtain the first data mapped in the memory of the system on chip; the first data is sent to the backend device based on network communication with the backend device.
In one embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 10. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a bypass offload method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 11. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing bypass offload data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a bypass offload method.
It will be appreciated by those skilled in the art that the structures shown in fig. 10 and 11 are block diagrams of only some of the structures associated with the present application and are not intended to limit the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment of the present application, a computer device is provided, the computer device comprising a system on a chip, the system on a chip comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: mapping the memory of the computer device to a system on chip; receiving an IO request sent by computer equipment or back-end equipment connected with the computer equipment; the IO request is completed based on the memory mapped to the system on chip.
In one embodiment of the present application, the processor when executing the computer program further performs the steps of: and based on the large page memory registered in the computer equipment, establishing a mapping relation between the computer equipment and the system on chip, and mapping the memory of the computer equipment to the system on chip.
In one embodiment of the present application, before receiving the IO request sent by the backend device, the following steps are further implemented when the processor executes the computer program: the method further comprises the steps of: acquiring attribute information of each back-end device, marking each back-end device according to the attribute information, and determining marking information; and based on the labeling information, unified management is carried out on the back-end equipment.
In one embodiment of the present application, if the IO request is sent by the backend device, the processor further performs the following steps when executing the computer program: judging whether at least two back-end devices corresponding to the IO request are in the same system or not; if at least two back-end devices are in the same system, unloading the IO request to a first storage device in the back-end devices; based on the first storage device, the IO request is completed.
In one embodiment of the present application, the processor when executing the computer program further performs the steps of: if at least two back-end devices are not in the same system, calling a second storage device of each back-end device; and according to the IO request, issuing the task in the IO request to the second storage device corresponding to each back-end device.
In one embodiment of the present application, the processor when executing the computer program further performs the steps of: according to the IO request, determining first target back-end equipment from the back-end equipment, and determining second storage equipment corresponding to the first target back-end equipment; acquiring target data in second storage equipment corresponding to the first target back-end equipment; determining a second target back-end device corresponding to the target data and a second storage device corresponding to the second target back-end device, and transmitting the target data to the second storage device corresponding to the second target back-end device.
In one embodiment of the present application, if the IO request is sent by the back-end device and the back-end device is connected to the system on chip network, the processor further implements the following steps when executing the computer program: acquiring first data mapped in a memory of a system on chip; the first data is sent to the backend device based on network communication with the backend device.
In one embodiment of the present application, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: mapping the memory of the computer device to a system on chip; receiving an IO request sent by computer equipment or back-end equipment connected with the computer equipment; the IO request is completed based on the memory mapped to the system on chip.
In one embodiment of the present application, the computer program when executed by the processor further performs the steps of: and based on the large page memory registered in the computer equipment, establishing a mapping relation between the computer equipment and the system on chip, and mapping the memory of the computer equipment to the system on chip.
In one embodiment of the present application, the following steps are further implemented when the computer program is executed by the processor before receiving the IO request sent by the backend device: the method further comprises the steps of: acquiring attribute information of each back-end device, marking each back-end device according to the attribute information, and determining marking information; and based on the labeling information, unified management is carried out on the back-end equipment.
In one embodiment of the present application, if the IO request is sent by the backend device, the computer program when executed by the processor further implements the following steps: judging whether at least two back-end devices corresponding to the IO request are in the same system or not; if at least two back-end devices are in the same system, unloading the IO request to a first storage device in the back-end devices; based on the first storage device, the IO request is completed.
In one embodiment of the present application, the computer program when executed by the processor further performs the steps of: if at least two back-end devices are not in the same system, calling a second storage device of each back-end device; and according to the IO request, issuing the task in the IO request to the second storage device corresponding to each back-end device.
In one embodiment of the present application, the computer program when executed by the processor further performs the steps of: according to the IO request, determining first target back-end equipment from the back-end equipment, and determining second storage equipment corresponding to the first target back-end equipment; acquiring target data in second storage equipment corresponding to the first target back-end equipment; determining a second target back-end device corresponding to the target data and a second storage device corresponding to the second target back-end device, and transmitting the target data to the second storage device corresponding to the second target back-end device.
In one embodiment of the present application, if the IO request is sent by the back-end device and the back-end device is connected to the system-on-chip network, the computer program when executed by the processor further implements the following steps: acquiring first data mapped in a memory of a system on chip; the first data is sent to the backend device based on network communication with the backend device.
It will be appreciated by those skilled in the art that implementing all or part of the above-described embodiment method may be implemented by a computer program to instruct related hardware, where the program may be stored in a computer readable storage medium, and the program may include the above-described embodiment method when executed. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations are within the scope of the invention as defined by the appended claims.

Claims (7)

1. A bypass offload method, characterized by being applied to a system-on-chip in a computer device; the method comprises the following steps:
mapping memory of the computer device to the system-on-chip;
Receiving an IO request sent by the computer equipment or back-end equipment connected with the computer equipment;
completing the IO request based on the memory mapped to the system on chip;
the mapping the memory of the computer device to the system on chip comprises:
based on a large page memory registered in the computer equipment, establishing a mapping relation between the computer equipment and the system on chip, and mapping the memory of the computer equipment to the system on chip;
if the IO request is sent by the backend device, the completing the IO request based on the memory mapped to the system on chip includes:
judging whether at least two back-end devices corresponding to the IO request are in the same system or not;
if at least two back-end devices are in the same system, offloading the IO request to a first storage device in the back-end devices;
completing the IO request based on the first storage device;
if at least two of the back-end devices are not in the same system, calling a second storage device of each back-end device;
and according to the IO request, issuing the task in the IO request to a second storage device corresponding to each back-end device.
2. The method of claim 1, wherein prior to receiving the IO request sent by the backend device, the method further comprises:
acquiring attribute information of each back-end device, marking each back-end device according to the attribute information, and determining marking information;
and based on the labeling information, unified management is carried out on the back-end equipment.
3. The method of claim 1, wherein the issuing, according to the IO request, the task in the IO request to the second storage device corresponding to each of the backend devices includes:
according to the IO request, determining a first target back-end device from the back-end devices, and determining a second storage device corresponding to the first target back-end device;
acquiring target data in second storage equipment corresponding to the first target back-end equipment;
determining a second target back-end device corresponding to the target data and a second storage device corresponding to the second target back-end device, and transmitting the target data to the second storage device corresponding to the second target back-end device.
4. The method of claim 1, wherein if the IO request is sent by the back-end device and the back-end device is connected to the system-on-chip network, the completing the IO request based on the memory mapped to the system-on-chip comprises:
Acquiring first data mapped in a memory of the system-on-chip;
the first data is sent to the backend device based on network communication with the backend device.
5. A bypass offload device, characterized by being applied to a system-on-chip in a computer device; the device comprises:
a mapping module, configured to map a memory of the computer device to the system-on-chip;
the receiving module is used for receiving the IO request sent by the computer equipment or the back-end equipment connected with the computer equipment;
a completion module, configured to complete the IO request based on the memory mapped to the system on chip;
the mapping module is specifically configured to establish a mapping relationship between the computer device and the system on chip based on a large page memory registered in the computer device, and map the memory of the computer device to the system on chip;
if the IO request is sent by the backend device, the completion module is specifically configured to determine whether at least two backend devices corresponding to the IO request are in the same system; if at least two back-end devices are in the same system, unloading the IO request to a first storage device in the back-end devices; based on the first storage device, completing the IO request;
The completion module is further configured to invoke a second storage device of each back-end device when at least two back-end devices are not in the same system; and according to the IO request, issuing the task in the IO request to the second storage device corresponding to each back-end device.
6. A computer device, the computer device comprising a system-on-chip, the system-on-chip comprising: a memory and a processor communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the bypass offload method of any of claims 1-4.
7. A computer readable storage medium storing computer instructions for causing the computer to perform the bypass offload method of any one of claims 1-4.
CN202111266350.9A 2021-10-28 2021-10-28 Bypass unloading method, device, computer equipment and storage medium Active CN114020353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111266350.9A CN114020353B (en) 2021-10-28 2021-10-28 Bypass unloading method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111266350.9A CN114020353B (en) 2021-10-28 2021-10-28 Bypass unloading method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114020353A CN114020353A (en) 2022-02-08
CN114020353B true CN114020353B (en) 2024-02-13

Family

ID=80058363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111266350.9A Active CN114020353B (en) 2021-10-28 2021-10-28 Bypass unloading method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114020353B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030095083A (en) * 2002-06-11 2003-12-18 삼성전자주식회사 System on chip for reducing the load of system bus and system thereof
CN103645996A (en) * 2013-12-09 2014-03-19 龙芯中科技术有限公司 Memory copying method and device as well as SOC (system on chip)
CN108363670A (en) * 2017-01-26 2018-08-03 华为技术有限公司 A kind of method, apparatus of data transmission, equipment and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124951B (en) * 2018-10-31 2023-09-15 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing data access

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030095083A (en) * 2002-06-11 2003-12-18 삼성전자주식회사 System on chip for reducing the load of system bus and system thereof
CN103645996A (en) * 2013-12-09 2014-03-19 龙芯中科技术有限公司 Memory copying method and device as well as SOC (system on chip)
CN108363670A (en) * 2017-01-26 2018-08-03 华为技术有限公司 A kind of method, apparatus of data transmission, equipment and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TCP/IP卸载引擎在SoC系统中的应用;李刚;;电脑知识与技术(学术交流)(07);全文 *
面向图计算应用的处理器访存通路优化设计与实现;张旭;常轶松;张科;陈明宇;;国防科技大学学报(02);全文 *

Also Published As

Publication number Publication date
CN114020353A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
US11159411B2 (en) Distributed testing service
US20220107857A1 (en) System and method for offloading application functions to a device
US7366814B2 (en) Heterogeneous multiprocessor system and OS configuration method thereof
US9390036B2 (en) Processing data packets from a receive queue in a remote direct memory access device
CN113849312A (en) Data processing task allocation method and device, electronic equipment and storage medium
CN109074281A (en) The distribution method and device of graphic processor task
WO2021258512A1 (en) Data aggregation processing apparatus and method, and storage medium
US20160292009A1 (en) Execution offloading through syscall trap interface
CN104657115B (en) Cluster file system client-side multi-core concurrence and load implementation method
CN110401681B (en) Method for data transmission and data reception and electronic equipment
CN114020353B (en) Bypass unloading method, device, computer equipment and storage medium
CN110442543B (en) Communication device and communication method
CN110659143B (en) Communication method and device between containers and electronic equipment
CN110401939A (en) A kind of low-power consumption bluetooth controller link layer device
CN116450554A (en) Interrupt processing method, root complex device and electronic device
CN102656564B (en) Reduce the expense in application process
CN112148453A (en) Computing chip for privacy computation and network computing system
CN113535378A (en) Resource allocation method, storage medium and terminal equipment
CN110297668A (en) System, mobile terminal, control and the method for supporting terminal control mainframe memory
US11941433B2 (en) Computing apparatus and data processing method for offloading data processing of data processing task from at least one general purpose processor
US10936197B2 (en) Performing memory copy operations by a processor by employing a compression hardware device
CN108762666B (en) Access method, system, medium and device of storage system
CN116841948A (en) Method and device for data transmission between Central Processing Units (CPUs) and electronic equipment
CN117076381A (en) Data transmission system, method and device
CN116258182A (en) Interactive module, system and method

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