Method, device and system for quickly sending data writing preparation completion message

By creating a data page information table in the storage device, and directly obtaining available data page information, it solves the problem of delay in writing data preparation and completing messages caused by the cooperation of multiple modules in the storage array, and improves the efficiency of data storage.

CN111642137BActive Publication Date: 2024-12-20HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201880014873.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-14
Publication Date
2024-12-20
Estimated Expiration
2038-12-14

AI Technical Summary

Technical Problem

In the storage area network, when the server sends a write data command to the storage array, the storage array requires multiple modules to cooperate with each other to determine the available cache space, resulting in an excessive delay in writing data preparation completion messages, affecting data storage efficiency.

Method used

By creating a data page information table in the storage device, recording the data page information idle in the memory, the network interface card directly obtains available data page information from the memory when receiving a request for writing data, completes the preparation for writing data, and sends it to the sender Write response messages that are ready for data avoids the cooperation of multiple modules.

Benefits of technology

The time from receiving a write data request to sending a write data ready to complete message is shortened, the efficiency of processing a write data request is improved, and the service processing delay is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111642137B_ABST
    Figure CN111642137B_ABST
Patent Text Reader

Abstract

A method, storage device and system for processing write data requests. The method includes receiving a write data request, which is a request to write data to a storage device; allocating a data page for caching the data to be written by the write data request according to the information of the data page recorded in a data page information table; wherein the data page information table is an information table in a memory in the storage device, and the data page is an idle data page in the memory; and sending a response message indicating that the write data is ready to be sent to the sender of the write data request. By directly obtaining the information of the data page that can be used for caching from the memory and sending a response message indicating that the write data is ready to be sent, the time from receiving the write data request to sending the write data request response message is shortened, thereby improving the efficiency of processing the write data request service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a method, device and system for quickly sending a message that writing data is ready to be completed. Background Art

[0002] A storage area network (SAN) is a high-speed, easily scalable, and widely used data storage network that is independent of a computer local area network (LAN). SAN connects servers and storage devices together, and can provide a dedicated communication channel for any server and any storage device on it. SAN separates storage devices from servers, enabling storage resource sharing at the server level.

[0003] SAN mainly includes servers, network devices, and storage devices. According to different network types, it can be divided into Internet Protocol Storage Area Network (IP-SAN) and Fiber Channel Storage Area Network (FC-SAN). IP-SAN uses IP channels to connect servers and storage devices. FC-SAN uses fiber channels to connect servers and storage devices. FC-SAN requires the use of some dedicated hardware as a data channel to connect servers and storage arrays. These hardware include Fiber Channel-host bus adapter (FC-HBA) cards, FC switches, fiber optic cables, optical modules, etc.

[0004] Typically, servers in a SAN use the SCSI protocol to send data, and transmit it to the storage array through FC or IP channels. Data processing can be "block level". When a server needs to store data, it sends a SCSI protocol write data command to the storage array; when a server needs to read data, it sends a SCSI protocol read data command to the storage array.

[0005] For example, when a server issues a SCSI protocol write data command, the storage array allocates pages for storing data and then sends a response message to the server indicating that the data is ready to be written. This requires the cooperation of multiple modules within the storage array to complete the process. Multiple modules are involved in the processing, resulting in a large delay in the storage array returning the response message indicating that the data is ready to be written to the server, which affects the efficiency of data storage. Summary of the invention

[0006] Embodiments of the present application provide a method, device, and system for quickly sending a write data preparation completion message to reduce the delay in sending the write data preparation completion message and improve the efficiency of business processing.

[0007] In a first aspect, an embodiment of the present application provides a storage device, including a processor, a network interface card, and a memory, wherein:

[0008] The processor is used to create a data page information table in the memory by running a driver of the network interface card, wherein the data page information table is used to record information of free data pages in the memory;

[0009] The network interface card is used to receive a write data request, allocate the data page recorded in the data page information table for caching the data to be stored in the write data request according to the information of the data page recorded in the data page information table, and send a response message indicating that the write data is ready to be stored to the sender of the write data request; wherein the write data request is a request to write data to the storage device.

[0010] The storage device provided by the embodiment of the present application, when receiving a write data request, its network interface card obtains information of an idle data page from the memory, and the idle data page can be used to cache the data to be written by the write data request. In this way, the network interface card can directly obtain information of available data pages from the memory, complete the preparation of writing data, and send a response message of the completion of writing data preparation to the sender of the write data request. Since multiple modules in the storage device do not need to cooperate with each other to determine the available cache space, the time from the network interface card receiving the write data request to the network interface card sending the write data request response message is shortened, and the efficiency of processing the write data request business is improved.

[0011] The data page recorded in the data page information table allocated by the network interface card for caching the data to be stored in the write data request is an idle data page allocated by the network interface card for caching the data to be stored in the write data request.

