Method, system, and computer-readable storage medium for requesting multiple data items

By assigning unique identifiers to the memory controller and reordering memory transaction requests, the problem of excessive buffer sizes when data items are received out of order is solved, enabling more efficient data processing and reduced power consumption.

CN111124274BActive Publication Date: 2024-10-25ARM LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911037299.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-10-31
Filing Date
2019-10-29
Publication Date
2024-10-25
Estimated Expiration
2039-10-29

AI Technical Summary

Technical Problem

Existing storage systems require larger buffer areas to handle all possible data items when data items are received out of order, resulting in inefficiency and increased power consumption.

Method used

By assigning unique identifiers to multiple memory controllers and reordering memory transaction requests based on these identifiers to ensure that data items are spatially local to the storage device, buffering requested data items when data items are received out of order .

Benefits of technology

The required buffer size is reduced, data processing efficiency is improved, power consumption is reduced, and the number of open/close operations of the storage device is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111124274B_ABST
    Figure CN111124274B_ABST
Patent Text Reader

Abstract

The present disclosure relates to memory transaction request management. A method (200) of requesting data items from a storage device, the method (200) comprising: assigning a unique identifier to each of a plurality of memory controllers (362, 364, 366); and assigning memory transaction requests (310, 320, 330) for accessing data items to the memory controllers (362, 364, 366) based on the unique identifier. The data items are spatially local to each other in the storage device (300). The data items are requested from the storage device (300) via the memory controllers (362, 364, 366) based on the memory transaction requests (310, 320, 330); and then, buffered in the event that the data items are received out of order relative to the order in which the data items were requested.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the management of memory transactions in order to minimize the buffer area required when data items are received out of order from a storage device. Background Art

[0002] The reordering of memory transaction requests enables higher performance of various components of the system. For example, a master station may use memory transaction requests to request data items from a storage device, and each memory transaction request may be assigned a unique identifier so that they can be provided to a dynamic memory controller (DMC) so that the associated data items can be requested from the storage device. However, by assigning an identifier to each memory transaction request, the master station must be able to handle situations where data items are received out of order. Therefore, the master station has a buffer that can temporarily store data items that are received out of order. The buffer must be large enough to store all transactions that have been assigned a unique identifier, because there is no way to determine which data item will be received first, and in the worst case scenario, each data item may be fetched before the first data item is fetched. Summary of the invention

[0003] According to a first aspect of the present disclosure, there is provided a method of requesting data items from a storage device, the method comprising: assigning a unique identifier to each of a plurality of memory controllers; assigning a memory transaction request for accessing data items to the memory controllers based on the unique identifier, wherein the data items are spatially local to each other in the storage device; requesting the data items from the storage device via the memory controllers based on the memory transaction request; and buffering the requested data items if the data items are received out of order relative to the order in which the data items were requested.

[0004] According to a second aspect of the present disclosure, a processor is provided, the processor comprising: an allocation module, the allocation module being used to assign a unique identifier to each of a plurality of memory controllers; an assignment module, the assignment module being used to assign a memory transaction request issued by the processor to one of the memory controllers according to the unique identifier assigned to the memory controller, wherein the memory transaction requests each represent a request for a respective one of a plurality of data items that are spatially local to each other in a storage device; and a buffer, the buffer being used to store data items requested by the memory controller when the data items are received out of order relative to the order in which the data items are requested.

[0005] According to a third aspect of the present disclosure, a transaction management system is provided, comprising: a storage device; a plurality of memory controllers arranged to access the storage device; and a processor for allocating memory transaction requests to each of the plurality of memory controllers to obtain data items that are spatially local to each other in the storage device.

[0006] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, the non-transitory computer-readable storage medium including a set of computer-readable instructions stored thereon, which, when executed by at least one processor, cause the at least one processor to: assign a unique identifier to each of a plurality of memory controllers; assign a memory transaction request for accessing data items to the memory controllers based on the unique identifier, wherein the data items are spatially local to each other in a storage device; request the data items from the storage device via the memory controller based on the memory transaction request; and buffer the requested data items when the data items are received out of order relative to the order in which the data items are requested. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Further features and advantages of the invention will become apparent from the following description, given by way of example only, with reference to the accompanying drawings in which like reference numerals are used to indicate similar features.

