Multi-host shared memory system, memory access method, device, and storage medium

By introducing a task management module and a task queue mechanism in the CXL memory pool system, priority and queue are allocated according to the characteristics of the requested tasks, the task congestion and conflict problems when multiple hosts access the memory pool are solved, and the stability and efficiency of the system are improved.

WO2025179857A1PCT designated stage Publication Date: 2025-09-04INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/121195
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-28
Filing Date
2024-09-25
Publication Date
2025-09-04

AI Technical Summary

Technical Problem

The existing CXL memory pool system cannot achieve unified management and maintenance of multiple hosts, resulting in task congestion and data access conflicts when multiple hosts access the memory pool, resulting in instability of the memory system.

Method used

The task management module is used to connect multiple memory modules through the cache consistency interconnection protocol, and multiple task queues are set in the task management module. Priority is determined based on factors such as the type of requested tasks, data length, frequency, etc., and the requested tasks are allocated to the corresponding task queue. By obtaining and processing requested tasks through preset rules, multiple hosts can share multiple memory modules.

Benefits of technology

It effectively avoids congestion in request tasks issued by multiple hosts, improves the stability and efficiency of the memory system, and ensures data consistency and system stability during access by multiple hosts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024121195_04092025_PF_FP_ABST
    Figure CN2024121195_04092025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a multi-host shared memory system, a memory access method, a device, and a storage medium. The system comprises a plurality of hosts, a task management module, and a plurality of memory modules. The task management module is connected to the plurality of memory modules by means of a cache-coherent interconnect protocol, and any host among the plurality of hosts is used for issuing a request task; the task management module comprises a plurality of preset task queues, and the task management module is used for receiving the request task issued by any host, determining a target task queue corresponding to the request task among the plurality of preset task queues, and adding the request task into the target task queue; and the task management module is used for acquiring, from the plurality of task queues according to a preset rule, a request task to be executed, and executing a corresponding processing strategy on the basis of the type of the request task to be executed, so that the plurality of hosts can share the plurality of memory modules. The embodiments of the present application aim to improve the stability of the memory system.
Need to check novelty before this filing date? Find Prior Art

Description

Multi-host shared memory system, memory access method, device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on February 28, 2024, with application number 202410223933.0, and entitled “Memory system, memory access method, device and storage medium shared by multiple hosts”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] Embodiments of the present application relate to the technical field of memory access, and more specifically, to a memory system shared by multiple hosts, a memory access method, a device, and a storage medium. Background Art

[0004] With the development of technologies such as cloud computing, artificial intelligence, and high-performance computing, the computing power of processors has continued to increase, and the number of processor cores has also increased. This has also driven the demand for large-capacity and high-bandwidth memory. Currently, how to separate memory from the CPU (Central Processing Unit) that uses it and create a pooled memory layer that can be shared by many systems has always been a key research topic in the industry.

[0005] Compute Express Link (CXL) is an industry-supported cache coherent interconnect protocol for processors, memory expansion, and accelerators. CXL technology maintains consistency between CPU memory and memory on attached devices, allowing resource sharing for higher performance. The CXL protocol also makes memory pooling feasible on physical devices.

[0006] The latest approach is the CXL memory pool, a disaggregated memory system in which multiple hosts are connected through a CXL switch and share a large memory pool. However, the CXL switch only supports address routing between each host and the extended memory pool, and cannot achieve unified management and maintenance of the memory pool. When multiple hosts access the memory pool, the request tasks issued by multiple hosts are prone to task congestion, which in turn causes data access conflicts when multiple hosts access the memory pool, making the memory system unstable.

[0007] Summary of the Invention

[0008] Embodiments of the present application provide a memory system, memory access method, device, and storage medium shared by multiple hosts, aiming to improve the stability of the memory system.

[0009] In some embodiments of the present application, a multi-host shared memory system is provided. The system includes multiple hosts, a task management module, and multiple memory modules. The task management module connects the multiple memory modules via a cache coherence interconnect protocol, wherein:

[0010] Any of the multiple hosts is used to issue the request task;

[0011] The task management module includes multiple preset task queues. The task management module is used to receive a request task issued by any host, determine the target task queue corresponding to the request task in the preset multiple task queues, and add the request task to the target task queue;

[0012] The task management module is used to obtain request tasks to be executed from multiple task queues according to preset rules, and execute corresponding processing strategies according to the types of request tasks to be executed, so as to realize the sharing of multiple memory modules by multiple hosts.

[0013] In some embodiments of the present application, the preset multiple task queues are divided into multiple priorities, and each priority corresponds to multiple task queues;

[0014] The task management module is used to determine the target priority corresponding to the requested task after receiving the requested task, and determine the target task queue corresponding to the requested task among multiple task queues corresponding to the target priority.

[0015] In some embodiments of the present application, the task management module is used to determine a target priority corresponding to the requested task according to the type of the requested task, and different types of requested tasks are preset with corresponding priorities.

[0016] In some embodiments of the present application, the task management module is configured to: determine a type coefficient of the requested task according to the type of the requested task, and determine a priority coefficient corresponding to the requested task according to the type coefficient;

[0017] A target priority corresponding to the request task is determined according to a priority coefficient corresponding to the request task and threshold ranges corresponding to each of the multiple priorities.

[0018] In some embodiments of the present application, the task management module is used to determine the target priority corresponding to the requested task according to the type and data length of the requested task.

[0019] In some embodiments of the present application, the task management module is configured to: determine a type coefficient of the requested task according to the type of the requested task;

[0020] Determine the length coefficient of the request task according to the data length of the request task;

[0021] Determine the priority coefficient corresponding to the requested task based on the type coefficient and the length coefficient;

[0022] A target priority corresponding to the request task is determined according to a priority coefficient corresponding to the request task and threshold ranges corresponding to each of the multiple priorities.

[0023] In some embodiments of the present application, the task management module is used to determine the target priority corresponding to the request task according to the type of the request task, the data length, and the request frequency of the host that issues the request task.

[0024] In some embodiments of the present application, the task management module is configured to: determine a type coefficient of the requested task according to the type of the requested task;

[0025] Determine the length coefficient of the request task according to the data length of the request task;

[0026] Obtain the request frequency of the host that issues the request task, and determine the frequency coefficient corresponding to the request task based on the request frequency;

[0027] Determine the priority coefficient corresponding to the request task according to the type coefficient, length coefficient and frequency coefficient;

[0028] A target priority corresponding to the request task is determined according to a priority coefficient corresponding to the request task and threshold ranges corresponding to each of the multiple priorities.

[0029] In some embodiments of the present application, the task management module is used to:

[0030] Obtain the total waiting time for execution of multiple task queues at the target priority level corresponding to the requested task, and use the task queue with the smallest total waiting time as the target task queue corresponding to the requested task;

[0031] The total duration of execution of each of the multiple task queues is the sum of the execution durations corresponding to all request tasks contained in each of the multiple task queues.