[0012] Optionally, the storage device is a storage array, and the processor is a central processing unit (central

[0013] The processor is a processor (processing unit, CPU), the memory is a main memory, such as a random access memory (Random Access Memory, RAM), and the network interface card can be an FC-HBA card or an Ethernet card. In the embodiment of the present application, the FC-HBA card is also called a fiber channel interface card. The network interface card and the processor can be connected via a peripheral component interconnect Express (Peripheral Component Interconnect Express, PCIe) link. The network interface card and the memory can also be connected via a PCIe link.

[0014] Optionally, the processor creates the data page information table in the memory by running a driver program of the network interface card during initialization of the network interface card.

[0015] Optionally, the data page information table may be created in a memory managed by an operating system (OS) of the storage device, or may be created in a base address register (BAR) address space of the network interface card in the memory.

[0016] Optionally, the data page information table is an information table that can be directly accessed by the network interface card, and the data page information table is also an information table that can be directly accessed by the processor by running a driver program of the network interface card.

[0017] In one possible implementation, the memory includes a cache, which is used to temporarily store data written to the storage device or to temporarily store data read from the storage device, and the information of the free data pages recorded in the page information table is the information of the free data pages in the cache.

[0018] In a possible implementation, the processor is further configured to apply for free data pages from the cache by running a driver of the network interface card, and configure information of the applied free data pages into the data page information table.

[0019] Optionally, the processor may determine the number of idle data pages that can be configured in the data page information table according to a preset ratio by running a driver of the network interface card, or may determine the number of dynamic idle data pages according to a preset algorithm.

[0020] Optionally, the driver of the network interface card is a program in the operating system of the storage device, and the processor applies for free data pages from the cache by running the driver of the network interface card in the operating system of the storage device, and configures the information of the applied free data pages into the data page information table.

[0021] In a possible implementation, the data page information table includes multiple entries, each of which is used to record information about an idle data page, that is, one entry in the data page information table records information about an idle data page, and each entry records information about different idle data pages.

[0022] In a possible implementation manner, the information of the idle data page includes physical address information and length information of the idle data page.

[0023] In a possible implementation, the data page information table is a page swap queue created in the memory, and the page swap queue includes a plurality of table entries in the form of a queue.

[0024] Optionally, the data page information table may also be a linked list or an array created in the memory.

[0025] In a possible implementation, the network interface card includes a controller and a network port; wherein,

[0026] The network port is used to receive the write data request;

[0027] The controller is used to allocate the data page recorded in the data page information table for caching the data to be stored in the write data request according to the information of the data page recorded in the data page information table, and send a response message indicating that the write data is ready to be stored to the sender of the write data request.

[0028] The processor is also used to configure at least one of the following information into the controller by running the driver of the network interface card according to the command format of the controller: the starting address of the page exchange queue, the number of table entries, and the format of the table entries.

[0029] Optionally, the processor is used to configure the idle data pages requested from the cache into the page exchange queue according to a command format preset by the controller by running a driver of the network interface card.

[0030] In a possible implementation, the controller is further used to migrate the data to be stored in the received write data request to the cache space corresponding to the allocated data page; the processor is further used to exchange the idle data pages in the memory, such as the idle data pages in the cache, into the data page information table by running the driver of the network interface card. Exchanging the idle data pages in the cache into the data page information table can ensure that there are enough idle data pages in the data page information table for allocation, and can avoid the problem of business interruption caused by insufficient idle data pages.

[0031] In a possible implementation, the processor is further configured to convert a virtual address of the data page information table in the memory into a physical address by running a driver of the network interface card;

[0032] The network interface card accesses the data page information table through the physical address of the data page information table.

[0033] In a second aspect, an embodiment of the present application provides a network interface card, including a controller and a network port; wherein:

[0034] The network port is used to receive a write data request through a network, wherein the write data request is a request to write data to a storage device, and the storage device receives the request to write data to the storage device and / or the data to be stored through the network interface card;

[0035] The controller is used to allocate data pages from the data pages recorded in the data page information table for caching the data to be stored in the write data request, and send a response message indicating that the write data is ready to be stored to the sender of the write data request; wherein the data page information table is an information table in the memory of the storage device, and the data page is an idle data page in the memory.

[0036] The network interface card provided by the embodiment of the present application, when the network port receives a write data request, the controller obtains the information of the idle data page from the data page information table in the memory of the storage device, and the idle data page can be used to cache the data to be written by the write data request. In this way, the controller in the network interface card can directly obtain the information of the available data page from the memory, complete the preparation of writing data, and send a response message of the completion of writing data preparation to the sender of the write data request. Since multiple modules in the storage device do not need to cooperate with each other to determine the available cache space, the time from the network interface card receiving the write data request to the time it sends the write data request response message is shortened, and the efficiency of processing the write data request business is improved.

[0037] The controller allocates the data page recorded in the data page information table for caching the data to be stored in the write data request, which is an idle data page allocated by the controller for caching the data to be stored in the write data request. Optionally, the network interface card is an FC-HBA card or an Ethernet card.

[0038] In one possible implementation, the memory includes a cache, which is used to temporarily store data written to the storage device or to temporarily store data read from the storage device, and the information of the free data pages recorded in the page information table is the information of the free data pages in the cache.

[0039] In a possible implementation, the controller is further used to receive configuration information of the data page information table, and access the data page information table according to the configuration information of the data page information table; wherein the configuration information includes the starting address, number of table entries and format of the data page information table.

[0040] In a possible implementation, the network port is further used to receive data to be written by the write data request through a network;

[0041] The controller is further used to cache the data and migrate the data to the memory corresponding to the allocated data page.

[0042] In a third aspect, an embodiment of the present application provides a method for processing a write data request, including:

[0043] receiving a write data request, wherein the write data request is a request to write data to a storage device;

[0044] Allocate data pages for caching data to be written by the write data request according to the information of the data pages recorded in the data page information table; wherein the data page information table is an information table in the memory of the storage device, and the data pages are free data pages in the memory;

[0045] Send a response message indicating that writing data is ready to be completed to the sender of the writing data request.

[0046] The method for processing a write data request provided by an embodiment of the present application obtains information of an idle data page from the memory when a write data request is received, and the idle data page can be used to cache the data to be written by the write data request. In this way, when a write data request is received, information of available data pages can be directly obtained from the memory, preparation for writing data can be completed, and a response message of completion of writing data preparation can be sent to the sender of the write data request. The time from receiving a write data request to sending a write data request response message is shortened, and the efficiency of processing the write data request service is improved.

[0047] The allocated data page is used to cache the data to be stored in the write data request, and is an idle data page allocated to cache the data to be stored in the write data request.

[0048] Optionally, the data page information table may be created in a memory managed by an operating system, or may be created in other non-cache spaces of the memory.

[0049] In one possible implementation, the memory includes a cache, which is used to temporarily store data written to the storage device or to temporarily store data read from the storage device, and the information of the free data pages recorded in the page information table is the information of the free data pages in the cache.

[0050] In a possible implementation, the method further includes:

[0051] Apply for an idle data page from the cache, and configure information of the applied idle data page into the data page information table.

[0052] In a possible implementation, the data page information table includes multiple table entries, each of which is used to record information of an idle data page.

[0053] In a possible implementation, the information of the data page includes physical address information and length information of the idle data page.

[0054] In a possible implementation, the page information table is a page swap queue created in the memory, and the page swap queue includes a plurality of table entries in the form of a queue.

[0055] In a possible implementation, the method further includes:

[0056] Migrating the data to be written by the received write data request to the memory corresponding to the allocated data page;

[0057] The idle data pages in the memory, such as the idle data pages in the cache, are exchanged into the data page information table.

[0058] Optionally, the method further includes:

[0059] According to a preset command format, at least one of the following information is configured into the controller: the starting address of the data page information table, the number of table entries, and the format of the table entries.

[0060] In a fourth aspect, an embodiment of the present application provides an information processing system, including a server and a storage device, wherein the server is used to write data to the storage device or read data from the storage device; the storage device includes a processor, a network interface card, and a memory, wherein:

[0061] The processor is used to create a data page information table in the memory by running a driver of the network interface card, wherein the data page information table is used to record information of free data pages in the memory;

[0062] The network interface card is used to receive a write data request sent by the server, allocate the data page recorded in the data page information table for caching the data to be stored in the write data request according to the information of the data page recorded in the data page information table, and send a response message to the server indicating that the write data is ready.

[0063] In the above information processing system, when the network interface card receives a write data request sent by the server, it obtains information about an idle data page from the memory, and the idle data page can be used to cache the data to be written by the write data request. In this way, the network interface card can directly obtain information about available data pages from the memory, complete the preparation for writing data, and send a response message to the server indicating that the preparation for writing data is complete. Since multiple modules in the storage device do not need to cooperate with each other to determine the available cache space, the time from when the network interface card receives the write data request to when the network interface card sends the write data request response message is shortened, thereby improving the efficiency of processing the write data request service.

[0064] The data page recorded in the data page information table allocated by the network interface card for caching the data to be stored in the write data request is an idle data page allocated by the network interface card for caching the data to be stored in the write data request.

[0065] In one possible implementation, the memory includes a cache, which is used to temporarily store data written to the storage device or to temporarily store data read from the storage device, and the information of the free data pages recorded in the page information table is the information of the free data pages in the cache.

[0066] In a possible implementation, the processor is further configured to apply for free data pages from the cache by running a driver of the network interface card, and configure information of the applied free data pages into the data page information table.

[0067] In a possible implementation, the data page information table includes multiple table entries, each of which is used to record information of an idle data page.

[0068] In a possible implementation manner, the information of the idle data page includes physical address information and length information of the idle data page.

[0069] In a possible implementation, the data page information table is a page swap queue created in the memory, and the page swap queue includes a plurality of table entries in the form of a queue.

[0070] In a possible implementation, the network interface card includes a controller and a network port; wherein,

[0071] The network port is used to receive the write data request;

[0072] The controller is used to allocate the data page recorded in the data page information table for caching the data to be stored in the write data request according to the information of the data page recorded in the data page information table, and send a response message indicating that the write data is ready to be stored to the sender of the write data request.

[0073] In a possible implementation, the controller is further configured to migrate the data to be stored in the received write data request to a memory corresponding to the allocated data page;

[0074] The processor is further configured to exchange idle data pages in the memory, such as idle data pages in the cache, into the data page information table by running a driver program of the network interface card.

[0075] In a possible implementation, the processor is further configured to convert a virtual address of the data page information table in the memory into a physical address by running a driver of the network interface card;

[0076] The network interface card accesses the data page information table through the physical address of the data page information table.

[0077] In a fifth aspect, the present application provides a computer storage medium for storing computer software instructions for controlling a chip, which includes a program designed to execute the third aspect.

[0078] In a sixth aspect, the present application provides a computer program. When a control chip in a computer device or a server runs the computer program, the control chip performs the function of the network interface card described in the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for describing the embodiments are briefly introduced below.

[0080] Figure 1A A schematic diagram of the structure of an implementation method of an FC-SAN system composed of a server and a storage array;

[0081] Figure 1B for Figure 1A A schematic diagram of the specific structure of the storage array;

[0082] Figure 1C for Figure 1A Schematic diagram of the specific structure of the server;

[0083] Figure 2 A flowchart showing the implementation method of storing data in a storage array by a server;

[0084] Figure 3 A schematic diagram of a structure of an implementation method of a storage array 300 provided in an embodiment of the present application;

[0085] Figure 4 A schematic diagram of a method flow for creating a page swap queue process provided in an embodiment of the present application;

[0086] Figure 5 It is a flowchart of a processing method after the storage array 300 receives a write data request sent by the server 400;

[0087] Figure 6 A schematic flow chart of a method for receiving and storing data by a storage array 300 provided in an embodiment of the present application;

[0088] Figure 7 A schematic diagram of the structure of a storage device 700 provided in an embodiment of the present application;

[0089] Figure 8 A schematic diagram of the structure of a network interface card 800 provided in an embodiment of the present application;

[0090] Fig. 9 A flowchart of a method for processing a write data request provided in an embodiment of the present application;

[0091] Fig.10 A schematic diagram of the structure of an information processing system 100 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0092] The embodiments of the present invention are described below in conjunction with the accompanying drawings.