[0008] FIG1 schematically shows a storage medium and a processor in the prior art;

[0009] Figure 2 is a flow chart illustrating a method of managing memory transaction requests according to an example;

[0010] Figure 3 schematically illustrates a storage medium and a processor for managing memory transaction requests according to an example;

[0011] Figure 4 schematically illustrates a processor for managing memory transaction requests according to an example; and

[0012] Figure 5 A system for managing memory transaction requests according to an example is schematically illustrated. DETAILED DESCRIPTION

[0013] The details of the systems and methods according to the examples will become apparent from the following description of the reference figures. In this description, for the purpose of illustration, many specific details of certain examples are set forth. Reference to "example" or similar language in the specification means that the features, structures or characteristics described together with the example are included in at least one example, but not necessarily in other examples. It should be further noted that certain examples are schematically described, and certain features are omitted and / or necessarily simplified for ease of illustration and understanding of the concepts underlying the examples.

[0014] In some storage systems, particularly for large data items, a technique of data striping may be used, whereby consecutive segments of a data item are stored on different storage devices, or in some embodiments, in different areas of a single storage device. Striping may be useful when a processor requests data faster than a single storage device can provide it. By spreading the segments across multiple storage devices that can be accessed simultaneously, the overall data throughput is increased. Data striping is commonly used across storage devices in redundant array of independent disks (RAID) storage, network interface controllers, cluster file systems, and different devices in grip-oriented storage, and more commonly in random access memory in some systems.

[0015] Although data striping has the ability to improve performance and throughput, the miss management of data requests can lead to inefficiencies. For example, a system including two storage devices can divide the data into 4 stripes and use multiple memory controllers to increase the speed of reading data items. It should be appreciated that the system can have at least two memory controllers. For example, the fourth stripe can be assigned to the first memory controller, and the first to third stripes can be assigned to the second memory controller, which results in the first memory controller being idle while the first to third stripes are read via the second memory controller, and the first memory controller can only extract the first stripe when the stripe of the second memory controller has been extracted. Therefore, any efficiency that would potentially be obtained by separating the data across different storage devices has been lost. In addition, as a result, the second to fourth stripes cannot be processed, and therefore, they are required to be stored in a buffer. This buffer must be of sufficient size so that all stripe data can be stored in order to cater to the worst-case scenario, whereby the first data item is the last one to be extracted from the storage device.

[0016] To avoid this, transaction requests can be rearranged so that data items or stripes are read to storage in the most efficient manner. This ensures that the efficiency gained by splitting data items across multiple storage devices is maximized.

[0017] Figure 1 schematically illustrates a prior art storage medium 100 (comprising a plurality of data items, such as 140) and a number of memory transaction requests for accessing each data item 140 as represented by the following arrows: 110a, 110b, 110c, collectively 110; 120a, 120b, 120c, collectively 120; and 130a, 130b, 130c, collectively 130. Figure 1 also illustrates a processor 150 having a buffer 155. Each transaction request 110, 120, 130 is issued by a master, such as a processor, and the order in which each data item 140 is accessed depends on the order in which each transaction request 110, 120, 130 is processed by a slave, such as a dynamic memory controller (DMC) 162, 164, 166, arranged to manage access to one or more storage devices. Each memory transaction request 110 , 120 , 130 is provided with a unique identifier (a..i) by the master and is assigned to a DMC 162 , 164 , 166 .

[0018] The order in which memory transaction requests 120, 130, 140 can be assigned to a particular DMC can be carefully managed. For example, to avoid inefficiencies, it is desirable to avoid having a first DMC read a data item, for example, via transaction request 110a, and then subsequently read a data item via transaction request 120a. Because these data items exist in different rows of memory, or in some embodiments may exist in different memory devices entirely. This results in inefficiencies and increased power consumption because it is necessary for the DMC to open and close multiple rows in the memory device 100 at a time. Therefore, it is beneficial for the DMC to issue reads for all data items 140 in a single row of memory 100 at the same time rather than opening a row and then closing the row without reading all data items inside to access another row.