[0032] In some embodiments of the present application, each of the preset multiple task queues is provided with a counter, and the counter is used to indicate the total time to be executed of the task queue;

[0033] The task management module is used to obtain the execution time of the requested task after adding the requested task to the target task queue, and update the counter of the target task queue according to the execution time of the requested task.

[0034] In some embodiments of the present application, the task management module is used to determine the execution duration corresponding to the requested task based on the data length corresponding to the requested task and the execution duration corresponding to the preset unit data length.

[0035] In some embodiments of the present application, the task management module is configured to, after receiving a request task issued by any host, detect the length of a target memory address corresponding to the request task when the type of the request task is a read data operation or a write data operation;

[0036] When the length of the target memory address is greater than a length threshold, the request task is split into multiple sub-request tasks, and target task queues corresponding to the multiple sub-request tasks are determined.

[0037] In some embodiments of the present application, a memory record table is maintained in the task management module, which records the usage status of multiple memory modules. The usage status includes the memory block label, memory block size, memory block occupancy status, memory block host identifier and memory block sharing status of each of the multiple memory modules.

[0038] In some embodiments of the present application, when the task management module receives a request task sent by any host whose type is memory status reading, the task management module is used to obtain a memory record table, generate a memory status result based on the memory status reading object of the request task, and return the memory status result to the host corresponding to the request task.

[0039] In some embodiments of the present application, the task management module is used to obtain request tasks to be executed in parallel from multiple preset task queues, and execute corresponding processing strategies according to the types of the request tasks to be executed.

[0040] In some embodiments of the present application, the task management module is used to obtain request tasks to be executed in parallel from multiple task queues corresponding to the same priority in order from high to low priority, and execute corresponding processing strategies according to the type of request tasks to be executed.

[0041] In some embodiments of the present application, when the type of the request task to be executed is memory release, the task management module is used to change the occupancy status of the memory block corresponding to the target release memory address to unoccupied in the memory record table according to the target release memory address corresponding to the request task to be executed.

[0042] In some embodiments of the present application, when the type of the request task to be executed is a memory request, the task management module is used to determine the target memory address with the requested memory length in the memory record table according to the requested memory length corresponding to the request task to be executed, change the occupancy status of the memory block corresponding to the target memory address to occupied, and configure the host identifier corresponding to the request task to be executed for the target memory address.

[0043] In some embodiments of the present application, when the type of the request task to be executed is a read data operation or a write data operation, the task management module is used to determine the target memory module corresponding to the request task to be executed, and send the request task to be executed to the target memory module to perform a read operation or a write operation on the target memory address corresponding to the request task to be executed in the target memory module.

[0044] In some embodiments of the present application, when the target memory module is in another read data operation or write data operation, the task management module adds the request task to be executed to the congestion buffer queue;

[0045] When the target memory module completes another data read operation or data write operation, the task management module is used to send the request task to be executed in the congestion buffer queue to the target memory module.

[0046] In some embodiments of the present application, when a new memory module is added to the system, the task management module is used to respond to the operation of the new memory module and add a table entry of the new memory module in the memory record table. The table entry of the new memory module includes the memory block label, memory block size, memory block occupancy status, memory block host identifier and memory block sharing status of the new memory module.

[0047] In some embodiments of the present application, when a memory module is deleted in the system, the task management module is used to respond to the operation of the memory module to be deleted, and delete the table entry of the memory module to be deleted in the memory record table. The table entry of the memory module to be deleted includes the memory block label, memory block size, memory block occupancy status, memory block host identifier and memory block sharing status of the memory module to be deleted.

[0048] In some embodiments of the present application, the preset multiple task queues also include a high-speed serial task queue. When a request task is received from any host via the high-speed serial computer expansion bus standard, the task management module is used to add the request task to the high-speed serial task queue.

[0049] In some embodiments of the present application, an embodiment of the present application provides a memory access method, which is applied to a multi-host shared memory system as in the first aspect of the embodiment, and the method includes:

[0050] Any host among multiple hosts issues a request task;

[0051] The task management module receives a request task from any host, determines the target task queue corresponding to the request task from multiple preset task queues, and adds the request task to the target task queue;

[0052] The task management module obtains the request tasks to be executed from multiple task queues according to preset rules, and executes corresponding processing strategies according to the types of the request tasks to be executed, so as to realize the sharing of multiple memory modules by multiple hosts.

[0053] In some embodiments of the present application, an embodiment of the present application provides a memory access method, which is applied to a task management module. The method includes:

[0054] Get the request task issued by any host among multiple hosts;

[0055] Determine a target task queue corresponding to the requested task from among multiple preset task queues, and add the requested task to the target task queue;

[0056] According to preset rules, request tasks to be executed are obtained from multiple task queues, and corresponding processing strategies are executed according to the types of request tasks to be executed. The processing strategies are used to enable the corresponding request tasks to access the memory module.

[0057] In some embodiments of the present application, the present application provides a computing and processing device, including:

[0058] A memory storing a computer-readable code; and one or more processors. When the computer-readable code is executed by the one or more processors, the computing processing device executes the memory access method of the second aspect of the embodiment or the memory access method of the third aspect of the embodiment.

[0059] In a fifth aspect, an embodiment of the present application provides a non-volatile readable storage medium, which stores a computer program, wherein when the computer program is executed by a processor, it executes the memory access method of the above embodiment, or the memory access method of the above embodiment. Beneficial effects:

[0060] The multi-host shared memory system provided in this embodiment includes multiple hosts, a task management module and multiple memory modules. The task management module connects the multiple memory modules through a cache consistency interconnection protocol, and the task management module includes multiple preset task queues.

[0061] When any of the multiple hosts sends a request task, the task management module receives the request task sent by any host, determines the target task queue corresponding to the request task in the preset multiple task queues, and adds the request task to the target task queue. Then, the task management module obtains the request tasks to be executed from the multiple task queues according to the preset rules, and executes the corresponding processing strategy according to the type of the request tasks to be executed, so as to realize the sharing of multiple memory modules by multiple hosts.

[0062] Compared with the existing problem of request task congestion that easily occurs when multiple hosts access the memory module, the request tasks issued by multiple hosts are spatially classified into one task queue among multiple task queues, and then the request tasks to be executed are obtained from the multiple task queues according to preset rules, and the corresponding processing strategy is executed according to the type of the request tasks to be executed, that is, the request tasks issued by multiple hosts are managed, which avoids system instability caused by congestion of request tasks issued by multiple hosts and improves the stability of the memory system. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.

[0064] FIG1 is a schematic diagram showing the structure of a multi-host shared memory system provided in an embodiment of the present application;

[0065] FIG2 is a flowchart showing the steps of a method for determining the target priority of a request task provided by an embodiment of the present application;

[0066] FIG3 shows a flowchart of the steps of a method for determining the target priority of a request task provided by an embodiment of the present application;

[0067] FIG4 shows a flowchart of the steps of a method for determining the target priority of a request task provided by an embodiment of the present application;