[0093] A storage array is an array of multiple hard disks that are used as a large resource pool. It stores data in different hard disks in a striping manner. When accessing data, the related hard disks in the array work together, which not only ensures reliability, but also greatly reduces data access time and has better space utilization.

[0094] Figure 1A The schematic diagram of the structure of an implementation of the FC-SAN system is shown in Figure 1. As shown in Figure 1, the FC-SAN system includes a server, a storage array, and an optical module switch. The FC-HBA card 1 in the server and the FC-HBA card 2 in the storage array are respectively connected to the optical module switch (also called FC switch), and communication is achieved through the FC switch.

[0095] Figure 1A It is just a simple structural diagram. In a specific implementation, the server may also include a CPU and a main memory (e.g., random access memory RAM, etc.). The storage array may also include one or more of a disk controller, a hard disk drive (HDD), and a solid-state disk (SSD). It is understood that in a specific implementation, other connection devices may also be included between the storage array and the server. In one embodiment, an optical module switch is not included between the storage array and the server, that is, the storage array and the server are directly connected and communicated.

[0096] Figure 1A The server in the system needs to read data or store data during operation; the stored data or read data includes but is not limited to writing data to or reading data from the storage array. Accordingly, the storage array receives the write data request of the server through the network and writes the data to be stored into the disk of the storage array; or transmits the data in the storage array disk to the server according to the read data request of the server. Figure 1A The optical module switch is mainly used for forwarding messages or data between the server and the storage array.

[0097] Figure 1B yes Figure 1A A specific structural diagram of the storage array in FIG. Figure 1B As shown, the storage array includes a physical layer and a software layer. The physical layer includes but is not limited to a CPU, an FC-HBA card 2, a memory, and a disk. The software layer includes but is not limited to a driver module and a cache module. The driver module is mainly used for driving and initializing the FC-HBA card 2, etc.; the cache module is used to manage cache resources in the memory. It can be understood that the driver module and the cache module are software modules in the operating system of the storage array, and are implemented by executing related programs by the CPU of the storage array.

[0098] Figure 1C yes Figure 1A A specific structural diagram of the server in FIG. Figure 1CAs shown, the server includes a software layer and a physical layer. The physical layer includes but is not limited to a CPU and an FC-HBA card 1, and the software layer includes but is not limited to an application module. The application module may be an application program in the server operating system, which completes and implements certain functions, and is usually implemented by executing related programs by the server's CPU. When the application needs to write data to or read data from a storage array through a network, the CPU in the server sends related commands or data to the FC-HBA card 1, and the FC-HBA card 1 receives related data or commands.

[0099] Taking the application as video software as an example, when the video software needs to store a certain video, it needs to write the relevant video data into the storage array. The server sends the write data request and the video data to be stored to the storage array through the optical module switch, and the storage array receives the write data request and the video data forwarded by the optical module switch through the network, and stores the video data in the disk of the storage array.

[0100] Below Figure 1A-Figure 1C Taking the system shown in FIG. 1 as an example, the process of the server writing data to the storage array is described. Figure 2 As shown, the process of the server writing data to the storage array includes:

[0101] Step S101: When an application module in a server needs to store data, the server sends a command to write data to a storage array via FC-HBA card 1;

[0102] Step S102: the FC-HBA card 1 in the server sends the write data command to the storage array via the network;

[0103] Step S103: the FC-HBA card 2 in the storage array receives the write data command, obtains information of the data to be stored according to the write data command, and sends the information to the driver module of the storage array;

[0104] Step S104: the driver module applies for an idle data page from the cache module of the storage array according to the information of the data to be stored;

[0105] Step S105: the cache module allocates idle data pages for caching the data write command and storing data, and sends information such as addresses of the allocated idle data pages to the driver module;

[0106] Step S106: the driver module sends the address and other information of the received idle data page to the FC-HBA card 2;

[0107] Step S107: FC-HBA card 2 records the address information of the allocated data page, and sends a message indicating that data writing is ready to be completed to FC-HBA card 1 of the server;

[0108] Step S108: After receiving the message that data writing is ready through the FC-HBA card 1, the server sends the data to be stored to the storage array;

[0109] Step S109: the FC-HBA card 2 receives the data to be stored through the network, writes the data to be stored into the allocated data page through direct memory access (DMA) according to the recorded address information of the data page allocated for storing the data to be stored, and notifies the driver module that the data reception is completed;

[0110] Step S110: the driver module notifies the cache module, and the cache module stores the to-be-stored data into the disk according to the notification of the driver module.

[0111] Specifically, when FC-HBA card 2 completes receiving the data to be stored and writes the data to be stored into the allocated data page by means of DMA, an interrupt will be triggered to notify the driver module. The driver module notifies the cache module that data reception is complete based on the notification from FC-HBA card 2. The cache module sends a notification to the hard disk management module of the storage array based on the notification from the driver module, and the hard disk management module writes the data to be stored in the cache into the disk of the storage array. The cache module can also notify the data backup module to store the data to be stored in the cache in a storage device with a backup function, and the storage device with a backup function is usually a storage device that is geographically located in a different place from the storage array. Step S111: The cache module returns a write completion message, which is sent to the application module in the server through the driver module, FC-HBA card 2, and FC-HBA card 1.