[0019] When reading data items (a..i) from memory, if the data items are requested out of order, for example, the memory controller receives a memory transaction request (i.e., memory transaction request 130c), the data item i read by the processor 150 will not be processed. Therefore, the data item i must be stored in the buffer 155 for use when it can be processed. In this example, the data item i can only be processed when the previous data items a..h have been read from the memory.

[0020] Therefore, the buffer 155 must be large enough to hold the full issue capacity of the memory transaction requests 110, 120, 130. For example, if the master can issue 64 4-beat 16-byte read transactions, the buffer 155 must be at least 4096 bytes in order to be able to hold data items for each possible transaction request. As shown in FIG. 1, the buffer 155 is large enough to hold all memory transaction requests 110, 120, 130, which enables the processor to store data items that are read out of order. That is, the worst case scenario is that the multiple DMCs can read all data items except the first data item, so the processor will not be able to process any of these data items until the first data item is read. As previously explained, this is inefficient because it requires opening and closing the rows of the storage device multiple times, thereby increasing power usage, and requires a buffer with a relatively large area to be able to store the full issue capacity of the master.

[0021] Figure 2 is a flow chart illustrating a method 200 of managing memory transaction requests according to an example. At item 210, a system (such as described below with respect to Figure 5 The memory controllers of the described system 500 are each assigned a unique identifier. As will be described below, the unique identifier can be used to assign memory transaction requests to the memory controller.

[0022] At item 220, each memory controller may be assigned a memory transaction request for requesting a data item from a storage device. The memory transaction request may represent a request for a plurality of spatially local data items. Data items that are spatially local to each other are stored in relatively close storage locations. More specifically, if a particular storage location is referenced at a particular time, it is likely that a nearby storage location will be referenced in the near future. These other storage locations are said to be spatially local. The data items may, for example, have substantially sequential memory addresses, such as from a particular row of a dynamic random access memory. This may be the case when the master is a machine learning accelerator or any other processor that is arranged to issue memory transaction requests for spatially local data items. Since the transaction requests represent spatially local data items, any reordering of the transaction requests to minimize the number of times a particular row of a dynamic random access memory is opened / closed will be unlikely to result in improved efficiency.

[0023] At item 230, the memory controller extracts data items from the storage device according to the memory transaction request. As mentioned above, because the memory transaction request represents a request for spatially local data items, the data items have substantially similar memory access addresses. Therefore, the memory transaction request can request data items from a specific row of the memory. In some embodiments, the memory transaction request can represent a transaction, whereby all data items of a specific row can be read before the row is closed and the second row is opened, which helps ensure the most efficient way to manage data and also reduces power consumption because the number of times a specific row of the memory is required to be opened and / or closed is reduced.

[0024] At item 240, it is determined whether the data item extracted by the memory controller is the desired data item. For example, it can be determined whether the data item is the first data item of a particular unit including multiple data items. If so, the data item is processed at item 260, and if not, the data item is buffered at item 250.

[0025] Once the data item is buffered at item 250, method 200 returns to item 230 where the next data item is fetched. Item 240 is then repeated and a determination is made as to whether the data item is the desired data item. If so, the method proceeds to item 260 where the data item is processed, if not then the data item is added to the buffer at item 250. Steps 230, 240, 250 are repeated until all data items assigned to the memory controller have been processed.

[0026] Once the data item has been processed at item 260, for example because it is the first data item of a particular cell, method 200 proceeds to item 270 where it is determined whether a buffered data item can be processed. For example, after processing the first data item of a particular cell, if the second data item of the cell has been buffered, this data item can now be read from the buffer at item 280 and processed at item 260. If method 200 cannot process the buffered item, the method loops back to item 230 where the next data item is fetched via the memory controller.

[0027] Because each memory transaction request is assigned to a specific memory controller, and the memory transaction request represents a request for a spatially local data item, the required buffer size is substantially smaller than the buffer size described above with respect to Figure 1. In some examples, the size of the buffer may be calculated using the following formula:

[0028]

[0029] For example, if the processor is able to issue 12 4-beat 16-byte read transactions across 3 memory controllers, the system only needs to allocate three unique identifiers, one for each memory controller. Therefore, the buffer only needs 512 bytes ((12 transactions×4 beats×16 bytes) / 3×2), and because the processor issues transaction requests for data with substantially sequential memory access addresses, there is unlikely to be any performance degradation when compared to the system / method previously described with reference to FIG. 1. This is compared to a buffer size of 768 bytes (12 transactions×4 beats×16 bytes) that allocates a unique identifier to each data item.

[0030] Figure 3 A storage medium 300 is shown, along with a number of memory transaction requests for accessing each data item 340 as represented by the following arrows: 310a, 310b, 310c, collectively 310; 320a, 320b, 320c, collectively 320; and 330a, 330b, 330c, collectively 330. FIG. 1 also shows a master 350 having a buffer 355 and three memory controllers 362, 364, 366.

[0031] The master station 350 may be a processor that issues sequential transactions, such as a machine learning processor. Figure 3 In the example shown, there are three memory controllers 362, 364, 366, however, it should be appreciated that there may be two or more memory controllers. The master station 350 also includes a buffer 355 for buffering data items received out of order. It should be appreciated that the memory controllers 362, 364, 366 and the buffer 355, while shown as part of the master station 350, may be separate components, or form part of a separate component of the system, such as a memory access unit.

[0032] As mentioned above, about Figure 2 Each of the memory transaction requests 310, 320, 330 may be assigned to one of the three memory controllers 362, 364, 366. For example, Figure 3 As shown, memory transaction request 310a has been assigned to memory controller B 364, memory transaction request 310b has been assigned to memory controller C 366, and memory transaction request 310c has been assigned to memory controller A 362. In the example where memory transaction request 310b, which has been assigned to memory controller C 366, completes first and memory transaction request 310c, which has been assigned to memory controller A 362, completes second, the data items accessed by those transaction requests cannot be processed by the master 350 because they have been received before the first item of that unit requested by memory transaction request 310a, which has been assigned to memory controller B 364.

[0033] In this case, it is necessary to buffer the data items associated with the memory transaction requests 310b and 310c. Therefore, these data items are stored in the buffer 355. Once the memory controller A 362 has extracted the data item associated with the memory transaction request 310a, this data item can be processed by the master 350 when it is received. The data items associated with the other memory transaction requests 310b, 310c can then be extracted from the buffer 350 and processed in sequence by the master 350.

[0034] As previously mentioned, when the master 350 issues requests for spatially local data items having substantially sequential memory addresses, no benefit is gained from reordering the transaction requests as described above with respect to FIG. 1. Since the data items will generally be requested in order, the memory controller will determine whether the items are received out of order, for example, due to a backlog at a particular memory controller, and assigning each memory transaction request 310, 320, 330 to a particular memory controller 362, 364, 366 means that the size of the buffer 355 can be reduced. The number of items waiting to be processed is directly related to the number of memory controllers. For example, a worst-case scenario is that if four memory controllers are each assigned a memory transaction request, the second data item, the third data item, and the fourth data item are received before the first data item. Therefore, the second data item, the third data item, and the fourth data item need to be buffered so that they can be processed by the master 350 once the first data item is received. Therefore, a large reduction in the size of the buffer can be achieved with a smaller number of memory controllers. That is, if there are two memory controllers, the buffer size can be halved compared to the buffer 155 described above with respect to FIG. 1 , and if there are three memory controllers, the buffer size can be two-thirds the size of the buffer 155 described above with respect to FIG. 1 .

[0035] Because the memory transaction requests 310, 320, 330 represent spatially local data items, the size of the buffer can be reduced. Using the example mentioned above with respect to FIG. 1, by assigning an identifier to each memory controller 362, 364, 366 instead of each transaction, the master 350 (such as a machine learning processor) can issue 12 4-beat 16-byte memory transaction requests, and the buffer size can be reduced to 512 bytes ((12 transactions × 4 beats × 16 bytes) / 3 × 2) instead of 768 bytes (12 transactions × 4 beats × 15 bytes). This therefore reduces the space required for the buffer 355 on the chip, and also reduces costs due to the reduction in the amount of memory required.

[0036] In other embodiments, multiple identifiers may be assigned to each memory controller 310, 320, 330, and transaction requests requesting spatially local data items may be issued using the same identifier of the multiple identifiers assigned to the memory controllers 310, 320, 330. This ensures that memory transaction requests for spatially local data items are assigned to the same memory controller, thereby ensuring that the above-mentioned efficiencies are maintained, and in some examples, are improved considering that such a scheme minimizes the number of accesses to data received out of order.

[0037] Figure 4 Schematically, a processor 400 is shown for requesting a data item from a storage device. As mentioned above, the processor 400 includes an assignment module 410 for assigning a unique identifier to each of a plurality of memory controllers (not shown). In some embodiments, the memory controller may also be formed as described above with respect to Figure 3 Although depicted as part of the processor 400, it will be appreciated that the memory controller may not be part of the processor 400 and form part of a separate memory access unit (not shown).

[0038] The processor 400 also includes an assignment module 420 for assigning a memory transaction request issued by the processor 400 to one of the memory controllers according to the unique identifier. That is, the memory transaction request (such as the one described above with respect to Figure 3 The memory transaction requests 310, 320, 330 described above are distributed to these memory controllers (such as Figure 3 , thereby enabling the memory controller 362 , 364 , 366 to access the data item 340 in the storage device 300 .

[0039] Processor 400 also includes a buffer 430 for storing data items accessed by the memory controller when the data items are received out of order. Figure 3310, 320, 330) are assigned to the memory controller, the data items extracted by the memory transaction request may be received out of order in some examples. For example, the fourth data item of the unit may be received before the first data item of the unit. Therefore, the processor 400 cannot process the fourth data item until the first data item, the second data item, and the third data item have been extracted from the storage device. When the processor 400 issues a memory transaction request for a spatially local data item with a substantially sequential memory address, the buffer size can be smaller than the buffer used to assign identifiers to processors that are not for individual memory transaction requests for spatially local data items, because the order in which the data items will be received depends on the memory controller. In addition, there is no requirement to rearrange the memory transaction requests to reduce the number of open / close operations in the storage device and to more efficiently manage the data extracted from the storage device.

[0040] Figure 5 A system 500 for use with a method for managing memory transactions according to an example is schematically shown. The system 500 includes a master station (such as the one described above) Figure 3 In this example, the system 500 may include a machine learning processor 510, which in some embodiments may be the same as described above with respect to Figure 4 The processor 400 described herein. It should be appreciated that the system may also include alternative and / or additional processors, such as a microprocessor, a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a neural network accelerator (NNA), a neural network processor (NNP) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any suitable combination thereof designed to perform the functions described herein. The system 500 may also or alternatively include a processor implemented as a combination of computing devices (e.g., a combination of a DSP and a microprocessor), multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. The system 500 may also or alternatively include at least one graphics processing unit (GPU). It should be appreciated that a processor (such as a master station for issuing memory transaction requests (such as Figure 3 The processor 510) of 310, 320, 330) can be any processor capable of issuing memory transaction requests for spatially local data items.

[0041] When the processor 510 is a machine learning processor, the processor 510 may include a driver that, for example, provides an interface between software configured to control or configure a neural network, and may be configured to perform processing to implement the neural network. In other examples, a more general processor (such as a CPU or GPU) may be used to implement the neural network.

[0042] The system 500 also includes a plurality of dynamic memory controllers (DMCs) 520a, 520b, 520c, which can be used according to the above Figure 2 The method 200 described herein is used to control access to the storage device 530 of the system 500. The storage device 530 is, for example, external to the machine learning processor 510 and may be a random access memory (RAM) such as DDR-SDRAM (double data rate synchronous dynamic random access memory). In other examples, the storage device 530 may be or include a non-volatile memory such as a read-only memory (ROM) or a solid-state drive (SSD) such as a flash memory. The storage device 530 in the example may include another storage device, such as a magnetic, optical or tape medium, a compact disk (CD), a digital versatile disk (DVD), or other data storage medium. The storage device 530 may be removable or non-removable from the system 500.

[0043] DMC 520a, 520b, 520c can be used in Figure 5 510 as depicted in FIG. 5 , or alternatively, the DMCs 520 a, 520 b, 520 c may form part of the processor, such as Figure 3 In some embodiments, the DMCs 520a, 520b, 520c may form part of a memory access unit that may be external to the processor 510. In further embodiments, it will be appreciated that the system 500 may include the DMCs 520a, 520b, 520c, some of which form part of the processor 510 and some of which are external to the processor 510.

[0044] Figure 5 The components of the system 500 in the example of FIG. 5 are interconnected using a system bus 540. This allows data to be transferred between the various components. Bus 540 can be or include any suitable interface or bus. For example, a system bus 540 can be used. Advanced Microcontroller Bus Architecture Interface, such as Advanced Extensible Interface (AXI).

[0045] The order of the processing steps in the above examples is only an example. In other examples, these processing steps can be performed in different orders.

[0046] It should be understood that any feature described with respect to any one example may be used alone or in combination with other features described, and may also be used in combination with one or more features of any other example or any combination of any other example. In addition, equivalents and modifications not described above may also be adopted without departing from the scope of the appended claims.

Claims

1. A method of requesting a plurality of data items from a storage device, the plurality of data items being requested in a given order, the given order being based on a memory address in the storage device associated with each of the plurality of data items, the method comprising: assigning a unique identifier to each of the plurality of memory controllers; assigning a memory transaction request for accessing a data item to a memory controller based on the unique identifier, wherein each data item associated with the memory transaction request has a sequential memory address in the memory device; requesting the data item from the memory device via the memory controller according to the memory transaction request; receiving the data item from the memory device via the memory controller in accordance with the memory transaction request; determining whether a data item in the received data items is the next data item in the given sequence; and If it is determined that the requested data item is the next data item in the given sequence, processing a data item in the received data items, or If it is determined that the received data item is not the next data item in the given sequence, a data item among the received data items is buffered.

2. The method of claim 1 , further comprising the steps of: The memory transaction requests are ordered across the plurality of memory controllers to reduce an amount of buffering required.

3. A processor, comprising: an allocation module configured to allocate a unique identifier to each of the plurality of memory controllers; a dispatching module for dispatching memory transaction requests issued by the processor to one of the memory controllers based on the unique identifier assigned to the memory controller, wherein the memory transaction requests each represent a request from a memory device for a respective data item of a plurality of data items, wherein the data items associated with the memory transaction requests are requested in a given order based on a memory address associated with each of the data items in the memory device, and wherein the data items associated with the memory transaction requests have sequential memory addresses in the memory device; a determination module configured to determine whether a data item corresponding to the requested data item and received via at least one of the memory controllers is a next data item in the given sequence; a processing module for processing the received data item if it is determined that the requested data item is the next data item in the ordered unit of data items; and A buffer is provided for storing the requested data item if it is determined that the received data item is not the next data item in the ordered unit of data items. 4 . The processor of claim 3 , further comprising an ordering module to order the memory transaction requests across the plurality of memory controllers to minimize an amount of data items in the buffer.

5. The processor according to claim 3, wherein: The processor is a machine learning processor.

6. A transaction management system, comprising: storage device; a plurality of memory controllers arranged to access the storage device; as well as The processor according to claim 3.

7. A non-transitory computer-readable storage medium comprising a set of computer-readable instructions stored thereon, the set of computer-readable instructions, when executed by at least one processor, causing the at least one processor to: assigning a unique identifier to each of the plurality of memory controllers; A memory transaction request for accessing a data item is assigned to a memory controller based on the unique identifier, wherein Each data item associated with the memory transaction request has a sequential memory address in the storage device; requesting the data item from the memory device via the memory controller according to the memory transaction request; receiving the data item from the memory device via the memory controller in accordance with the memory transaction request; determining whether a data item in the received data item is a next data item in a given order based on a memory address in the storage device associated with each data item in the plurality of data items; and If it is determined that the requested data item is the next data item in the given sequence, processing a data item in the received data items, or If it is determined that the received data item is not the next data item in the given sequence, a data item among the received data items is buffered.