[0068] FIG5 shows a flowchart of the steps of the memory access method provided in an embodiment of the present application;

[0069] FIG6 shows an execution flow chart of the memory access method provided in an embodiment of the present application;

[0070] FIG7 shows a flowchart of the steps of the memory access method provided in an embodiment of the present application;

[0071] FIG8 shows a schematic diagram of a computing and processing device provided in an embodiment of the present application;

[0072] FIG9 shows a schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0073] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0074] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below with reference to the accompanying drawings. However, it will be understood by those skilled in the art that in each embodiment of the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation on the specific implementation of the present application. The various embodiments can be combined with each other and referenced to each other under the premise of no contradiction.

[0075] Compute Express Link (CXL) is an industry-supported cache-coherent interconnect protocol for processors, memory expansion, and accelerators.

[0076] IO: Input / Output, input / output;

[0077] DRAM: Dynamic Random Access Memory, dynamic random access memory;

[0078] CPU: Central Processing Unit, central processing unit;

[0079] PCIE: peripheral component interconnect express, a high-speed serial computer expansion bus standard.

[0080] As processor computing power continues to increase, the demand for large memory capacity and high bandwidth is also growing. Therefore, the method of separating DRAM from the CPU that uses it and creating a memory pool shared by multiple hosts has attracted much attention. The CXL protocol provides physical device feasibility for memory pooling.

[0081] In the existing CXL memory pool, multiple hosts access multiple CXL extended memories through CXL SWITCH. However, CXL SWITCH only supports address routing between each CXL host and the extended memory pool, and cannot achieve unified management and maintenance of the memory pool. Therefore, when multiple hosts access the memory pool, the request tasks issued by multiple hosts are prone to task congestion, which in turn causes data access conflicts when multiple hosts access the memory pool, making the memory system unstable.

[0082] In order to improve the stability of the memory system, an embodiment of the present application provides a memory system shared by multiple hosts. The system includes multiple hosts, a task management module and multiple memory modules. The task management module connects the multiple memory modules through a cache consistency interconnection protocol, that is, the task management module and the multiple memory modules are connected based on the CXL protocol.

[0083] 1 , which illustrates a schematic structural diagram of a multi-host shared memory system provided by an embodiment of the present application. The system includes multiple hosts (host 1-host n). In actual implementation, the number of hosts is not limited in this embodiment. A task management module is connected to multiple memory modules (memory module 1-memory module n) via a cache coherence interconnect (CXL SWITCH FABRIC). The CXL SWITCH FABRIC primarily forwards request tasks for a target memory address to a target memory module based on forwarding of request tasks between the task management module and the memory modules. The target memory address is a memory address in the target memory module.

[0084] In actual application, the memory module can adopt the memory pool allocation method, that is, before using the memory, first apply for allocation of a certain number of memory blocks of equal size as a backup. When there is a new memory demand, a part of the memory blocks will be allocated from the memory pool. If the memory blocks are not enough, new memory will be applied for. This can avoid memory fragmentation and improve memory allocation efficiency.

[0085] The task management module is used to analyze and manage the request tasks issued by multiple hosts. The task management module is also used to manage the memory usage of multiple memory modules, and manage memory release and memory application, and reasonably allocate memory addresses when the host applies for memory.

[0086] Specifically, in order to avoid congestion and data access conflicts caused by request tasks issued by multiple hosts, multiple task queues (task queue 1-task queue n) are preset in the task management module. The number of multiple task queues can be configured according to the needs of actual applications, and this embodiment does not impose any restrictions.

[0087] When the task management module receives a request task from any host among multiple hosts, the task management module determines the target task queue corresponding to the request task in the preset multiple task queues, and adds the request task to the target task queue. By dividing the request tasks issued by multiple hosts into queues at the spatial level, congestion of multiple tasks can be avoided.

[0088] In a feasible implementation, the multiple task queues preset in the task management module can be set to multiple priorities, and each priority corresponds to multiple task queues; for example, four priorities can be set, namely priority I, priority II, priority III and priority IV, and the number of task queues corresponding to each priority can be the same or different. For example, two queues can be set under each priority, or three task queues can be set under priority I, two task queues can be set under priority II, two task queues can be set under priority III, and one task queue can be set under priority IV.

[0089] The number of priorities and the number of task queues under each priority can be customized according to the actual application of the request task situation. For example, when the number of request tasks corresponding to priority I is large, more task queues can be set for priority I.

[0090] When the task management module receives a request task from any of the multiple hosts, that is, the task management module receives a CXL.IO command from any host through the doorbell register, it first determines the target priority corresponding to the request task, and then determines the target task queue corresponding to the request task from the multiple task queues corresponding to the target priority.

[0091] 2 , a flowchart of the method for determining the target priority of a request task provided in an embodiment of the present application is shown. The task management module can determine the target priority corresponding to the request task based on the type of the request task. Different types of request tasks are preset with corresponding priorities, specifically including the following steps:

[0092] A1: Determine the type coefficient of the requested task according to the type of the requested task, and determine the priority coefficient corresponding to the requested task according to the type coefficient.

[0093] Specifically, type coefficients corresponding to different types of request tasks can be pre-defined. The larger the type coefficient, the larger the priority coefficient. Therefore, type coefficients corresponding to different types of request tasks can be defined according to the importance and timely response requirements of different types of request tasks in actual applications.

[0094] For example, in actual applications, the timeliness requirements for data interaction between the host and the Cache (cache memory or cache) are relatively high, so a larger type coefficient is set for the request tasks of reading or writing data that interact with the Cache, such as setting it to 10; and the timeliness requirements for ordinary memory read and write type request tasks are lower than those for interacting with the Cache, so the type coefficient for ordinary memory read and write can be set to 7; the timeliness requirements for request tasks such as virtual page replacement and memory release are relatively low, and such request tasks can be executed when no memory application or memory reading and writing is performed, so the type coefficient of request tasks such as virtual page replacement and memory release can be set to 2.

[0095] The type coefficients of different types of request tasks can be customized according to the needs of the actual implementation process.

[0096] The type coefficient of the requested task can then be directly used as the priority coefficient.

[0097] A2: Determine the target priority level corresponding to the requested task based on the priority coefficient corresponding to the requested task and the threshold ranges corresponding to the multiple priorities.

[0098] The threshold ranges corresponding to multiple priorities can be customized according to the needs of actual applications. For example, when priority I, priority II, priority III and priority IV are set, the threshold range corresponding to priority I is 9-10, the threshold range corresponding to priority II is 7-8, the threshold range corresponding to priority III is 4-6, and the threshold range corresponding to priority IV is 1-3. When the task management module receives a request task to read or write data that interacts with the Cache, it determines that the priority coefficient of the request task is 10, and then determines that the priority corresponding to the request task is priority I.

[0099] 3 , a flowchart of the method for determining the target priority of a request task according to an embodiment of the present application is shown. The task management module may also determine the target priority corresponding to the request task according to the type and data length of the request task, specifically including the following steps:

[0100] B1: Determine the type coefficient of the requested task according to the type of the requested task.

[0101] Type coefficients corresponding to different types of request tasks can be defined according to the importance and timely response requirements of different types of request tasks in actual applications. The type coefficients are proportional to the priority coefficients.

[0102] For example, the type coefficient of the request task of the data interaction type between the host and the cache (cache memory or cache) can be set to 10; the type coefficient of the request task of the ordinary memory read and write type can be set to 7; and the type coefficient of the request task of the memory release type can be set to 2.

[0103] B2: Determine the length coefficient of the request task according to the data length of the request task.

[0104] Generally, the longer the data length of a request task, the longer the execution time. Therefore, a higher priority is set for the request task with a longer data length, that is, the length coefficient is proportional to the priority coefficient.

[0105] During the actual implementation process, the data length of the requested task can be obtained and the data length can be scaled proportionally to a value between 1 and 10. Ten data length ranges can also be set. In order of data length from small to large, the smallest data length range corresponds to a length coefficient of 1, and the largest data length range corresponds to a length coefficient of 10. The length coefficient corresponding to the requested task can be determined based on the data length range to which the data length of the requested task belongs.

[0106] B3: Determine the priority coefficient corresponding to the requested task based on the type coefficient and length coefficient.

[0107] In actual implementation, the type coefficient and the length coefficient can be directly summed to obtain the priority coefficient, or the priority weights corresponding to the type coefficient and the length coefficient can be set, and the type coefficient and the length coefficient can be weighted and summed according to their corresponding priority weights to obtain the priority coefficient. For example, the priority weight of the type coefficient is 0.6, and the priority weight of the length coefficient is 0.4.

[0108] B4: Determine a target priority corresponding to the requested task based on the priority coefficient corresponding to the requested task and the threshold ranges corresponding to the multiple priorities.

[0109] The priority coefficient is calculated in different ways according to the type coefficient and the length coefficient, and a plurality of threshold ranges corresponding to the priorities can be set accordingly.

[0110] For example, if the type coefficient range is 1-10 and the length coefficient range is also 1-10, when the type coefficient and the length coefficient are directly summed to obtain the priority coefficient, the priority coefficient range is 2-20, and when priority I, priority II, priority III and priority IV are set, the threshold range corresponding to priority I is 16-20, the threshold range corresponding to priority II is 10-15, the threshold range corresponding to priority III is 6-9, and the threshold range corresponding to priority IV is 2-5.

[0111] If the type coefficient ranges from 1 to 10, the length coefficient ranges from 1 to 10, the priority weight of the type coefficient is 0.6, the priority weight of the length coefficient is 0.4, and the priority coefficient is obtained by weighted summing the type coefficient and the length coefficient according to their corresponding priority weights, the priority coefficient ranges from 1 to 10. If priority I, priority II, priority III, and priority IV are set, the threshold range for priority I can be 9 to 10, the threshold range for priority II is 7 to 8, the threshold range for priority III is 4 to 6, and the threshold range for priority IV is 1 to 3.

[0112] The target priority level of the requested task can be determined by comparing the priority coefficient of the requested task with the threshold range of each priority level.

[0113] 4 , a flowchart of the method for determining the target priority of a request task provided by an embodiment of the present application is shown. The task management module can determine the target priority corresponding to the request task based on the type of the request task, the data length, and the request frequency of the host issuing the request task. Specifically, the method includes the following steps:

[0114] C1: Determine the type coefficient of the requested task according to the type of the requested task.

[0115] The type coefficients corresponding to different types of request tasks are defined based on the importance and timely response requirements of different types of request tasks in actual applications. The type coefficients are proportional to the priority coefficients. For example, the type coefficient of the request task of the data interaction type between the host and the cache can be set to 10; the type coefficient of the request task of the ordinary memory read and write type can be set to 7; and the type coefficient of the request task of the memory release type can be set to 2.

[0116] C2: Determine the length coefficient of the request task based on the data length of the request task.

[0117] Generally, the longer the data length of a request task, the longer the execution time. Therefore, a higher priority is set for the request task with a longer data length, that is, the length coefficient is proportional to the priority coefficient.

[0118] During the actual implementation process, the data length can be scaled proportionally to a value between 1 and 10 according to the data length of the requested task; 10 data length ranges can also be set, and in order of data length from small to large, the smallest data length range corresponds to a length coefficient of 1, and the largest data length range corresponds to a length coefficient of 10. The length coefficient corresponding to the requested task can be determined based on the data length range to which the data length of the requested task belongs.

[0119] C3: Obtain the request frequency of the host that issues the request task, and determine the frequency coefficient corresponding to the request task based on the request frequency.

[0120] For any host, if the frequency of requesting tasks is higher, its priority can be lowered to avoid the problem of high task request delays for other hosts due to excessively frequent requests from this host.

[0121] Therefore, the task management module can record the request frequency of each host within the calibration time, such as the request frequency within a day or a week, and determine the frequency coefficient corresponding to the request task based on the request frequency. The higher the request frequency, the lower the frequency coefficient. For example, the range of the frequency coefficient can also be set within the range of 1-10.

[0122] C4: Determine the priority coefficient corresponding to the requested task based on the type coefficient, length coefficient, and frequency coefficient.

[0123] Specifically, the sum of the type coefficient, length coefficient and frequency coefficient can be used as the priority coefficient corresponding to the requested task; or the type coefficient, length coefficient and frequency coefficient can be weighted and summed according to their respective corresponding priority weights to obtain the priority coefficient. For example, the priority weight of the type coefficient is 0.5, the priority weight of the length coefficient is 0.3, and the priority weight of the frequency coefficient is 0.2.

[0124] Considering that although the priority of the request task can be lowered when a host requests too frequently, in order to avoid excessive request delay of the host, the priority weight of the frequency coefficient can be set to the lowest.

[0125] C5: Determine the target priority corresponding to the requested task based on the priority coefficient corresponding to the requested task and the threshold ranges corresponding to the multiple priorities.

[0126] According to different calculation methods of obtaining the priority coefficient according to the type coefficient, the length coefficient and the frequency coefficient, a plurality of threshold ranges corresponding to the priorities can be set accordingly.

[0127] For example, if the range of the type coefficient is 1-10, the range of the length coefficient is 1-10, and the range of the frequency coefficient is also 1-10, the priority weight of the type coefficient is 0.5, the priority weight of the length coefficient is 0.3, and the priority weight of the frequency coefficient is 0.2, and the priority coefficient is obtained by weighted summing the type coefficient, length coefficient, and frequency coefficient according to their corresponding priority weights, the range of the priority coefficient is 1-10, and when priority I, priority II, priority III, and priority IV are set, the threshold range corresponding to priority I can be 9 to 10, the threshold range corresponding to priority II is 7 to 8, the threshold range corresponding to priority III is 4 to 6, and the threshold range corresponding to priority IV is 1 to 3.