[0112] Specifically, when the cache module confirms that the data to be stored in the cache space has been stored in the disk of the storage array or in the backup storage device, that is, the data to be stored has been stored in the permanent storage disk, the cache module will send a write completion message to the driver module, and the driver module will send the write completion message to the server through the FC-HBA card 2 to notify the application module in the server. In the above process, from step S102 to step S107, it is necessary for multiple components in the storage array (such as FC-HBA card 2, driver module and cache module) to cooperate with each other to return the message that the storage array is ready to write data to the server. This makes the storage array return the write data preparation completion message to the server with a long delay, usually reaching more than 20 microseconds. In addition, when the storage array cannot allocate pages for caching due to the large number of read and write requests that need to be processed, the storage array returns the error code to the server. The delay will also be long.

[0113] Embodiments of the present application provide a method, device, and system for quickly sending a write data preparation completion message to reduce the delay from when a storage array receives a write data command to when it returns a write data preparation completion message, thereby improving the efficiency of data storage.

[0114] Figure 3 FIG. 1 is a schematic diagram of a structure of a storage array 300 provided in an embodiment of the present application. Figure 3 As shown, the storage array 300 includes an FC-HBA card 301, a CPU 302, and a memory 303. The FC-HBA card 301 is connected to the CPU 302 via a PCIe link, the FC-HBA card 301 is connected to the memory 303 via a PCIe link, and the CPU and the memory communicate via PCIe or other means. In the storage array 300, the CPU 302 controls the storage array 300 by running an operating system 306. The memory 303 provides space for the operating system 306 to run and caches data to be stored or read in the storage array 300. The operating system 306 includes, but is not limited to, an FC driver 304 and a cache module 305. The FC driver 304 can communicate with the cache module 305 directly or indirectly. For example, the FC driver 304 can communicate with the cache module 305 through other modules.

[0115] FC-HBA card 301 includes but is not limited to FC chip 3011 and FC port 3012. FC chip 3011 is the core of FC-HBA card 301, which can be a FC protocol and data processing chip, and is mainly used to receive data to be stored sent by the server or send data that the server needs to read to the server. FC port 3012 is the port on FC-HBA card 301 that communicates with the server. FC-HBA card 301 can usually include 2 or 4 FC ports ( Figure 3 Taking 4 as an example), the FC port 3012 can be used to insert a fiber optic cable to provide a physical channel for input / output transmission, and the physical channel for input / output transmission includes but is not limited to a full-duplex input / output channel, etc.

[0116] The operating system 306 is the operating basis of the software running in the storage array 300 and is mainly used to manage the hardware resources in the storage array 300, such as the memory 303 and the bus, and to provide an operating platform for software modules such as the FC driver 304 and the cache module 305.

[0117] The FC driver 304 is mainly used to initialize the FC chip 3011 in the FC-HBA card 301, and control the FC-HBA card 301 to receive data that the server needs to store or send data that the server needs to read to the server.

[0118] The cache module 305 is mainly used to manage the data pages in the cache resource pool 3032 and write the data in the cache resource pool 3032 to the disk of the storage array 300 ( Figure 3 ), or caches the data in the storage array 300 disk in the cache resource pool 3032. Optionally, the cache module 305 may also include functions such as initializing the cache resource pool 3032 and executing a data hit algorithm.

[0119] The memory 303 mainly includes the memory 3031 managed by the operating system (OS) and the cache resource pool 3032. The memory 3031 managed by the OS is mainly used to support the operation of the operating system and the initialization of the hardware (including but not limited to the initialization of the FC-HBA card 301). The cache resource pool 3032 is mainly used for caching data that the server needs to store or read.

[0120] Below Figure 3 Take the structure shown as an example, combined with Figures 4 to 6 , the technical solution provided in the embodiments of the present application is described in detail.

[0121] Figure 4 A schematic diagram of a method flow for creating a page exchange queue process provided by an embodiment of the present application, such as Figure 4 As shown, the method includes:

[0122] S401: Run the FC driver 304 to initialize the FC chip 3011;

[0123] That is, after the storage array 300 is powered on, when the operating system 306 is started, the FC driver 304 is run to initialize the FC chip 3011 .

[0124] Specifically, the CPU 302 may initialize the FC chip 3011 by running a program related to the FC driver 304. For ease of description, the embodiment of the present application uses the FC driver 304 to implement a related method or complete a related function, which means that the CPU 302 implements a related method or completes a related function by running a program related to the FC driver 304.

[0125] S402: Run the FC driver 304 to create a page swap queue;

[0126] That is, the FC driver 304 applies for part of the memory managed by the operating system 306 , and creates a page swap queue according to the preset configuration requirements of the FC chip 3011 . The page swap queue can be directly accessed by the FC chip 3011 .

[0127] The page swap queue records the information of free data pages in the form of a queue, and may include multiple entries, each of which records the information of a free data page. For example, if there are 4 entries in the page swap queue, entry0 records the page information of page0 in cache resource pool 3032, entry1 records the page information of page1 in cache resource pool 3032, entry2 records the page information of page2 in cache resource pool 3032, and entry3 records the page information of page3 in cache resource pool 3032.

[0128] Optionally, the creation of the page swap queue in step S402 may be implemented during the process of the FC driver 304 initializing the FC chip 3011 .

[0129] Specifically, each chip has some basic configuration requirements pre-set before leaving the factory, including but not limited to: commands and interfaces for communication between the chip and the driver, the commands including queue parameters, etc. Among them, the parameters of the page swap queue may include: the upper and lower limits of the elements (such as entries) that the page swap queue can support, and the format of the entry, etc.

[0130] For example, the format of the entry in the page swap queue preset by FC chip 3011 is:

[0131] {data page physical address, data page length}

[0132] or,

[0133] {data page length, data page physical address}

[0134] The FC driver 304 may create a page swap queue according to the entry format preset by the FC chip 3011 .

[0135] The page swap queue created by the FC driver 304 may contain N entries, where N is a positive integer greater than or equal to 2. The entry is a table item in the queue, which is used to record basic information of a data page, including but not limited to the physical address of the data page and the length of the data page. The data page is the smallest unit of a common memory management method, and its size may be 4KB or 8KB. Optionally, the entry may also include identification information of each entry, and the identification information is used to indicate whether the free data page recorded for the entry has been allocated for caching data.

[0136] Optionally, the FC driver 304 may apply for part of the memory except the specific memory reserved by the OS from the memory managed by the OS to create a page swap queue. The specific memory includes the memory required for the OS operation, or the memory reserved by other external devices in the OS, etc. These memories are either used exclusively for the OS operation or for other external devices, and the FC driver 304 cannot access these memories.

[0137] In specific implementation, the address corresponding to the memory requested by the FC driver 304 from the memory managed by the OS is a virtual address. In order to enable the FC chip 3011 to directly access the created page exchange queue, the FC driver 304 needs to convert the virtual address of the created page exchange queue into a physical address and configure it to the FC chip 3011 when initializing the FC chip 3011. In this way, the FC chip 3011 can directly access the page exchange queue. That is, the FC chip 3011 can directly read the information of the idle data page recorded in the page exchange queue without the participation of other software modules or hardware, such as without obtaining the information of the idle data page through the driver.

[0138] It should be noted that the FC driver 304 may convert the virtual address into the physical address by using a general address conversion method. For example, the operating system 306 may uniformly address the hardware device (including the memory 303) and maintain a mapping relationship between the virtual address and the physical address. The FC driver 304 may convert the virtual address into the physical address according to the mapping relationship maintained by the operating system 306.

[0139] It can be understood that the page swap queue created by the FC driver 304 can be directly accessed not only by the FC chip 3011 but also by the FC driver 304 , that is, the FC driver 304 and the FC chip 3011 share the created page swap queue.

[0140] S403: The FC driver 304 applies for M data pages from the cache resource pool for caching the data that the storage array 300 needs to store;

[0141] Here, M is a positive integer greater than or equal to 1. The M data pages requested by the FC driver 304 from the cache resource pool are idle data pages, and these data pages can be used to cache data that the storage array 300 needs to store.

[0142] Optionally, the number M of data pages requested by the FC driver 304 from the cache resource pool may be determined in different ways in different scenarios.

[0143] One way is to configure according to the read-write ratio of a typical storage service scenario. For example, a common database service has a read-write ratio of 7:3, and the FC driver 304 can apply for 30% of the data pages in the cache resource pool 3032 to be shared in the page exchange queue.

[0144] Another way is that, when the business proportion of the storage array 300 storing data is low, in order to avoid too many data pages configured in the page exchange queue, some of the free data pages configured in the exchange queue are not allocated for caching data, resulting in idle resources, the value of M can be flexibly configured. For example, through a configuration interface, the value configured by the user according to the needs of different business scenarios is received through the configuration interface. The FC driver 304 applies for data pages from the cache resource pool 3032 according to the received value of M. Of course, the specific software in the storage array 300 can also automatically and dynamically adjust the value of the number of data pages M in the page exchange queue according to the actual business situation of the storage array 300 through a preset algorithm. The embodiment of the present application does not limit the specific implementation method.

[0145] S404: The FC driver 304 configures the information of the requested data page to an entry in the page exchange queue;

[0146] The information of the data page includes but is not limited to the physical address and length information of the data page.

[0147] Specifically, the information of a data page can be configured into an entry of the page swap queue. Each entry records the information of different data pages. For example, the FC driver 304 records the physical address and length information of a requested data page into a variable corresponding to an entry.

[0148] S405 : The FC driver 304 configures the information of the page swap queue to the FC chip 3011 .

[0149] The information of the page swap queue includes one or more of the starting address of the page swap queue, the number of entries, the format of the entries, etc.

[0150] Specifically, the chip will be configured with a preset command set when it leaves the factory. The chip driver will perform relevant configurations according to the preset command set. In this embodiment, the FC driver 304 can configure the page swap queue information into the FC chip 3011 according to the preset command set of the FC chip 3011.

[0151] For example, the pre-configured command set for FC chip 3011 is:

[0152] {

[0153] The command's operation code (which identifies the function of the command)

[0154] The value of the queue's physical address;

[0155] The length of the queue;

[0156] The number of entries in the queue;

[0157] Other chip required information to be filled in;

[0158] }

[0159] The FC driver 304 fills the starting address of the page swap queue, the number of entries, and other queue information in the command set according to the format requirements of the command set, and then sends the filled command set to the FC chip 3011 .

[0160] After the FC driver 304 configures the information of the page exchange queue to the FC chip 3011, the FC chip 3011 can access the page exchange queue and obtain the information of the idle data pages in the cache resource pool 3032 through the page exchange queue. When the storage array 300 receives a write data request sent by the server, the FC chip 3011 can determine the information of the data page that can be used for caching data from the page exchange queue according to the write data request sent by the server, and return a response message of the completion of writing data to the server.

[0161] As an optional implementation, the FC driver 304 may also configure or share the information of the page swap queue (including but not limited to the starting address of the page swap queue, the number of entries, the format, etc.) with the FC chip 3011 after the above step S402, that is, after completing the creation of the page swap queue.

[0162] refer to Figure 5 , Figure 5 for Figure 4Schematic diagram of a processing method after the initialized storage array 300 receives a write data request sent by the server 400. The server 400 is connected to the storage array 300 via a network. For example, the server 400 and the storage array 300 can be connected via an optical module switch. When the application module in the server 400 needs to store data, the FC-HBA card 401 sends a write data command to the storage array 300. Figure 5 As shown, the method includes:

[0163] Step S501: When an application module in the server 400 (usually a software module in the service layer of the server) needs to store data, the server 400 sends a write data request to the storage array 300 through the FC-HBA card 401;

[0164] Optionally, the write data request sent by the server 400 may be implemented by sending a write data command. The embodiment of the present application does not limit the specific implementation method of the server 400 sending the write data request.

[0165] Step S502: the FC-HBA card 301 in the storage array 300 receives the write data request;

[0166] Specifically, the FC-HBA card 301 receives the write data request sent by the server 400 through the network or directly through the FC port 3012 .

[0167] Step S503: the FC-HBA card 301 parses the write data request and allocates a data page;

[0168] Specifically, the FC chip 3011 in the FC-HBA card 301 parses the write data request sent by the server 400 , and allocates data pages for caching data to be stored in the write data request according to the data pages recorded in the page exchange queue.

[0169] For example, if the storage space occupied by the data to be stored in the write data request is within the cache space range of a data page, the FC chip 3011 allocates the data page recorded in entry 0 in the page swap queue to cache the data to be stored in the write data request. If the data to be stored in the write data request requires multiple data pages to be cached, the FC chip 3011 allocates the data pages recorded in multiple entries in the page swap queue to cache the data to be stored in the write data request.

[0170] Optionally, the FC-HBA card 301 may allocate data pages according to the information of the data pages recorded in the entry of the page exchange queue in the following manner:

[0171] One is that each entry in the page swap queue has an identification bit, which is used to identify whether the idle data page recorded in the entry has been occupied. For example, if the identification bit of an entry is 0, it means that the idle data page in the entry has not been allocated; if the identification bit of an entry is 1, it means that the idle data page in the entry has been allocated. The FC-HBA card 301 can select an entry for allocating idle data pages according to the identification bit of each entry.

[0172] Another way is that the FC-HBA card 301 allocates free data pages starting from the entry at the start position of the page exchange queue, records the location information of the last used entry after each allocation, and allocates the corresponding free data page from the corresponding entry starting from the next entry of the location of the last used entry recorded last time when allocating data pages next time. At the same time, the free data pages exchanged from the cache resource pool are added in sequence at the end of the queue to ensure that the page exchange queue has sufficient free data pages for the FC-HBA card 301 to allocate.

[0173] It should be noted that the embodiments of the present application are not limited to the above two methods. Other equivalent or modified methods, as long as they can enable the FC-HBA card 301 to record and obtain the information of the data page from the entry of the page exchange queue and allocate it, are within the scope of the embodiments of the present application.

[0174] Step S504: the FC-HBA card 301 sends a response message indicating that data writing is ready to be completed to the server 400.

[0175] Specifically, after the FC chip 3011 in the FC-HBA card 301 is allocated a free data page for caching the data to be stored in the write data request, that is, after the FC chip 3011 successfully allocates a free data page for caching the data to be stored in the write data request, it sends a response message of write data preparation completion to the server 400 through the FC port 3012 to notify the server 400 that the storage array 300 is ready to receive data.