[0128] The target priority level of the requested task can be determined by comparing the priority coefficient of the requested task with the threshold range of each priority level.

[0129] In this embodiment, the numerical settings for the type coefficient, length coefficient, frequency coefficient, priority coefficient, and the threshold range of each priority are only examples. The specific numerical settings can be customized according to the needs of actual applications and are not limited in this embodiment.

[0130] After determining the target priority of the requested task, the task management module further determines the task queue to which the requested task belongs under the target priority, that is, determines the target task queue corresponding to the requested task.

[0131] Specifically, considering that if the request tasks are unevenly distributed in multiple task queues, the waiting time of the request tasks in the task queues with too many request tasks will increase, in order to avoid long delays for some request tasks, the task management module can obtain the total execution time of multiple task queues under the target priority corresponding to the request task when determining the target task queue for the request task, and use the task queue with the smallest total execution time as the target task queue corresponding to the request task. The total execution time of multiple task queues is the sum of the execution times corresponding to all request tasks contained in the multiple task queues.

[0132] In the actual implementation process, each of the preset multiple task queues is set with a counter, which is used to indicate the total execution time of the task queue. After the task management module adds the requested task to the target task queue, it obtains the execution time of the requested task and updates the counter of the target task queue according to the execution time of the requested task.

[0133] When the latest request task is added to the target task queue, the request task is located at the end of the target task queue. When the request task that needs to be executed or processed is obtained from the task queue, the request task is obtained from the head of the task queue.

[0134] The execution time of a request task can be estimated based on the data length of the request task. The task management module can determine the execution time of the request task based on the data length corresponding to the request task and the execution time corresponding to the preset unit data length.

[0135] For example, assuming that the data length of a minimum request task operation is 64B, the unit data length can be set to 64B, and then the execution time corresponding to the unit data length is T0. If the data length of the request task A is K, the execution time corresponding to the request task can be calculated as K*T0 / 64.

[0136] The value T of the counter of each task queue is the total execution time of the task queue. When a request task with an execution time of T1 is added to the task queue, T=T+T1. When a request task with an execution time of T2 in the task queue is executed, the request task is cleared from the task queue, and T of the task queue is T=T-T2.

[0137] When determining the target task queue corresponding to the request task A, there are three task queues under the target priority corresponding to the request task A: task queue 1, task queue 2 and task queue 3. By comparing the T values ​​corresponding to the three task queues, the total execution time of task queue 2 is the smallest. It is used as the target task queue for the request task A. After the request task A is added to task queue 2, the counter of task queue 2 is updated according to the execution time of the request task A, that is, T of task queue 2 = T + K * T0 / 64.

[0138] Through the multiple task queues in the task management module, the request tasks issued by multiple hosts can be managed spatially, and when each request task is assigned to the task queue under the corresponding priority, the request task will be added to the task queue with the smallest total execution time according to the total execution time of the task queue under the priority, and then the request task will be managed from the time dimension, avoiding the congestion problem of request tasks issued by multiple hosts.

[0139] In another feasible implementation, after receiving a request task issued by any host, the task management module can also detect the length of the target memory address corresponding to the request task when the type of the request task is a read data operation or a write data operation. When the length of the target memory address is greater than the length threshold, the request task is split into multiple sub-request tasks, and the target task queues corresponding to the multiple sub-request tasks are determined; in actual applications, the size of the length threshold can be set according to the needs of the actual application.

[0140] Since the read and write operations of large-block memory addresses may block other hosts' access to the memory module where the memory address is located, and the read and write operations of large-block memory addresses take a long time, causing other request tasks to wait for a long time, in order to reduce the overall request task time, the request task corresponding to the target memory address greater than the length threshold can also be split into multiple sub-request tasks. Each sub-request task is equivalent to an independent request task, and the target task queues corresponding to the multiple sub-request tasks are determined separately.

[0141] For example, a request task is to read 2M data from the starting address. The request task can be decomposed into two or more small subtasks. Here, taking the split into two as an example, when the request task is split into two sub-request tasks, the first sub-request task reads M data from the starting address, and the second sub-request task reads M data starting from the starting address + M. Then, the target task queues corresponding to the first sub-request task and the second sub-request task are determined respectively, so that a request task with an execution time that is too long will not occupy the read and write operations of a memory module for a long time.

[0142] When the task management module obtains the request tasks to be executed from the task queue, it can obtain the request tasks to be executed from multiple task queues according to preset rules, and execute corresponding processing strategies according to the types of the request tasks to be executed, so as to realize the sharing of multiple memory modules by multiple hosts.

[0143] In a feasible implementation, the preset rule may be to have the task management module obtain request tasks to be executed in parallel from multiple task queues corresponding to the same priority in order from high to low priority, and execute corresponding processing strategies according to the type of request tasks to be executed.

[0144] For example, 3 task queues are set under priority I, 2 task queues are set under priority II, 2 task queues are set under priority III, and 1 task queue is set under priority IV. The request tasks to be executed can be obtained in parallel from the 3 task queues of priority I with the highest priority for processing. When the 3 task queues of priority I are empty, the request tasks to be executed can be obtained in parallel from the 2 task queues of priority II for processing.

[0145] Alternatively, when processing the task queue of the current priority, the waiting time of the request task at the head of the two task queues of priority II can be detected. The waiting time can be the difference between the time when the request task is issued and the current time. If the waiting time exceeds the waiting time threshold, after processing the request task that is normally processed by the current priority, it can be switched to obtaining the request tasks to be executed from the two task queues of priority II in parallel, and the process can be executed cyclically in order from high to low priority.

[0146] In another feasible implementation, the task management module may also obtain request tasks to be executed from a plurality of preset task queues in parallel, and execute corresponding processing strategies according to the types of the request tasks to be executed.

[0147] That is, regardless of the priority, the requested tasks to be executed can be obtained in parallel from all task queues for processing.

[0148] Whether obtaining the request tasks to be executed in parallel in order of priority or obtaining the request tasks to be executed in parallel from all task queues, multiple request tasks can be processed synchronously, and the number of request tasks processed synchronously can also be controlled according to the number of task queues to avoid congestion of request tasks caused by multiple request tasks performing read and write operations targeting the same memory module at the same time when too many request tasks are executed synchronously.

[0149] When the type of the request task to be executed is a read data operation or a write data operation, the task management module determines the target memory module corresponding to the request task to be executed, and sends the request task to be executed to the target memory module to perform a read operation or a write operation on the target memory address corresponding to the request task to be executed in the target memory module.

[0150] Although the request tasks to be executed are obtained in parallel from the task queues, the number of request tasks to be processed synchronously can also be controlled according to the number of task queues, which to a certain extent reduces the congestion of request tasks caused by multiple request tasks performing read and write operations targeting the same memory module at the same time. However, in the case of obtaining the request tasks to be executed in parallel, there may still be multiple request tasks to be executed performing read operations or write operations on the same target memory module.