[0176] In the above process, the FC chip 3011 no longer requests the cache module 305 to allocate data pages in the cache resource pool 3032 through the FC driver 304, which can avoid the delay caused by applying for data pages through the FC driver 304 and the cache module 305, and can improve the speed and efficiency of returning the write data preparation completion message to the server.

[0177] Figure 6A schematic diagram of a method flow chart of a storage array 300 receiving and storing data provided in an embodiment of the present application. The method flow chart is as follows: Figure 5 The method shown in the figure sends a response message to the server 400 indicating that the data writing is ready, and then receives and stores the data sent by the server 400. For a clear description, Figure 6 The storage array also includes a hard disk management module 307 and a storage space 308. The hard disk management module 307 is used to manage the storage space 308 in the storage array 300, including but not limited to writing data in the cache resource pool 3032 into the storage space 308. The storage space 308 is a physical space for storing data in the storage array 300, which can be a HDD or SSD, etc. In a specific implementation, the hard disk management module 307 can also include multiple sub-modules, and the functions of the hard disk management module 307 can be jointly implemented by multiple different sub-modules, which is not specifically limited in the embodiment of the present application.

[0178] like Figure 6 As shown, the process of the storage array 300 receiving and storing data is as follows:

[0179] Step ①: The FC port 3012 of the FC-HBA card 301 receives the data sent by the server, and the FC chip 3011 caches the data received by the FC port 3012 in the hardware cache space inside the FC chip 3011;

[0180] Step ②: The FC chip 3011 obtains information of the allocated data page from the page exchange queue;

[0181] Figure 6 The data page recorded in entry0 is taken as an example to be an allocated data page.

[0182] The entry 0 is an entry allocated when the FC chip 3011 receives a write data request sent by the server 400, and the information of the allocated data page is recorded in the entry 0. For example, in the above step S503, the FC chip 3011 allocates an entry for recording the allocated data page information.

[0183] Optionally, when the data page allocated by the FC chip 3011 in the above step S503 occupies multiple entries, the FC chip 3011 correspondingly obtains information of the data page from the multiple entries.

[0184] Step 3: The FC chip 3011 migrates the received data to the data page recorded in entry 0 through DMA;

[0185] That is, the FC chip 3011 migrates the received data to the storage space of the data page (eg, page0) corresponding to the physical address of the data page recorded in entry0 through DMA. The storage space of the data page is the storage space in the cache resource pool 3032.

[0186] The following description is made by taking the data page recorded in entry0 as page0 in the cache resource pool 3032 as an example.

[0187] Step ④: The FC chip 3011 sends a notification message of data reception completion to the FC driver 304, wherein the notification message includes the physical address of data page 0;

[0188] Step ⑤: The FC driver 304 sends a notification to the cache module 305 to notify the cache module 305 to process the data in the data page 0;

[0189] Step ⑥: The cache module 305 notifies the hard disk management module 307 to process the data in the data page 0;

[0190] Step 7: The hard disk management module 307 stores the data in the data page 0 into the corresponding storage space 308;

[0191] Step ⑧: The cache module 305 notifies the FC driver 304 of the physical address of the idle data page (e.g., page m);

[0192] Because the entry where page0 is located is already occupied, in order to ensure that there are enough data pages in the page sharing queue for the FC chip 3011 to allocate to other write data requests sent by the server 400 or write data requests sent by other servers, it is necessary to exchange the idle data pages in the cache resource pool 3032 to the page cache queue. In this step, page m is notified to the FC driver 304, that is, the idle data page is exchanged with the occupied data page page0.

[0193] Optionally, the idle data pages in the cache resource pool 3032 are exchanged into the page exchange queue by determining an equal number of idle data pages from the cache resource pool 3032 and configuring the determined idle data pages into the page exchange queue. The equal number is the number of data pages used for caching data recorded in the page exchange queue. For example, the data received in step ① needs to occupy 3 data pages. After the FC chip 3011 migrates the received data to the cache space corresponding to the 3 data pages by DMA, it determines 3 idle data pages from the cache resource pool 3032 and configures them into the page exchange queue. In this way, it can be ensured that there are enough data pages in the page exchange queue for the FC chip 3011 to allocate for data caching.

[0194] Optionally, the embodiment of the present application does not limit the execution order of step ⑦ and step ⑧. The two steps can be executed in parallel, or step ⑧ can be executed first and then step ⑦.

[0195] Optionally, in the above step S403, the number of data pages M requested by the FC driver 304 from the cache resource pool may also be greater than the number of data pages required by the actual business needs. For example, if the storage array 300 needs 500 data pages to cache the data to be stored within a certain period of time, the FC driver 304 may request 1000 data pages from the cache resource pool. The extra 500 data pages in the data pages requested by the FC driver 304 can avoid the problem of cache failure caused by insufficient available data pages for some data due to the fact that the idle pages have not been swapped to the page swap queue.

[0196] Step ⑨: The FC driver 304 configures the information of the data page page m (including but not limited to the physical address and size of page m, etc.) to entry 0.

[0197] Above Figure 3-Figure 6 The implementation described is based on the example of a storage array receiving a write data request sent by a server through an FC-HBA in a FC-SAN scenario. It is understood that for other scenarios, when a device with storage capabilities receives a write data request sent by other devices through a network interface card, the above implementation can be referred to. Figure 3-Figure 6 For example, in the IP-SAN scenario, the storage array may receive the write data request sent by the server through the Ethernet network interface card and perform corresponding processing. Optionally, when the Ethernet network interface card receives the write data request sent by the server, the Ethernet network interface card may be a network interface card that supports data forwarding offloading.

[0198] Furthermore, the above Figure 3-Figure 6The described implementation is explained by taking the creation of a page swap queue in the memory managed by the OS as an example. In specific implementation, a page swap queue may also be created in other parts of the memory, such as the BAR address space of the FC-HBA card 301 in the memory.

[0199] From the perspective of the FC chip 3011 quickly obtaining the free data page information in the cache, a page exchange queue can also be created in the cache space of the FC chip 3011. In this way, when the FC chip 3011 receives a write data request, it can quickly obtain the free data page information from the local cache. Of course, since the FC chip 3011 and the memory communicate through a communication channel, such as a PCIe link, when exchanging data pages, the information of the exchanged data page needs to be transmitted through the PCIe link between the memory and the FC chip 3011, and the page exchange efficiency will be lower than the method of creating a page exchange queue in the memory.

[0200] The above implementation is described by creating a page exchange queue in the memory, and the page exchange queue records the free data page information in the cache as an example. In the specific implementation, the free data pages in the cache can also be recorded in other forms, for example, by other methods such as arrays or linked lists. That is, the page exchange queue is only an implementation method for recording data page information, and other record tables that can record data page information, such as data page information tables, are all within the scope disclosed by the embodiments of the present application. These data page information tables record the free data page information in the cache, and in combination with other technical features provided by the embodiments of the present application, can also solve the technical problems to be solved by the present application. It is just that in the specific implementation, the implementation method will be slightly different due to the characteristics of various forms themselves. For example, the address of the entry in the page exchange queue is usually continuous, and the address of the linked list is not all continuous because the address of the next table item is determined by a pointer.

[0201] refer to Figure 7 , Figure 7 A schematic diagram of the structure of a storage device 700 provided in an embodiment of the present application. The storage device 700 includes a processor 701, a network interface card 702, and a memory 703, wherein:

[0202] The processor 701 is used to create a data page information table in the memory 703 by running the driver of the network interface card 702, wherein the data page information table is used to record information of free data pages in the memory;

[0203] The network interface card 702 is used to receive a write data request, allocate the data page recorded in the data page information table for caching the data to be stored in the write data request according to the information of the data page recorded in the data page information table, and send a response message indicating that the write data is ready to be stored to the sender of the write data request; wherein the write data request is a request to write data to the storage device 700.

[0204] The storage device 700 provided in the embodiment of the present application, when receiving a write data request, its network interface card 702 obtains information of an idle data page from the memory 703, and the idle data page can be used to cache the data to be written by the write data request. In this way, the network interface card 702 can directly obtain information of available cache space from the memory 703, complete the preparation of writing data, and send a response message of the completion of writing data preparation to the sender of the write data request. Since multiple modules in the storage device 700 do not need to cooperate with each other to determine the available cache space, the time from the network interface card 702 receiving the write data request to the network interface card 702 sending the write data request response message is shortened, and the efficiency of processing the write data request business is improved.

[0205] Optionally, the memory 703 includes a cache, which is used to temporarily store data written to the storage device 700 or to temporarily store data read from the storage device 700, and the information of the free data pages recorded in the page information table is the information of the free data pages in the cache.

[0206] Optionally, the implementation of the storage device 700 may refer to the implementation of the embodiment of the present application. Figure 3-Figure 6 Specifically, the implementation of the processor 701 can refer to the implementation of the CPU 302 in the storage array 300, the implementation of the network interface card 702 can refer to the implementation of the FC-HBA card 301, the implementation of the memory 703 can refer to the implementation of the memory 303, and the implementation of the data page information table can refer to the implementation of the page exchange queue, which will not be described in detail. Figure 3-Figure 6 The functions or steps implemented by the FC driver 304 shown in the figure are implemented by the CPU 302 by running the driver of the FC-HBA card 301, that is, the functions or steps implemented by the FC driver 304 can be implemented by the processor 701 by running the driver of the network interface card 702.

[0207] refer to Figure 8 , Figure 8 FIG. 8 is a schematic diagram of the structure of a network interface card 800 provided in an embodiment of the present application. Figure 8As shown, the network interface card 800 includes a controller 801 and a network port 802; wherein,

[0208] The network port 802 is used to receive a write data request through a network, wherein the write data request is a request to write data to a storage device, and the storage device receives a request to write data to the storage device and / or data to be stored through the network interface card 800;

[0209] The controller 801 is used to allocate data pages for caching the data to be stored in the write data request from the data pages recorded in the data page information table, and send a response message indicating that the write data is ready to be stored to the sender of the write data request; wherein the data page information table is an information table in the memory of the storage device, and the data page is an idle data page in the memory.

[0210] The network interface card 800 provided in the embodiment of the present application, when the network port 802 receives a write data request, the controller 801 obtains information of an idle data page from the data page information table in the memory of the storage device, and the idle data page can be used to cache the data to be written by the write data request. In this way, the controller 801 in the network interface card 800 can directly obtain information of available cache space from the memory, complete the preparation of writing data, and send a response message of the completion of writing data preparation to the sender of the write data request. Since multiple modules in the storage device do not need to cooperate with each other to determine the available cache space, the time from the network interface card 800 receiving the write data request to the time it sends the write data request response message is shortened, and the efficiency of processing the write data request service is improved.

[0211] Optionally, the implementation of the network interface card 800 can refer to the implementation of the embodiment of the present application. Figure 3-Figure 6 Specifically, the implementation of the controller 801 can refer to the implementation of the FC chip 3011, and the implementation of the network port 802 can refer to the implementation of the FC port 3012, which will not be described in detail.

[0212] refer to Fig. 9 , Fig. 9 A flowchart of a method for processing a write data request provided in an embodiment of the present application includes:

[0213] Step 900: receiving a write data request, where the write data request is a request to write data to a storage device;

[0214] Step 902: allocating data pages for caching data to be written by the write data request according to the information of the data pages recorded in the data page information table; wherein the data page information table is an information table in the memory of the storage device, and the data pages are free data pages in the memory;

[0215] Step 904: Send a response message indicating that data writing is ready to be completed to the sender of the data writing request.

[0216] In the above method, when a write data request is received, information of an idle data page is obtained from the memory, and the idle data page can be used to cache the data to be written by the write data request. In this way, when a write data request is received, information of available cache space can be directly obtained from the memory, preparation for writing data can be completed, and a response message of completion of writing data preparation can be sent to the sender of the write data request. The time from receiving a write data request to sending a write data request response message is shortened, and the efficiency of processing write data request services is improved.

[0217] Optionally, the implementation of the above method can refer to the embodiments of the present application. Figure 3-Figure 6 Specifically, step 900 can refer to the above Figure 5 The implementation of step S502 in step 902 can refer to the above Figure 5 The implementation of step S503 in step 904 can refer to the above Figure 5 The implementation method of step S504 is not described in detail. Fig. 9 The method flow shown in the figure can be further referred to Figure 4 and Figure 6 The method flow shown in is implemented and will not be repeated here.

[0218] refer to Fig.10 , Fig.10 The present invention provides a schematic diagram of the structure of an information processing system 100. The storage device 100 includes a server 101 and a storage device 102. The server 101 is used to write data to the storage device 102 or read data from the storage device 102. The storage device 102 includes a processor 1021, a network interface card 1022, and a memory 1023.

[0219] The processor 1021 is used to create a data page information table in the memory 1023 by running the driver of the network interface card 1022, wherein the data page information table is used to record information of free data pages in the memory;

[0220] The network interface card 1022 is used to receive a write data request sent by the server 101, allocate the data page recorded in the data page information table for caching the data to be stored in the write data request according to the information of the data page recorded in the data page information table, and send a response message to the server 101 indicating that the write data is ready.

[0221] In the information processing system 100 provided by the embodiment of the present application, when the network interface card 1022 receives the write data request sent by the server 101, it obtains the information of the idle data page from the memory 1023, and the idle data page can be used to cache the data to be written by the write data request. In this way, the network interface card 1022 can directly obtain the information of the available cache space from the memory 1023, complete the preparation of writing data, and send a response message of the completion of writing data preparation to the server 101. Since multiple modules in the storage device 102 do not need to cooperate with each other to determine the available cache space, the time from the network interface card 1022 receiving the write data request to the network interface card 1022 sending the write data request response message is shortened, and the efficiency of processing the write data request business is improved.

[0222] Optionally, the memory 1023 also includes a cache, which is used to temporarily store data written to the storage device 102 or to temporarily store data read from the storage device 102, and the information of the free data pages recorded in the page information table is the information of the free data pages in the cache.

[0223] Optionally, the implementation of the information processing system 100 may refer to the embodiments of the present application. Figure 3-Figure 6 Specifically, the implementation of the server 101 can refer to the implementation of the server 400, the implementation of the processor 1021 can refer to the implementation of the CPU 302 in the storage array 300, the implementation of the network interface card 1022 can refer to the implementation of the FC-HBA card 301, the implementation of the memory 1023 can refer to the implementation of the memory 303, and the implementation of the data page information table can refer to the implementation of the page exchange queue. The details are not repeated here. Figure 3-Figure 6 The functions or steps implemented by the FC driver 304 shown in the figure are implemented by the CPU 302 by running the driver of the FC-HBA card 301, that is, the functions or steps implemented by the FC driver 304 can be implemented by the processor 1021 by running the driver of the network interface card 1022.