[0151] Therefore, in order to avoid multiple request tasks to be executed performing read operations or write operations on the same target memory module, a congestion buffer queue can also be set in the task management module. When the target memory module is in another read data operation or write data operation, the task management module adds the request task to be executed to the congestion buffer queue; when the target memory module completes another read data operation or write data operation, the task management module is used to send the request task to be executed in the congestion buffer queue to the target memory module.

[0152] In addition to managing the request tasks issued by multiple hosts, the task management module also maintains a memory record table, which records the usage status of multiple memory modules. The usage status includes the memory block label, memory block size, memory block occupancy status, memory block host identification and memory block sharing status of each memory module.

[0153] For example, the memory record table is shown in Table 1.

[0154] Table 1 Memory record table

[0155] The storage range of a memory module is large, so a memory module is often divided into multiple memory blocks. For example, the size of each memory block can be 128M. Different standards for dividing the memory block size can also be used for each memory module according to the needs of actual applications. This is not limited in this embodiment; and each memory block corresponds to a unique identifier as a memory block label; the occupancy status of the memory block includes occupied and unoccupied, 1 can be used to indicate occupied, and 0 can be used to indicate unoccupied; if any memory block is in the occupied state, the memory block will also correspond to the host identifier of the memory block. For example, memory block #2 is occupied, and the corresponding host identifier is host 1, which is not shared, so the sharing state is 0; memory block #5 is occupied, and the corresponding host identifiers are host 1 and host 3, indicating that memory block #5 is shared by two hosts, so the sharing state is 1.

[0156] Through the memory record table maintained in the task management module, the usage of each memory module can be clearly managed, including occupancy and sharing. Based on the memory record table, memory requests can be allocated more reasonably and memory release can be recorded in a timely manner. It also makes it easier for the host to query and monitor memory status.

[0157] Specifically, when the task management module receives a request task of memory status reading from any host, it is not necessary to add the request task to the task queue. The task management module directly obtains the memory record table, generates a memory status result based on the memory status reading object of the request task, and returns the memory status result to the host corresponding to the request task.

[0158] For example, any host can set all the memory occupied by itself or specify the memory of any memory block as the memory status reading object, so that the table entry of the memory status reading object in the memory record table and the data are returned to the host as the memory status result.

[0159] When the type of the request task to be executed is memory release, the task management module is used to change the occupation state of the memory block corresponding to the target release memory address to unoccupied in the memory record table according to the target release memory address corresponding to the request task to be executed.

[0160] When the memory is released, the memory module can be entered to delete the old data stored in the target released memory address. By changing the occupancy status of the memory block corresponding to the target released memory address to unoccupied in the memory record table, when any host issues a memory application request task in the future, the target released memory address can be directly reallocated, and any host's subsequent write operation on this memory segment can directly allow the new data to overwrite the old data, saving processing costs.

[0161] When the type of the request task to be executed is memory request, the task management module is used to determine the target memory address with the requested memory length in the memory record table according to the requested memory length corresponding to the request task to be executed, change the occupancy status of the memory block corresponding to the target memory address to occupied, and configure the host identifier corresponding to the request task to be executed for the target memory address.

[0162] After the target memory address is determined, the target memory address can be returned to the host that sent the memory request to inform the host of the address of the memory requested. When the host subsequently performs read and write operations on the memory address, the request task of the read and write operation type issued by the host will carry the target memory address. When executing the processing strategy of the request task, the request task is sent to the target memory address through the cache consistency interconnection protocol to perform read and write operations on the target memory address.

[0163] In this system, memory modules can be added to further expand the memory space, or existing memory modules can be deleted as needed.

[0164] When a new memory module is added to the system, the task management module responds to the operation of adding the new memory module and adds a table entry of the new memory module in the memory record table. The table entry of the new memory module includes the memory block label, memory block size, memory block occupancy status, memory block host identifier and memory block sharing status of the new memory module.

[0165] When a memory module is deleted in the system, the task management module responds to the operation of the memory module to be deleted and deletes the table entry of the memory module to be deleted in the memory record table. The table entry of the memory module to be deleted includes the memory block label, memory block size, memory block occupancy status, memory block host identifier and memory block sharing status of the memory module to be deleted.

[0166] In a feasible implementation, the task management module can not only receive CXL.IO commands issued by any host as request tasks, but also receive request tasks issued by hosts connected based on the high-speed serial computer expansion bus standard, that is, hosts connected through the PCIE protocol. The task management module is provided with a high-speed serial task queue. When a request task is received from any host connected through the high-speed serial computer expansion bus standard, the request task is added to the high-speed serial task queue, thereby enabling hosts connected based on the PCIE protocol to access the memory module.

[0167] 5 , a flowchart of a memory access method provided in an embodiment of the present application is shown. The method is applied to a multi-host shared memory system of the present embodiment, and the method includes:

[0168] S101: Any host among multiple hosts issues a request task.

[0169] Any host sends a CXL.IO command as a request task through the doorbell register and sends it to the task management module.

[0170] S102: The task management module receives a request task sent by any host, determines a target task queue corresponding to the request task from a plurality of preset task queues, and adds the request task to the target task queue.

[0171] The multiple task queues preset in the task management module can be set to multiple priorities, and each priority corresponds to multiple task queues.

[0172] When the task management module receives a memory status read request task, it obtains the memory record table, generates a memory status result according to the memory status read object of the request task, and returns the memory status result to the host corresponding to the request task.

[0173] If a non-memory status reading type request task is received, such as a memory release type request task, a memory application type request task, a read data operation type or a write data operation type request task, first determine the target priority corresponding to the request task, and then determine the target task queue corresponding to the request task among the multiple task queues corresponding to the target priority.

[0174] Through the multiple task queues in the task management module, the request tasks issued by multiple hosts can be managed spatially, and when each request task is assigned to the task queue under the corresponding priority, the request task will be added to the task queue with the smallest total execution time according to the total execution time of the task queue under the priority, and then the request task will be managed from the time dimension, avoiding the congestion problem of request tasks issued by multiple hosts.

[0175] S103: The task management module obtains request tasks to be executed from multiple task queues according to preset rules, and executes corresponding processing strategies according to the types of the request tasks to be executed, so as to realize sharing of multiple memory modules by multiple hosts.

[0176] For example, the request tasks to be executed can be obtained in parallel from multiple task queues corresponding to the same priority in order from high to low priority, and the corresponding processing strategy can be executed according to the type of the request tasks to be executed; or the request tasks to be executed can be obtained in parallel from multiple preset task queues, and the corresponding processing strategy can be executed according to the type of the request tasks to be executed. In the actual implementation process, the method of obtaining the request tasks to be executed in parallel can be selected according to the needs of the actual application.

[0177] 6 , there is shown a flowchart of an execution of a memory access method provided in an embodiment of the present application, which includes the following steps:

[0178] S0: Any host among multiple hosts issues a request task.

[0179] S1: Determine whether the requested task type is memory status reading.

[0180] If the requested task type is a memory status reading type request task, execute step S2;