[0224] Those of ordinary skill in the art will appreciate that the modules and steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0225] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.

[0226] The units described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0227] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional unit.

[0228] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), RAM, disk or optical disk and other media that can store program codes.

[0229] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A storage device, comprising a processor, a network interface card and a memory, characterized in that: The processor is used to create a data page information table in the memory by running a driver of the network interface card, wherein the data page information table is used to record information of free data pages in the memory; The network interface card is used to receive a write data request, allocate the data page recorded in the data page information table for caching the data to be stored in the write data request according to the information of the data page recorded in the data page information table, and send a response message indicating that the write data is ready to be stored to the sender of the write data request; wherein the write data request is a request to write data to the storage device.

2. The storage device according to claim 1, characterized in that: The memory includes a cache, the cache is used to temporarily store data written to the storage device or to temporarily store data read from the storage device, and the information of the free data page recorded in the page information table is the information of the free data page in the cache; The processor is further configured to apply for an idle data page from the cache by running a driver of the network interface card, and configure information of the applied idle data page into the data page information table.

3. The storage device according to claim 1, characterized in that: The data page information table includes a plurality of table entries, each of which is used to record information of an idle data page.

4. The storage device according to any one of claims 1 to 3, characterized in that: The information of the idle data page includes physical address information and length information of the idle data page.

5. The storage device according to any one of claims 1 to 3, characterized in that: The data page information table is a page exchange queue created in the memory, and the page exchange queue includes multiple table entries in the form of a queue.

6. The storage device according to any one of claims 1 to 3, characterized in that: The network interface card includes a controller and a network port; wherein, The network port is used to receive the write data request; The controller is used to allocate the data page recorded in the data page information table for caching the data to be stored in the write data request according to the information of the data page recorded in the data page information table, and send a response message indicating that the write data is ready to be stored to the sender of the write data request.

7. The storage device according to claim 6, characterized in that: The controller is further configured to migrate the data to be stored in the received write data request to the cache space corresponding to the allocated data page; The processor is further configured to swap idle data pages in the memory into the data page information table by running a driver program of the network interface card.

8. The storage device according to any one of claims 1 to 3 and 7, characterized in that: The processor is also used to convert the virtual address of the data page information table in the memory into a physical address by running the driver of the network interface card; The network interface card accesses the data page information table through the physical address of the data page information table.

9. A network interface card, characterized in that: including a controller and a network port; wherein, The network port is used to receive a write data request through a network, wherein the write data request is a request to write data to a storage device, and the storage device receives the request to write data to the storage device and / or the data to be stored through the network interface card; The controller is used to allocate data pages from the data pages recorded in the data page information table for caching the data to be stored in the write data request, and send a response message indicating that the write data is ready to be stored to the sender of the write data request; wherein the data page information table is an information table in the memory of the storage device, and the data page is an idle data page in the memory.

10. The network interface card according to claim 9, characterized in that: The memory includes a cache, which is used to temporarily store data written to the storage device or to temporarily store data read from the storage device. The information of the free data pages recorded in the page information table is the information of the free data pages in the cache.

11. The network interface card according to claim 9, wherein: The controller is further used to receive configuration information of the data page information table, and access the data page information table according to the configuration information of the data page information table; wherein the configuration information includes a starting address, a number of table entries and a format of the data page information table.

12. The network interface card according to any one of claims 9 to 11, characterized in that: The network port is further used to receive the data to be written by the write data request through the network; The controller is further used to cache the data and migrate the data to the memory corresponding to the allocated data page.

13. A method for processing a write data request, characterized in that: The method comprises: The network interface card receives a write data request, wherein the write data request is a request to write data to a storage device; Allocate data pages for caching data to be written by the write data request according to the information of the data pages recorded in the data page information table; wherein the data page information table is an information table in the memory of the storage device, and the data pages are free data pages in the memory; Send a response message indicating that writing data is ready to be completed to the sender of the writing data request.

14. The method according to claim 13, characterized in that The memory includes a cache, the cache is used to temporarily store data written to the storage device or to temporarily store data read from the storage device, the information of the free data page recorded in the page information table is the information of the free data page in the cache, and the method further includes: Apply for an idle data page from the cache, and configure information of the applied idle data page into the data page information table.

15. The method according to claim 13, characterized in that: The data page information table includes a plurality of table entries, each of which is used to record information of an idle data page.

16. The method according to any one of claims 13 to 15, characterized in that: The information of the data page includes physical address information and length information of the idle data page.

17. The method according to any one of claims 13 to 15, characterized in that: The page information table is a page exchange queue created in the memory, and the page exchange queue includes multiple table entries in the form of a queue.

18. The method according to any one of claims 13 to 15, characterized in that: The method further comprises: Migrating the data to be written by the received write data request to the memory corresponding to the allocated data page; The idle data pages in the memory are exchanged into the data page information table.

19. An information processing system, comprising a server and a storage device, wherein the server is used to write data to the storage device or read data from the storage device; the storage device comprises a processor, a network interface card and a memory, characterized in that: The processor is used to create a data page information table in the memory by running a driver of the network interface card, wherein the data page information table is used to record information of free data pages in the memory; The network interface card is used to receive a write data request sent by the server, allocate the data page recorded in the data page information table for caching the data to be stored in the write data request according to the information of the data page recorded in the data page information table, and send a response message to the server indicating that the write data is ready.

20. The information processing system according to claim 19, characterized in that: The memory includes a cache, the cache is used to temporarily store data written to the storage device or to temporarily store data read from the storage device, and the information of the free data page recorded in the page information table is the information of the free data page in the cache; The processor is further configured to apply for an idle data page from the cache by running a driver of the network interface card, and configure information of the applied idle data page into the data page information table.

21. The information processing system according to claim 19, characterized in that: The data page information table includes a plurality of table entries, each of which is used to record information of an idle data page.

22. The information processing system according to any one of claims 19 to 21, characterized in that: The information of the idle data page includes physical address information and length information of the idle data page.

23. The information processing system according to any one of claims 19 to 21, characterized in that: The data page information table is a page exchange queue created in the memory, and the page exchange queue includes multiple table entries in the form of a queue.

24. The information processing system according to any one of claims 19 to 21, characterized in that: The network interface card includes a controller and a network port; wherein, The network port is used to receive the write data request; The controller is used to allocate the data page recorded in the data page information table for caching the data to be stored in the write data request according to the information of the data page recorded in the data page information table, and send a response message indicating that the write data is ready to be stored to the sender of the write data request.

25. The information processing system according to claim 24, characterized in that: The controller is further used to migrate the data to be stored in the received write data request to the memory corresponding to the allocated data page; The processor is further configured to swap idle data pages in the memory into the data page information table by running a driver program of the network interface card.

26. The information processing system according to any one of claims 19 to 21 and 25, characterized in that: The processor is also used to convert the virtual address of the data page information table in the memory into a physical address by running the driver of the network interface card; The network interface card accesses the data page information table through the physical address of the data page information table.