[0181] If the type of the request task is a non-memory status reading type request task, execute step S4;

[0182] S2: Read the memory record table and generate the memory status result.

[0183] S3: Returns the memory status result to the host.

[0184] S4: Determine the target task queue of the requested task and add the requested task to the target task queue.

[0185] S5: Acquire the request tasks to be executed in parallel from multiple task queues corresponding to the same priority in order of priority from high to low, or acquire the request tasks to be executed in parallel from all task queues.

[0186] S6: Determine the type of the requested task.

[0187] If the type of the requested task is memory release, execute step S7;

[0188] If the requested task type is memory request, execute step S8;

[0189] If the type of the requested task is a read data operation or a write data operation, step S10 is executed.

[0190] S7: Change the occupied state of the memory block corresponding to the target released memory address to unoccupied in the memory record table.

[0191] S8: Determine the target memory address with the requested memory length in the memory record table, change the occupation state to occupied, and add the host identifier.

[0192] S9: Return an application completion response to the host.

[0193] S10: Enter the target memory module to perform a read operation or a write operation.

[0194] If it is a read operation, the read data is returned to the host.

[0195] 7 , a flowchart of a memory access method provided by an embodiment of the present application is shown, which is applied to a task management module. The method includes:

[0196] S201: Obtain a request task issued by any host among multiple hosts.

[0197] Any host can send a CXL.IO command as a request task through the doorbell register and send it to the task management module.

[0198] S202: Determine a target task queue corresponding to the requested task from a plurality of preset task queues, and add the requested task to the target task queue.

[0199] The task management module includes multiple preset task queues. The multiple task queues can also be set to multiple priorities, and each priority corresponds to multiple task queues.

[0200] If the task management module receives a memory status read type request task, it obtains the memory record table, generates a memory status result according to the memory status read object of the request task, and returns the memory status result to the host corresponding to the request task.

[0201] If the task management module receives a request task of a non-memory status reading type, such as a memory release type request task, a memory application type request task, a read data operation type or a write data operation type request task, it first determines the target priority corresponding to the request task, and then determines the target task queue corresponding to the request task.

[0202] Through the multiple task queues in the task management module, the request tasks issued by multiple hosts can be managed spatially. At the same time, when each request task is assigned to the task queue under the corresponding priority, the request task will be added to the task queue with the smallest total execution time according to the total execution time of the task queue under the priority. Then, the request task is managed from the time dimension, avoiding the congestion problem of request tasks issued by multiple hosts.

[0203] S203: Obtaining request tasks to be executed from multiple task queues according to preset rules, and executing corresponding processing strategies according to the types of the request tasks to be executed, where the processing strategies are used to enable the corresponding request tasks to access the memory module.

[0204] The request tasks to be executed can be obtained in parallel from multiple task queues corresponding to the same priority in order from high to low priority, and the corresponding processing strategy can be executed according to the type of the request tasks to be executed; or the request tasks to be executed can be obtained in parallel from multiple preset task queues, and the corresponding processing strategy can be executed according to the type of the request tasks to be executed. In the actual implementation process, the method of obtaining the request tasks to be executed in parallel can be selected according to the needs of the actual application.

[0205] The processing strategy is used to implement the corresponding request task's access to the memory module. For example, for a memory release type request task, the task management module changes the occupancy status of the memory block corresponding to the target release memory address to unoccupied in the memory record table based on the target release memory address corresponding to the request task.

[0206] When the type of the request task is memory request, the task management module determines the target memory address with the requested memory length in the memory record table according to the requested memory length corresponding to the request task, changes the occupancy status of the memory block corresponding to the target memory address to occupied, and configures the host identifier corresponding to the request task for the target memory address.

[0207] For a request task of the read data operation or write data operation type, the task management module determines the target memory module corresponding to the request task, and sends the request task to the target memory module to perform a read operation or a write operation on the target memory address corresponding to the request task to be executed in the target memory module.

[0208] 8 , a schematic diagram of a computing and processing device according to an embodiment of the present application is shown, including one or more processors 710 and a memory 720 , wherein the memory 720 stores computer-readable code; when the computer-readable code is executed by the one or more processors 710 , the computing and processing device executes the memory access method according to the embodiment.

[0209] 9 , a schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application is shown. The non-volatile readable storage medium 801 stores a computer program 810 , wherein the computer program 810 performs the memory access method of the embodiment when executed by a processor.

[0210] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0211] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM (Compact Disc Read-Only Memory, read-only optical disk storage technology), optical storage, etc.) containing computer-usable program code.

[0212] The present application embodiment is described with reference to the flow chart and / or block diagram of the method, terminal device (system), and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flow chart and / or block diagram and the combination of the process and / or box in the flow chart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device produce a device for realizing the function specified in one process or multiple processes and / or one box or multiple boxes of the flow chart.

[0213] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0214] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0215] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0216] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0217] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A memory system shared by multiple hosts, characterized in that: The system includes multiple hosts, a task management module, and multiple memory modules, wherein the task management module is connected to the multiple memory modules via a cache coherence interconnect protocol, wherein: Any one of the multiple hosts is used to issue a request task; The task management module includes a plurality of preset task queues, and is used to receive the request task issued by any host, determine a target task queue corresponding to the request task in the plurality of preset task queues, and add the request task to the target task queue; The task management module is used to obtain the request tasks to be executed from the multiple task queues according to preset rules, and execute corresponding processing strategies according to the types of the request tasks to be executed, so as to realize the sharing of the multiple memory modules by the multiple hosts.

2. The system according to claim 1, wherein: The plurality of preset task queues are divided into a plurality of priorities, and each priority corresponds to a plurality of task queues; The task management module is configured to, after receiving the request task, determine a target priority corresponding to the request task, and determine a target task queue corresponding to the request task among a plurality of task queues corresponding to the target priority.

3. The system according to claim 2, characterized in that The task management module is used to determine the target priority corresponding to the request task according to the type of the request task, and different types of request tasks are preset with corresponding priorities.

4. The system according to claim 3, characterized in that The task management module is used to: Determine a type coefficient of the requested task according to the type of the requested task, and determine a priority coefficient corresponding to the requested task according to the type coefficient; The target priority corresponding to the request task is determined according to the priority coefficient corresponding to the request task and the threshold ranges corresponding to the plurality of priorities.

5. The system according to claim 2, wherein: The task management module is used to determine the target priority corresponding to the request task according to the type and data length of the request task.

6. The system according to claim 5, characterized in that The task management module is used to: Determining a type coefficient of the requested task according to the type of the requested task; Determine the length coefficient of the request task according to the data length of the request task; Determine a priority coefficient corresponding to the requested task according to the type coefficient and the length coefficient; The target priority corresponding to the request task is determined according to the priority coefficient corresponding to the request task and the threshold ranges corresponding to the plurality of priorities.

7. The system according to claim 2, wherein: The task management module is used to determine the target priority corresponding to the request task according to the type of the request task, the data length and the request frequency of the host that issues the request task.

8. The system according to claim 7, characterized in that The task management module is used to: Determining a type coefficient of the requested task according to the type of the requested task; Determine the length coefficient of the request task according to the data length of the request task; Obtain the request frequency of the host that issues the request task, and determine the request task based on the request frequency. The corresponding frequency coefficient; Determine a priority coefficient corresponding to the requested task according to the type coefficient, the length coefficient, and the frequency coefficient; The target priority corresponding to the request task is determined according to the priority coefficient corresponding to the request task and the threshold ranges corresponding to the plurality of priorities.

9. The system according to any one of claims 2 to 8, characterized in that: The task management module is used to: Obtain the total execution time of each of the multiple task queues at the target priority level corresponding to the requested task, and use the task queue with the smallest total execution time as the target task queue corresponding to the requested task; The total duration of execution of each of the multiple task queues is the sum of the execution durations corresponding to all requested tasks contained in each of the multiple task queues.

10. The system according to claim 9, characterized in that Each of the plurality of preset task queues is provided with a counter, and the counter is used to indicate the total time to be executed of the task queue; The task management module is used to obtain the execution duration of the request task after adding the request task to the target task queue, and update the counter of the target task queue according to the execution duration of the request task.

11. The system according to claim 10, wherein: The task management module is used to determine the execution duration corresponding to the request task according to the data length corresponding to the request task and the execution duration corresponding to the preset unit data length.

12. The system according to claim 1, wherein: The task management module is used to detect the length of the target memory address corresponding to the request task after receiving the request task issued by any host, when the type of the request task is a read data operation or a write data operation; When the length of the target memory address is greater than a length threshold, the request task is split into a plurality of sub-request tasks, and target task queues corresponding to the plurality of sub-request tasks are determined.

13. The system according to claim 1, wherein: A memory record table is maintained in the task management module, which records the usage status of the multiple memory modules. The usage status includes the memory block label, memory block size, memory block occupancy status, memory block host identifier and memory block sharing status of each of the multiple memory modules.

14. The system according to claim 13, wherein: When the task management module receives a request task sent by any host and the type of the request task is memory status reading, the task management module is used to obtain the memory record table, generate a memory status result according to the memory status reading object of the request task, and return the memory status result to the host corresponding to the request task.

15. The system according to claim 13, wherein: The task management module is used to obtain request tasks to be executed in parallel from the preset multiple task queues, and execute corresponding processing strategies according to the types of the request tasks to be executed.

16. The system according to claim 13, wherein: The task management module is used to obtain request tasks to be executed in parallel from multiple task queues corresponding to the same priority in order from high to low priority, and execute corresponding processing strategies according to the types of the request tasks to be executed.

17. The system according to claim 15 or 16, characterized in that When the type of the request task to be executed is memory release, the task management module is used to The target released memory address corresponding to the executed request task is changed into unoccupied in the memory record table by changing the occupied state of the memory block corresponding to the target released memory address.

18. The system according to claim 15 or 16, characterized in that When the type of the request task to be executed is a memory request, the task management module is used to determine the target memory address with the requested memory length in the memory record table according to the requested memory length corresponding to the request task to be executed, change the occupancy status of the memory block corresponding to the target memory address to occupied, and configure the host identifier corresponding to the request task to be executed for the target memory address.

19. The system according to claim 15 or 16, characterized in that When the type of the request task to be executed is a read data operation or a write data operation, the task management module is used to determine the target memory module corresponding to the request task to be executed, and send the request task to be executed to the target memory module to perform a read operation or a write operation on the target memory address corresponding to the request task to be executed in the target memory module.

20. The system according to claim 19, wherein: When the target memory module is in another data read operation or data write operation, the task management module adds the request task to be executed to the congestion buffer queue; When the target memory module completes another data read operation or data write operation, the task management module is configured to send the request task to be executed in the congestion buffer queue to the target memory module.

21. The system according to claim 13, wherein: When a new memory module is added to the system, the task management module is used to respond to the operation of the new memory module and add a table entry of the new memory module in the memory record table. The table entry of the new memory module includes the memory block label, memory block size, memory block occupancy status, memory block host identifier and memory block sharing status of the new memory module.

22. The system according to claim 13, wherein: When a memory module is deleted from the system, the task management module is used to respond to the operation of the memory module to be deleted and delete the table entry of the memory module to be deleted in the memory record table. The table entry of the memory module to be deleted includes the memory block label, memory block size, memory block occupancy status, memory block host identifier and memory block sharing status of the memory module to be deleted.

23. The system according to claim 1, wherein: The preset multiple task queues also include a high-speed serial task queue. When receiving a request task from any host that passes the high-speed serial computer expansion bus standard, the task management module is used to add the request task to the high-speed serial task queue.

24. A memory access method, characterized in that: The method is applied to a multi-host shared memory system according to any one of claims 1 to 23, and the method comprises: Any host among multiple hosts issues a request task; The task management module receives the request task sent by any host, determines the target task queue corresponding to the request task in a plurality of preset task queues, and adds the request task to the target task queue; The task management module obtains the request tasks to be executed from the multiple task queues according to preset rules, and executes corresponding processing strategies according to the types of the request tasks to be executed, so as to realize the sharing of the multiple memory modules by the multiple hosts.

25. A memory access method, characterized in that: Applied to the task management module, the method includes: Get the request task issued by any host among multiple hosts; Determine the target task queue corresponding to the requested task in a plurality of preset task queues, and The task is added to the target task queue; Obtain the request tasks to be executed from the multiple task queues according to preset rules, and execute corresponding processing strategies according to the types of the request tasks to be executed, wherein the processing strategies are used to enable the corresponding request tasks to access the memory module.

26. The method according to claim 25, characterized in that The determining of a target task queue corresponding to the requested task from a plurality of preset task queues includes: Determine the target priority corresponding to the request task according to the type of the request task, and determine the target task queue corresponding to the request task among the multiple task queues corresponding to the target priority; wherein, the task management module includes multiple preset task queues, and the multiple preset task queues are divided into multiple priorities, each priority corresponds to multiple task queues, and different types of request tasks are preset with corresponding priorities.

27. A computing and processing device, characterized in that: include: A memory in which a computer-readable code is stored; and one or more processors, wherein when the computer-readable code is executed by the one or more processors, the computing processing device executes the memory access method of claim 24, or executes the memory access method of any one of claims 25-26.

28. A non-volatile readable storage medium, characterized in that The non-volatile readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the memory access method according to claim 24 is executed, or the memory access method according to any one of claims 25-26 is executed.

Citation Information

Patent Citations

  • Multi-host remote direct memory access network management method and device and medium

    CN115934624A

  • Storage device, operating method of storage device, and storage system using the same

    CN116360673A

  • Cache data processing method, equipment and system

    CN116501657A

  • Systems, apparatuses, and methods for performing shared memory operations

    CN117546149A

  • Memory system shared by multiple hosts, memory access method, equipment and storage medium

    CN117806851A