WO2018232736A1 - 内存访问技术及计算机系统 - Google Patents

内存访问技术及计算机系统 Download PDF

Info

Publication number
WO2018232736A1
WO2018232736A1 PCT/CN2017/089774 CN2017089774W WO2018232736A1 WO 2018232736 A1 WO2018232736 A1 WO 2018232736A1 CN 2017089774 W CN2017089774 W CN 2017089774W WO 2018232736 A1 WO2018232736 A1 WO 2018232736A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
sub
block
length
memory controller
Prior art date
Application number
PCT/CN2017/089774
Other languages
English (en)
French (fr)
Inventor
肖世海
朗诺斯弗洛里安
杨伟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to KR1020217039534A priority Critical patent/KR102443106B1/ko
Priority to CN201780043116.5A priority patent/CN109478168B/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP17914958.8A priority patent/EP3480702B1/en
Priority to KR1020207001375A priority patent/KR102336232B1/ko
Priority to KR1020227031161A priority patent/KR102532173B1/ko
Priority to PCT/CN2017/089774 priority patent/WO2018232736A1/zh
Priority to EP22188013.1A priority patent/EP4152166A3/en
Priority to ES17914958T priority patent/ES2840423T3/es
Priority to BR112019026942-8A priority patent/BR112019026942B1/pt
Priority to JP2019570989A priority patent/JP6900518B2/ja
Priority to EP20195180.3A priority patent/EP3822798B1/en
Publication of WO2018232736A1 publication Critical patent/WO2018232736A1/zh
Priority to US16/284,609 priority patent/US10732876B2/en
Priority to US16/927,066 priority patent/US11231864B2/en
Priority to JP2021099325A priority patent/JP7162102B2/ja
Priority to US17/569,911 priority patent/US11681452B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1673Details of memory controller using buffers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a memory access technology and a computer system.
  • a non-volatile dual in-line memory module is a computer random access memory (RAM).
  • the NVDIMM can include a plurality of non-volatile memory (NVM) chips. NVDIMMs retain full memory data when the system is completely powered down. It can be understood that the NVM chip on the NVDIMM may specifically be a non-volatile random access memory (NVRAM).
  • the NVM on the NVDIMM may include a phase change memory (PCM), a resistive random access memory (RRAM), a magnetic random access memory (MRAM), and a spin torque conversion. Magnetic random access memory (SPR-transfer torque MRAM, STT MRAM) and the like.
  • NVDIMMs communicate with the memory controller using the NVDIMM-P protocol.
  • the NVDIMM-P protocol is a bus access protocol compatible with the double data rate (DDR) protocol.
  • processors typically have read requirements for reading data of different lengths. Therefore, the processor may send a memory access request to the memory controller for reading data of different lengths. For example, the processor may send a 64B (Byte) fetch request or a 128B fetch request to the memory controller as needed.
  • the memory controller typically sends a read command to the NVDIMM for reading a fixed length of data. For example, in one case, the memory controller can send a read command to the NVDIMM for reading 64B data.
  • the memory controller when the memory controller receives the memory access request for reading the 128B data, the memory controller needs to split the memory access request into two 64B read commands and pass the two A read command reads the 128B of data required by the processor from the NVDIMM. This type of processing wastes the bandwidth of the command bus and affects system performance.
  • the memory controller fixedly sends a read command to the NVDIMM for reading 128B data.
  • the memory controller needs to change the 64B memory access request to the 128B read command and send the data to the NVDIMM. The 128B read command. Obviously, this approach wastes the bandwidth of the data bus.
  • the memory access technology and the computer system provided in the application can support reading commands of different lengths of data and improve system performance without wasting bus bandwidth.
  • the application provides a computer system.
  • the computer system includes a memory controller, a media controller, and a non-volatile memory NVM coupled to the media controller. Said NVM is used to store data.
  • the memory controller is coupled to the media controller. After the memory controller sends a first read command to the media controller, the media controller may read the first data from the NVM according to a first address in the first read command.
  • the first read command carries a first ID, the first address, and a first length, where the first ID is an identifier of the first read command, and the first length is used to indicate the The size of the first data to be read by the first read command.
  • the memory controller sends at least two Send commands to the media controller, wherein the at least two send commands are configured to acquire at least two third lengths of data, the third length being less than the first length .
  • the media controller returns, to the memory controller, at least two sub-blocks of the third length and metadata of the at least two sub-blocks in response to the at least two send commands.
  • the metadata includes the first ID and a location identifier, where the location identifier is used to indicate an offset of the corresponding sub-block in the first data.
  • the memory controller merges the at least two sub-blocks into the first data according to a location identifier in metadata of the at least two sub-blocks.
  • the computer system provided by the present application can support the system's memory access request without increasing the read command when receiving the memory access request for acquiring larger data. This can reduce the waste of bus bandwidth and improve system performance.
  • the location identifier is at least one bit.
  • the communication between the memory controller and the media controller is compliant with the NVDIMM-P protocol.
  • the memory controller is further configured to send a second read command to the media controller, where the second read command carries a second ID, a second An address and a second length, the second length being used to indicate a size of the second data to be read by the second read command.
  • the media controller is further configured to acquire the second data from the NVM according to the second address.
  • the memory controller is further configured to send a second Send command to the media controller, where the second send command is used to acquire the data block of the third length, and the second length is equal to the third length.
  • the media controller is further configured to, in response to the second send command, return the metadata of the second data and the second data to the memory controller, where the metadata of the second data is carried Said second ID.
  • the computer system provided by the present application can support reading requirements of reading data of different lengths without increasing the number of read commands and not wasting bus bandwidth. Improved system performance.
  • the media controller is further configured to divide the first data read from the NVM into The at least two sub-blocks are buffered, and metadata of the at least two sub-blocks is recorded.
  • the metadata of each of the sub-blocks further includes a transmission identifier, where the transmission identifier is used to indicate Whether the sub-data block is the last sub-block of data to be transmitted in the first data.
  • the computer system also includes a cache for buffering at least two sub-blocks of the first data read from the NVM and the second data.
  • the media controller is further configured to: when the second data is located in the cache after the first sub-block of the first data, and before the second sub-block of the first data, The second data is sent to the memory controller in preference to the first sub-data block.
  • the transmission identifier of the first sub-block indicates that the first sub-block is not in the first data.
  • the last sub-block to be transmitted the transmission identifier of the second sub-block indicates that the second sub-block is the last sub-block to be transmitted in the first data.
  • the computer system provided by the present application carries the identifier to be transmitted in the metadata of the sub-block returned by the media controller to the memory controller, so that the media controller can transmit according to the process in returning data to the memory controller.
  • the identifier adjusts the sending order of the sub-blocks sent to the memory controller, thereby not only processing the read command for reading data of different lengths, but also reducing the waiting delay of the memory controller 106 receiving the data, thereby further improving the processing of the computer system. effectiveness.
  • the computer system further includes a processor.
  • the processor is configured to send a first memory access request to the memory controller.
  • the first memory access request includes the first ID, the first address, and the first length.
  • the memory controller is further configured to send the first read command to the media controller according to the first memory access request. According to the computer system of this possible implementation, even if a memory access request for reading large data is received by the processor, the memory access request sent by the processor is not changed. A small data read command can reduce the number of read commands, save bus bandwidth, and improve the performance of the computer system compared with the prior art.
  • the application provides a memory.
  • the memory includes a non-volatile memory NVM and a media controller coupled to the NVM.
  • the NVM is used to store data.
  • the media controller is configured to receive a first read command sent by a memory controller in the computer system, and read the first data from the NVM according to the first address in the first read command.
  • the first read command carries a first ID, the first address, and a first length, where the first ID is an identifier of the first read command, and the first length is used to indicate the The size of the first data to be read by the first read command.
  • the media controller After receiving the at least two Send commands sent by the memory controller, the media controller returns at least two sub-lengths of the third length to the memory controller in response to the at least two send commands sent by the memory controller A data block and metadata of the at least two sub-blocks.
  • the at least two send commands are used to obtain data of a third length, where the third length is smaller than the first length.
  • the first ID and the location identifier are included in the metadata of each sub-block.
  • the location identifier is used to indicate an offset of the corresponding sub-block in the first data, so that the at least two sub-blocks can be merged into a location according to location identifiers in the at least two sub-blocks
  • the first data is described.
  • the medium memory is further configured to receive a second read command sent by the memory controller, and according to a second address in the second read command
  • the second data is obtained in the NVM.
  • the second read command carries a second ID, a second address, and a second length, where the second length is used to indicate a size of the second data to be read by the second read command.
  • the media controller After receiving the second send command sent by the memory controller, the media controller returns the metadata of the second data and the second data to the memory controller in response to the second send command .
  • the second send command is used to obtain the data block of the third length, the second length is equal to the third length, and the second ID is carried in the metadata of the second data.
  • the memory further includes a cache, where the cache is used to cache the first number read by the media memory from the NVM According to the at least two sub-blocks.
  • the media controller is further configured to record metadata of the at least two sub-blocks.
  • the metadata of each of the sub-blocks further includes a transmission identifier, where the transmission identifier is used to indicate Whether the sub-data block is the last sub-block of data to be transmitted in the first data.
  • the cache is further configured to cache the second data.
  • the media controller is further configured to: when the second data is located in the cache after the first sub-block of the first data, and before the second sub-block of the first data, The second data is sent to the memory controller in preference to the first sub-data block.
  • the transmission identifier of the first sub-block indicates that the first sub-block is not the last sub-block to be transmitted in the first data
  • the transmission identifier of the second sub-block indicates the The two sub-blocks are the last sub-block of the first data to be transmitted.
  • the present application provides a memory access method, which is applied to the computer system provided by any one of the foregoing first aspect or the first aspect, or the first aspect or the first aspect.
  • the functionality of a computer system provided by any of the possible implementations.
  • the present application provides yet another memory access method.
  • the method is implemented by the media controller in the computer system provided by the foregoing first aspect or any one of the possible implementation manners of the first aspect, for implementing the foregoing first aspect or any one of the possible implementation manners of the first aspect Provides the functionality of a media controller in a computer system.
  • the present application provides yet another memory access method.
  • the method is implemented by the memory controller in the computer system provided by the foregoing first aspect or any one of the possible implementation manners of the first aspect, for implementing the foregoing first aspect or any one of the possible implementation manners of the first aspect Provides the functionality of a memory controller in a computer system.
  • the application provides a memory controller.
  • the memory controller includes a communication interface and a control circuit coupled to the communication interface.
  • the communication interface is configured to send a first read command to the media controller in the computer system, where the first read command carries a first ID, a first address, and a first length, and the first ID is the first And an identifier of the read command, where the first length is used to indicate a size of the first data to be read by the first read command.
  • the communication interface is further configured to send at least two Send commands to the media controller, and receive at least two sub-blocks of the third length that are sent by the media controller in response to the at least two send commands, and the at least two The metadata of the sub-blocks.
  • the at least two send commands are configured to acquire data of at least two of the third lengths, where the third length is smaller than the first length.
  • the at least two sub-blocks are obtained by the media controller from the non-volatile memory NVM in the computer system according to the first address.
  • the first ID and the location identifier are included in the metadata of each sub-block, and the location identifier is used to indicate a location of the corresponding sub-block in the first data.
  • the control circuit is configured to merge the at least two sub-data blocks into the first data according to a location identifier in metadata of the at least two sub-blocks.
  • the communication interface is further configured to send a second read command to the media controller.
  • the second read command carries a second ID, a second address, and a second length, where the second length is used to indicate that the second read command is to be read.
  • the size of the second data taken.
  • the communication interface sends a second send command to the media controller, and receives metadata of the second data and the second data returned by the media controller according to the second send command.
  • the second send command is used to acquire the data block of the third length, and the second length is equal to the third length.
  • the second data is obtained by the media controller from the NVM according to the second address, and the second ID is carried in the metadata of the second data.
  • the present application further provides a computer program product, comprising program code, the program code comprising instructions executed by a computer to implement the method described in the third aspect, the fourth aspect or the fifth aspect .
  • the present application further provides a computer readable storage medium for storing program code, the program code comprising instructions executed by a computer to implement the foregoing third aspect, The method described in the four aspects or the fifth aspect.
  • FIG. 1 is a schematic structural diagram of a computer system according to an embodiment of the present invention.
  • FIG. 2 is a signaling diagram of a memory access method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a data structure of a read command according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of a data structure returned by a media controller to a memory controller according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of a data structure of metadata in data returned by a media controller to a memory controller according to an embodiment of the present disclosure
  • FIG. 6 is a signaling diagram of still another memory access method according to an embodiment of the present invention.
  • FIG. 7 is a flowchart of a scheduling method according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a scheduling method according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of still another scheduling method according to an embodiment of the present invention.
  • FIG. 1 is a schematic structural diagram of a computer system according to an embodiment of the present invention.
  • the computer system 100 can include at least a processor 102, a memory controller 106, and a non-volatile dual in-line memory module (NVDIMM) 108.
  • memory controller 106 can be integrated into processor 102.
  • the computer system 100 may further include a communication interface and other devices such as a disk that is externally stored, and is not limited herein.
  • Processor 102 is the computing core and control unit of computer system 100.
  • a plurality of processor cores 104 may be included in the processor 102.
  • Processor 102 can be a very large scale integrated circuit.
  • An operating system and other software programs are installed in the processor 102 such that the processor 102 can access NVDIMMs 108, caches, and disks.
  • the Core 104 in the processor 102 may be, for example, a central processing unit (CPU), or may be an application specific integrated circuit (ASIC).
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • a memory controller 106 is a bus circuit controller that internally controls the NVDIMM 108 and manages and schedules data transfers between the NVDIMM 108 and the Core 104. Data can be exchanged between NVDIMM 108 and Core 104 via memory controller 106.
  • the memory controller 106 can be a separate chip and is coupled to the Core 104 via a system bus. Those skilled in the art will appreciate that the memory controller 106 can also be integrated into the processor 102 (as shown in Figure 1) or can be built into the Northbridge. The specific location of the memory controller 106 is not limited in the embodiment of the present invention.
  • the memory controller 106 can include a communication interface 1062 and a control circuit 1064 that can communicate with the processor 102 and the NVDIMM 108 via the communication interface 1062.
  • Memory controller 106 can control circuitry 1064 to control the logic necessary to write data to or read data from NVDIMM 108.
  • NVDIMM 108 is a random access memory RAM of computer system 100 that can be used as memory or storage for computer system 100.
  • the NVDIMM 108 can include a media controller 110, at least one non-volatile memory NVM 112, and a cache 114.
  • the media controller 110 can include logic circuitry with control capabilities.
  • the NVM 112 is used to store various running software in the operating system, input and output data, and information exchanged with external storage. Among them, the NVM 112 can exist in the form of a chip.
  • the NVM 112 may include a phase change memory (PCM), a resistive random access memory (RRAM), a magnetic random access memory (MRAM), and Spin-transfer torque MRAM (STT MRAM) can be used as a non-volatile memory for memory.
  • PCM phase change memory
  • RRAM resistive random access memory
  • MRAM magnetic random access memory
  • STT MRAM Spin-transfer torque MRAM
  • Memory controller 106 is coupled to NVDIMM 108 via bus 105. Communication between the memory controller 106 and the NVDIMM 108 is compliant with the NVDIMM-P protocol.
  • the NVDIMM-P protocol is a bus access protocol compatible with the double data rate (DDR) protocol.
  • the media controller 110 can access data stored in the NVM 112 in accordance with a memory access command of the memory controller 106. It can be understood that the memory access command sent by the memory controller 106 can be a read command or a write command.
  • the media controller 110 can read data from the NVM 112 according to a read command sent by the memory controller 106, or the media controller 110 can also write data into the NVM 112 according to a write command sent by the memory controller 106.
  • the bus 105 in the embodiment of the present invention may include a data bus, a command/address bus, and a read data ready feedback line.
  • the data bus is used to transmit data and metadata.
  • the command/address bus is used to transfer read commands such as read commands and write commands.
  • Read data preparation feedback line for sending for notification
  • the data to be read by the memory controller 106 has been ready for the ready signal in the NVDIMM.
  • the memory controller 106 when the memory controller 106 reads data from the NVDIMM 108 via the bus 105, the memory controller 106 first sends a read command based on the command/address bus.
  • the media controller 110 in the NVDIMM 108 After the media controller 110 in the NVDIMM 108 acquires the data to be read from the NVM 112 based on the target address in the read command, the NVDIMM 108 transmits to the memory controller 106 via the read data ready feedback line for notifying that the data is already present.
  • the ready signal is prepared in the NVDIMM.
  • the memory controller 106 After receiving the Ready signal sent by the NVDIMM 108, the memory controller 106 sends a send command for acquiring data to the NVDIMM 108 via the command/address bus. After the memory controller 106 sends a fixed time delay of the send command, the media controller 110 returns the data prepared in its cache to the memory controller 106 via the data bus. Since the NVDIMM-P protocol supports out-of-order execution of NVM read commands, in actual applications, the memory controller 106 cannot know which read command data the data returned by the media controller 110 is when sending the send command.
  • the cache 114 is used to cache data that the media controller 110 reads from the NVM 112.
  • Cache 114 can contain a cache queue. Typically, cache queues cache data in a first-in, first-out order.
  • the media controller 110 can schedule the data in the cache 114 in accordance with the order of the data in the cache 114. For example, the media controller 110 may send the cached data to the memory controller 106 in the order in which the data cached in the cache queue, or write the data to the NVM 112. In the embodiment of the present invention, the media controller 110 may not schedule data in a first-in first-out order, but schedule the data in the cache team according to the priority of the data or according to the application requirements. It can be understood that, in practical applications, a write buffer (not shown in FIG. 1) for buffering data to be written to the NVM 112 may also be included in the NVDIMM 108.
  • the NVDIMM-P bus protocol is compatible with the standard DDR bus protocol, its data bus is multiplexed. In this way, the write command sent by the memory controller and the send command for getting the data are all multiplexed with the same data bus. Therefore, in order to prevent conflicts of commands on the bus, when the memory controller sends a send command to the media controller, it must determine the transmission time of the data returned according to the send command, so as to be able to determine the transmission time of the next command. Thereby, it is possible to accurately schedule each memory access command.
  • the memory controller cannot know that the data returned by the media controller 110 belongs to when the send command is sent. Which reads the data of the command, so that the length of the data it receives cannot be known. Further, the memory controller cannot determine the transmission time of the returned data when sending the send command. For the above reasons, as previously discussed, in the prior art, the memory controller 106 typically sends a fixed length read command to the NVDIMM 108. For example, the memory controller 106 sends a read command for reading 64B data or a read command for reading 128B data to the NVDIMM 108.
  • the manner in which the memory controller 106 sends a fixed-length read command to the NVDIMM 108 may cause an increase in the number of read commands or waste the bandwidth of the bus 105, thereby affecting system performance.
  • the internal memory of the NVDIMM usually needs to be wear-balanced according to the received memory access command, and the increase of the number of commands may increase the work of performing wear leveling. Therefore, the memory access method in the prior art is also disadvantageous for system performance improvement. Therefore, in order not to waste bandwidth and improve system performance, a memory controller 106 can be provided to support A computer system that reads data of different lengths in NVDIMM 108 is necessary.
  • FIG. 2 is a signaling diagram of a data reading method according to an embodiment of the present invention. As shown in FIG. 2, the method can include the following steps.
  • the processor 102 sends a first memory access request to the memory controller 106.
  • the first memory address carries a first logical address and a first length, where the first length is used to indicate a size of the first data to be read by the processor 102, where the first logical address is used for Indicates the address of the first data to be read.
  • the memory controller 106 sends a first read command to the media controller 110 according to the first memory access request, where the first read command carries a first ID, a first address, and a first length.
  • the first length is used to indicate the size of the first data to be read by the first read command.
  • the first address is used to indicate a physical address of the first data in the NVM 112.
  • FIG. 3 is a schematic diagram of a data structure of an XREAD command according to an embodiment of the present invention.
  • An XREAD command is transmitted in two cycles.
  • the chip select (CS) of the first cycle is low (L)
  • the second cycle is followed by the first cycle
  • the second cycle is sliced.
  • the selected signal is high (H).
  • Each cycle in turn includes the rising edge of the clock and the falling edge of the clock.
  • the information transmitted on the rising edge of the clock can be found in the "Command/Address Signal Rising CLK_t” section in Figure 3.
  • Information on the falling edge of the clock can be found in the "Command/Address Signal Falling CLK_t” section in Figure 3.
  • the following fields may be included in the XREAD command provided by the embodiment of the present invention.
  • the "CS" bit is a chip select signal field that indicates whether the NVDIMM is selected.
  • the Length[2:0] field is used to indicate the length of the data to be read by the XREAD command.
  • the ADDR[11:5] and ADDR[4:1] fields are used to indicate the address of the data to be read by the XREAD command.
  • the RID[9:7] and RID[6:0] fields are used to indicate the ID of the XREAD command.
  • the "RFU" field is an unused reserved field.
  • the first read command may include a first ID of the first read command, and the first ID is an identifier of the first read command.
  • the first ID may be identified by the RID[9:7] and RID[6:0] fields in FIG.
  • the first read command may further include an address of the data to be read.
  • the address of the data to be read carried in the first read command is referred to as a first address.
  • the first address can be identified by the ADDR[11:5] and ADDR[4:1] fields shown in FIG. It should be noted that the first address is the physical address of the first data in the NVM 112.
  • the (multi-length) read command in the first read command sent by the memory controller 106 to the media controller 110, also needs to adopt a partial field to indicate the length of the first data to be read by the first read command.
  • the length of the first data can be indicated by the "Length[2:0]” field in FIG.
  • the "Length[2:0]” field can be used to indicate how many 64B (byte) blocks the memory controller 106 is to read. For example, as shown in FIG.
  • the "Length[2:0]” field may have 3 bits, and the "Length[2:0]” field may be represented as 000 to 111, correspondingly, the "Length[2:0]” field.
  • the data that can be used for the indicated memory controller to be read can be 64B to 512B in length.
  • computer system 100 can support a read operation of reading 512B data at a time, according to the data format of the XREAD command shown in FIG.
  • the "Length[2:0]" field in FIG. 3 is only an example, and the length of the data to be read is not limited. In practical applications, more reserved fields can also be used to indicate the length of the data to be read.
  • the "RFU" field shown in FIG. 3 can also be used to indicate the length of data to be read.
  • the field for indicating the length of the data to be read may include 4 bits, and the value that the field can indicate may be from 0000 to 1111.
  • the size of the data to be read indicated by the “Length[2:0]” field is exemplified by the 64B granularity. According to this manner, the size of the data to be read is 64B. Multiples. In the actual application, the "Length[2:0]" field indicates that the size may be 32B, 128B or other sizes, which is not limited in the embodiment of the present invention.
  • the media controller 110 reads the first data from the NVM 112 based on the first address. Specifically, the media controller 110 can read the first data from the NVM 112 according to the first address and the first length. After reading the first data, the media controller 110 may cache the first data in a buffer. In the embodiment of the present invention, after reading the first data, the media controller 110 may perform block buffering according to the granularity of 64B according to the first data. For example, if the first length is 128B, the first data can be divided into two 64B data blocks, which are respectively cached in the cache 114 of the NVDIMM 108.
  • the ID of the read command to which the data block belongs and the location of the data block in the data to be read by the read command may be identified in each data block. For example, if the first length of the first data is 128B, the media controller 110 may divide the first data into the first sub-block and the second sub-block for buffering, and record in the metadata information of the first sub-block. a first ID and a location of the first sub-block in the first data. The position of the first sub-block in the first data refers to the offset of the first sub-block in the first data.
  • the first sub-block may be recorded in the metadata of the first sub-block.
  • the location information is 1, and the location information of the second sub-block is recorded as 0 in the metadata of the second sub-block.
  • the position indication bit in the metadata of the data block can be more than just one bit, and a field with multiple bits can be used to indicate the position of the data block in the data to be read. For example, if the position of the data block is indicated by a field of 3 bits, it is possible to use 000 to 111 to respectively indicate 8 different positions of each data block in the data to be read.
  • the media controller 110 sends a ready signal to the memory controller 106.
  • the ready signal is used to notify the memory controller 106 to cache data to be read in the buffer of the media controller 110.
  • the NVDIMM-P protocol defines a ready signal for feedback data during the reading of data. This is also a difference between the NVDIMM-P protocol and the DDR bus protocol.
  • the Ready signal is used to notify the memory controller that the NVDIMM has prepared the data to be read by the memory controller. After receiving the Ready signal, the memory controller can obtain the prepared data from the buffer of the NVDIMM through the send command.
  • the memory controller 106 sends a send command to the media controller 110.
  • the send command is used to read a data block of a third length in the NVDIMM cache.
  • the media controller sends a ready signal to the memory controller 106. Since the NVDIMM-P protocol supports out-of-order execution of NVM read commands, the memory controller 106 does not know at this time which read command data is being prepared by the NVDIMM. As described above, in the case of processing a read command for reading variable length data, the memory controller 106 does not know the size of the data retrieved when sending the send command to the media controller 110, and thus cannot determine The transfer time of the returned data.
  • the memory controller 106 in order not to cause disorder of commands on the bus, even if the memory access request sent by the processor reads data of different lengths, the memory controller 106 is still used to obtain a fixed length (for example, The third length) of the data is sent in the way of the send command. According to this manner, even if the size of the data to be read by the different memory access requests is different, since the length of the data acquired once is fixed, the transmission time of the data returned by the media controller 110 can be determined, so that the memory controller 106
  • the send command may be sent to the media controller 110 in accordance with a fixed data transfer time to acquire data to be read from the NVDIMM.
  • the third length can be set according to an actual application. In practical applications, the third length may be 64B in order not to waste bandwidth.
  • the media controller 110 returns a third length of data block and corresponding metadata to the memory controller 106 according to the send command.
  • the metadata of the data refers to information used to describe the data.
  • the data block is usually returned together with the corresponding metadata.
  • the data block of the third length returned by the media controller 110 and the corresponding metadata may also be collectively referred to as returned data.
  • the format of the data returned by the media controller 110 can be as described in FIG. As shown in FIG.
  • the returned data may include the following information: Data 402, ECC 404, ID 406, and Location 408.
  • the Data 402 field is the data block of the third length.
  • the Data 402 field can be a 64B data block. It can be understood that the third length can be set according to actual needs. For example, the third length can be set to 64B or 128B as long as it is a fixed length.
  • the ECC 404 field is used to indicate error correction information of the data block. In practical applications, the ECC 404 field can occupy 12B. Moreover, in actual applications, the ECC 404 field may not be included in the returned data.
  • the ID 406 field is used to refer to Show the read command to which the data block belongs.
  • the media controller 110 is configured according to the memory controller 106.
  • the ID of the first sub-block and the ID of the second sub-block may both be the ID of the first read command.
  • Location 408 is used to indicate the location of the returned sub-block of data in the data to be read by the read command indicated by ID 406. For example, when the media controller 110 returns the first sub-block, Location 408 may be "1" and the first sub-block for return is the high 64B of the data to be read by the first read command.
  • FIG. 5 is a schematic structural diagram of metadata of a data block returned according to a send command according to an embodiment of the present invention.
  • M0 and M1 are used to indicate signals transmitted on the two signal lines of the transmission metadata.
  • the "RID” field is used to indicate the read command to which the data block belongs.
  • the memory controller 106 can identify which read data the returned data block is read according to the "RID” field.
  • the "SB” field is used to indicate the offset of the returned data block in the data to be read by the read command indicated by the "RID” field.
  • the RID occupies 10 bits, and the SB occupies 3 bits for description.
  • the RID information in the metadata corresponds to the RID[9:7] and RID[6:0] fields in the XREAD command shown in FIG. 3, and is used to indicate the read command to which the sub-block belongs.
  • the three bits occupied by the SB are used to correspond to the three bits in "Length[2:0]" in the XREAD command shown in FIG.
  • media controller 110 will send a ready signal to memory controller 106 when there is data in cache 114 for buffering read data to be returned in NVDIMM 108.
  • the memory controller 106 After receiving the ready signal sent by the media controller 110, the memory controller 106 sends a send command to the media controller 110. After receiving the send command, the media controller 110 returns the data block of the third length of the send command to the memory controller 106. Therefore, it can be understood that when the data to be read by a certain read command is large, for example, greater than the set third length, then at least two steps 208 to 212 need to be performed to completely read the NVDIMM from the NVDIMM. Read the data to be read by the command.
  • the first data is greater than the third length
  • the memory controller needs to send at least two send commands to retrieve the first data from the NVDIMM.
  • the memory controller 106 transmits at least two send commands to the memory controller 106 to transmit at least two sub-blocks of the first data, respectively, in response to the at least two send commands.
  • the memory controller 106 obtains the first data according to the received at least two sub-blocks. Specifically, after receiving the data returned by the media controller 110 according to the send instruction, the memory controller 106 may determine the read command to which the sub-data block belongs according to the metadata of the returned sub-block. In the embodiment of the present invention, the first data to be read by the first read command is greater than the third length as an example. After the memory controller 106 receives the at least two sub-blocks including the first ID, the sub-data blocks in the first data may be respectively obtained according to the SB field in the metadata of the at least two data blocks. The memory controller 106 is configured to obtain the first data from at least two sub-blocks including the first ID according to an offset of each sub-block in the first data. In step 216, the memory controller 106 returns the first data to the processor 102.
  • FIG. 6 is a signaling diagram of a memory access method in still another case according to an embodiment of the present disclosure. As shown in Figure 6, the method can include the following steps.
  • step 602 the processor sends a second memory access request to the memory controller 106.
  • the second memory access request includes a second length of the second data to be read, where the second length is not greater than the third length.
  • the description is made by taking the second data as 64B as an example.
  • the memory controller 106 sends a second read command to the media controller 110.
  • the second read command includes a second ID, a second address, and the second length.
  • the data format of the second read command may also be as shown in FIG. 3.
  • the second length is used to indicate a size of the second data to be read by the second read command.
  • the media controller 110 reads the second data from the NVM 112. Similar to step 206, media controller 110 can read the second data from NVM 112 based on the second address and the second length. And reading the read second data in a cache of the NVDIMM.
  • the metadata of the second data may include an ID of the second read command and a location of the second data. Since the second data is small, the media controller 110 does not have to perform block caching of the second data.
  • the media controller 110 sends a ready signal to the memory controller 106.
  • the memory controller 106 sends a send command to the media controller 110.
  • the media controller 110 returns the second data and the metadata of the second data to the memory controller 106.
  • the data format returned by the media controller 106 can be as shown in FIG. 4.
  • the metadata of the second data can be as shown in FIG. Since the size of the second data is 64B, after the memory controller obtains the second data returned by the media controller 110, in step 614, the memory controller 106 can directly return the second data to the processor 102.
  • the metadata of the second data may be The location identifier is set to 000 to indicate that the second data has only one data block.
  • the memory controller 106 receives the second data returned by the media controller 110, it may be learned that the data belongs to the second according to the second ID in the metadata of the second data.
  • the memory controller 106 can know that the second data has only one data block, so that the memory controller 106 can The location identifier in the metadata of the second data is considered to be a meaningless identifier.
  • the embodiment shown in FIG. 6 is similar to the embodiment shown in FIG. 2. Therefore, the relevant steps in the embodiment shown in FIG. 6 can be specifically referred to the description of the corresponding steps in FIG. 2.
  • the memory controller 106 can retrieve the second data by a send command. Therefore, after the memory controller 106 obtains the second read command to be read according to the metadata of the second data returned by the media controller 110, the memory controller may directly return to the processor 102. The second data.
  • the computer system 100 provided by the embodiment of the present invention can process multiple different read commands of different NVM 112 chips in parallel.
  • computer system 100 can process the first read command and the second read command in parallel.
  • 2 and 6 are merely schematic illustrations of a method of performing a read command for reading different lengths of data processed by computer system 100.
  • the computer system 100 provided by the embodiment of the present invention can also support out-of-order execution of read commands.
  • the various steps in Figure 2 may be performed in cross-over with the various steps in Figure 6.
  • the memory controller may perform step 604.
  • the media controller returns data to the memory controller 106, it may first return to at least part of the first data in the first data to be read shown in FIG. 2, or may return to the second in FIG. Read the second data of the command to be read. Therefore, in the embodiment of the present invention, the execution order of each step of the memory access method shown in FIG. 2 and FIG. 6 is not limited.
  • the memory controller 106 can send the NVDIMM 108 for reading different lengths according to the received memory access request. Read command for data.
  • the memory controller 106 sends a first read command for reading larger data (eg, first data)
  • the memory controller 106 can send at least two for reading the fixed length to the media controller in the NVDIMM 108 ( For example, a send command of data of a third length, wherein the third length is less than the first length.
  • the media controller 110 may receive at least two third-length sub-blocks and metadata from the memory controller 106 according to the received at least two send commands, where the metadata corresponding to each sub-block includes the sub-data for indicating the sub-data.
  • the location identifier of the block in the first data can merge the at least two sub-blocks into the first data according to the location identifier in the metadata of the returned at least two sub-blocks.
  • a plurality of read commands to be read may be cached in the cache 114 of the NVDIMM 108.
  • the media controller 110 sends a ready message to the memory controller 106 to notify the memory controller 106 to fetch data.
  • the waiting delay of the memory controller can also be reduced by optimizing the scheduling order of the data blocks in the cache. The following is a detailed description of how the computer system 100 provided by the embodiment of the present invention optimizes the waiting time delay when the memory controller acquires data according to FIG. 5 and FIG. 7 .
  • a transmission identifier may be added to the metadata shown in FIG. 5.
  • the transmission identifier LB only occupies one bit in the metadata shown in FIG. 5, and specifically, may be from the metadata structure shown in FIG. Among the unused bits (for example, the bit indicated by the RFU in FIG. 5), one bit is selected as the transmission identifier.
  • the transmission identifier is used to indicate whether the sub-data block is the last data block to be transmitted in the data to be read by the read command indicated by the RID.
  • any one of the at least two sub-blocks may be used as the last sub-block of the first data to be transmitted.
  • the determined LB bit in the metadata of the last sub-block to be transmitted may be identified as "1”
  • the LB bit in the metadata of the other sub-blocks in the first data may be The identifier is "0". It can be understood that “1” is only an example for indicating that the sub-block is the identifier of the last sub-block to be transmitted, and “0” is only used to indicate that the sub-block is not the last one to be transmitted.
  • the identifier of the sub-block other identifiers may be used in the actual application, which is not limited herein.
  • the media controller 110 may optimize the cache in step 212 shown in FIG. 2 and step 612 shown in FIG. The return order of the sub-blocks of each read command cached in 114.
  • FIG. 7 is a flowchart of a scheduling method according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a scheduling method according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of still another scheduling method according to an embodiment of the present invention.
  • the media controller 110 may employ the following steps when returning data blocks to the memory controller 106.
  • the media controller 110 determines that the second data is located in the cache 114 after the first sub-block of the first data and before the second sub-block of the first data.
  • the transmission identifier of the first sub-block indicates that the first sub-block is not the last sub-block to be transmitted in the first data
  • the transmission identifier of the second sub-block indicates the The two sub-blocks are the last sub-block of the first data to be transmitted.
  • the first read command A and the second read command B are taken as an example, wherein the data to be read by the first read command A includes a sub-block A0, a sub-block A1, and a sub-block A2 (LB).
  • the data to be read by the second read command B includes the sub-block B0 (LB).
  • A2 (LB) is used to indicate that A2 is the last sub-block of data to be transmitted in the data read by the first read command A
  • B0 (LB) is used to indicate that B0 is the data to be transmitted in the data read by the second read command B.
  • the last sub-block The buffering order of each sub-block in the buffer 114 is as shown at 802, wherein the sub-block B0 (LB) is located after the sub-block A0 and the sub-block A1 and before the sub-block A2 (LB).
  • the media controller 110 sends the second data to the memory controller 110 in preference to the first sub-block in response to the send command sent by the memory controller 106.
  • the media controller 110 may first send a second data B0 (LB) to the memory controller 106 in response to a send command sent by the memory controller 106, and then respond.
  • the other at least two send commands sent by the memory controller 106 return the first sub-block A0, the second sub-block A1, and the third sub-block A2 (LB) to the memory controller 106.
  • the transmission delay for transmitting one sub-block is 4 cycles. If the media controller 110 transmits each sub-block to the memory controller 106 in the cache order shown by 802 in FIG. 8, the memory controller 110 receives the wait delay of all the sub-blocks of the first read command A as 16 Cycle, the memory controller 110 receives the wait delay of all sub-blocks of the second read command B for 12 cycles.
  • the media controller 110 may The data B0 (LB) of the second read command B is sent to the memory controller 110 in preference to the sub-data blocks A0 and A1 of the first read command A.
  • the memory controller 110 receives the wait delay of all the sub-blocks of the first read command A unchanged, still 16 cycles, but the memory controller 110 receives all the children of the second read command B.
  • the waiting delay of the data block is 4 cycles. Thereby, the delay of the memory controller 110 receiving the sub-block of the second read command B is reduced, and the processing efficiency of the memory controller 110 processing the second read command B is improved.
  • FIG. 8 is an example in which the data to be read by the second read command includes only one sub-block B0 (LB).
  • each sub-block to be read by the second read command is located in the data of the first read command to be read in the cache.
  • the media controller 110 may prioritize the sub-data to be read by the second read command over the first read.
  • the sub-block of data to be read is sent to the memory controller 106. As shown at 902 in FIG.
  • the data to be read by the second read command B includes B0 and B1 (LB), and both B0 and B1 (LB) are located in the buffer 114 in the first read command A to be read.
  • the media controller 110 may follow the indication of 904.
  • the scheduling sequence sends each sub-block of data to the memory controller 110.
  • the data B0 and B1 (LB) to be read by the second read command may be sent to the memory controller in preference to the sub-data block A0 to be read by the first read command A.
  • the transmission delay of transmitting one sub-block is 4 cycles.
  • the delay of the data read by the memory controller 110 receiving the second read command B is reduced from 16 delays to 4 times. After the delay, the delay of the data read by the memory controller 110 receiving the first read command A is still 20 delays. Therefore, the processing efficiency of the memory controller is optimized to some extent.
  • the media controller 110 cannot place the data in the first read command in the cache.
  • the other read commands following the last sub-block of the transfer are to be read, and the sub-blocks to be read are sent to the memory controller in preference to the sub-block of the first read command.
  • the sub-data block C0 (LB) of the third read command C is located after the sub-data block A2 (LB) of the first read command A in the buffer 114, then the media controller 110 cannot.
  • the C0 (LB) is transmitted to the memory controller 106 in preference to the sub-data blocks A0, A1, and A2 (LB) of the first read command. Otherwise, the memory controller 110 receives an increase in the data block delay of the first read command A. For example, in the example shown in FIG. 8, assuming that the sub-block of the first read command A is sent last, the delay of the memory controller 106 receiving the data of the first read command A will increase from 16 cycles to 20 cycle.
  • the media controller 110 is adjusting the data block.
  • the last data block to be transmitted in the data read by a read command cannot be sent in preference to other data blocks of the command.
  • the media controller 110 cannot send the sub-block A2 (LB) in the first read command to the memory controller 106 in preference to the sub-block A0 or A1.
  • the read command is read by adjusting each read command.
  • the order in which the data is returned Not only can the read command for reading data of different lengths be processed, but also the waiting delay of the memory controller 106 receiving the data can be reduced, and the processing efficiency of the memory controller 106 is improved.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as an optical disk), or a semiconductor medium (such as a solid-state drive (SSD)), etc., which may store non-transient code of the program code.
  • Non-transitory machine readable medium such as a floppy disk, a hard disk, a magnetic tape
  • an optical medium such as an optical disk
  • a semiconductor medium such as a solid-state drive (SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Systems (AREA)
  • Memory System (AREA)
  • Saccharide Compounds (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

一种内存访问技术及计算机系统(100),所述计算机系统(100)包括内存控制器(106)、介质控制器(110)以及与所述介质控制器(110)连接的非易失性内存NVM(112)。在接收所述内存控制器(106)发送的第一读命令之后,所述介质控制器(110)可以根据所述第一读命令中的第一地址从所述NVM(112)中读取第一数据。之后,所述介质控制器(110)能够根据所述内存控制器(106)发送的至少两个Send命令向所述内存控制器(106)返回固定长度的至少两个子数据块以及所述至少两个子数据块的元数据。其中,所述元数据中包含有用于指示对应的子数据块在所述第一数据中的偏移量的位置标识。所述内存控制器(106)根据所述至少两个子数据块的元数据中的位置标识将所述至少两个子数据块合并为所述第一数据。

Description

内存访问技术及计算机系统 技术领域
本申请涉及计算机技术领域,尤其涉及一种内存访问技术及计算机系统。
背景技术
非易失性双列直插式内存模块(non-volatile dual in-line memory module,NVDIMM)是一种计算机的随机存取存储器(random access memory,RAM)。NVDIMM上可以包括多个非易失性内存(non-volatile memory,NVM)芯片。NVDIMM能够在系统完全断电的时候依然保存完整的内存数据。可以理解的是,NVDIMM上的NVM芯片具体可以为非易失性随机存取存储器(non-volatile random access memory,NVRAM)。NVDIMM上的NVM可以包括相变存储器(phase change memory,PCM)、电阻性随机存取存储器(resistive random access memory,RRAM)、磁性随机存取存储器(magnetic random access memory,MRAM)、自旋扭矩转换磁性随机存取存储器(spin-transfer torque MRAM,STT MRAM)等等。NVDIMM采用NVDIMM-P协议与内存控制器通信。NVDIMM-P协议是兼容双倍速率(double data rate,DDR)协议的一个总线访问协议。
本领域技术人员可以知道,处理器通常会存在读取不同长度数据的读需求。因此,处理器可能向内存控制器发送用于读取不同长度数据的访存请求。例如,处理器可能根据需求向内存控制器发送读取64B(Byte)的访存请求或读取128B的访存请求。现有技术中,内存控制器通常向NVDIMM发送用于读取固定长度的数据的读命令。例如,在一种情况下,内存控制器可以向NVDIMM发送用于读取64B数据的读命令。在这种情况下,当内存控制器接收到处理器发送的用于读取128B数据的访存请求时,内存控制器需要将该访存请求拆分成两个64B的读命令,并通过两个读命令从NVDIMM读取处理器所需的128B的数据。这种处理方式会浪费命令总线的带宽,影响系统性能。在另一种情况下,内存控制器固定向NVDIMM发送用于读取128B数据的读命令。在这种情况下,当内存控制器接收到处理器发送的用于读取64B数据的访存请求时,内存控制器需要将该64B的访存请求变为128B的读命令,并向NVDIMM发送该128B的读命令。显然,这种方式会浪费数据总线的带宽。
发明内容
本申请中提供的一种内存访问技术及计算机系统,能够在不浪费总线带宽的基础上支持获取不同长度数据的读命令,提升系统性能。
第一方面,本申请提供了一种计算机系统。所述计算机系统包括内存控制器、介质控制器以及与所述介质控制器连接的非易失性内存NVM。所述 NVM用于存储数据。所述内存控制器连接所述介质控制器。在所述内存控制器向所述介质控制器发送第一读命令之后,所述介质控制器可以根据所述第一读命令中的第一地址从所述NVM中读取所述第一数据。其中,所述第一读命令中携带有第一ID、所述第一地址以及第一长度,所述第一ID为所述第一读命令的标识,所述第一长度用于指示所述第一读命令待读取的第一数据的大小。所述内存控制器向所述介质控制器发送至少两个Send命令,其中,所述至少两个send命令用于获取至少两个第三长度的数据,所述第三长度小于所述第一长度。所述介质控制器响应所述至少两个send命令,向所述内存控制器返回所述第三长度的至少两个子数据块以及所述至少两个子数据块的元数据。其中,所述元数据中包含有所述第一ID以及位置标识,所述位置标识用于指示对应的子数据块在所述第一数据中的偏移量。所述内存控制器根据所述至少两个子数据块的元数据中的位置标识将所述至少两个子数据块合并为所述第一数据。
本申请提供的计算机系统在接收到用于获取较大数据的访存请求时,可以在不增加读命令的情况下支持系统的访存请求。从而能够减少总线带宽的浪费,提升系统性能。
实际应用中,所述位置标识至少为一个比特。所述内存控制器和所述介质控制器之间的通信遵从NVDIMM-P协议。
结合第一方面,在第一种可能的实现方式中,所述内存控制器还用于向所述介质控制器发送第二读命令,所述第二读命令中携带有第二ID、第二地址以及第二长度,所述第二长度用于指示所述第二读命令待读取的第二数据的大小。所述介质控制器还用于根据所述第二地址从所述NVM中获取所述第二数据。所述内存控制器还用于向所述介质控制器发送第二Send命令,所述第二send命令用于获取所述第三长度的数据块,所述第二长度等于所述第三长度。所述介质控制器还用于响应所述第二send命令,向所述内存控制器返回所述第二数据以及所述第二数据的元数据,所述第二数据的元数据中携带有所述第二ID。
本申请提供的计算机系统,能够在不增加读命令的数量且不浪费总线带宽的基础上,支持读取不同长度的数据的读需求。提升了系统性能。
结合第一方面以及第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述介质控制器还用于将从所述NVM读取的所述第一数据分为所述至少两个子数据块进行缓存,并记录所述至少两个子数据块的元数据。
结合第一方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述每个子数据块的元数据中还包括传输标识,所述传输标识用于指示所述子数据块是否为所述第一数据中待传输的最后一个子数据块。所述计算机系统还包括缓存,所述缓存用于缓存从所述NVM读取的所述第一数据的至少两个子数据块以及所述第二数据。所述介质控制器还用于当所述第二数据在所述缓存中位于所述第一数据的第一子数据块之后,且位于所述第一数据的第二子数据块之前时,将所述第二数据优先于所述第一子数据块发送给所述内存控制器。其中,所述第一子数据块的传输标识指示所述第一子数据块不是所述第一数据中 待传输的最后一个子数据块,所述第二子数据块的传输标识指示所述第二子数据块为所述第一数据中待传输的最后一个子数据块。
本申请提供的计算机系统,由于在介质控制器返回内存控制器的子数据块的元数据中携带有待传输标识,从而介质控制器在向内存控制器返回数据的过程中,能够根据所述待传输标识调整发送给内存控制器的子数据块的发送顺序,从而不仅处理读取不同长度的数据的读命令上,还能够降低内存控制器106接收数据的等待延时,进一步提高了计算机系统的处理效率。
结合第一方面或第一方面的第一种至第三种中任意一种可能的实现方式,在第四种可能的实现方式中,所述计算机系统还包括处理器。所述处理器用于向所述内存控制器发送第一访存请求。所述第一访存请求包括所述第一ID、所述第一地址以及所述第一长度。所述内存控制器还用于根据所述第一访存请求向所述介质控制器发送所述第一读命令。根据该可能的实施方式所述的计算机系统,即使在接收到处理器发送的用于读取较大的数据的访存请求的情况下,也不会将处理器发送的访存请求变为多个小数据的读命令,从而与现有技术相比,能够减少读命令的数量,节省总线带宽,提高计算机系统的性能。
第二方面,本申请提供了一种存储器。该存储器包括非易失性内存NVM以及与所述NVM连接的介质控制器。所述NVM用于存储数据。所述介质控制器用于接收计算机系统中的内存控制器发送的第一读命令,并根据所述第一读命令中第一地址从所述NVM中读取所述第一数据。其中,所述第一读命令中携带有第一ID、所述第一地址以及第一长度,所述第一ID为所述第一读命令的标识,所述第一长度用于指示所述第一读命令待读取的第一数据的大小。在接收到所述内存控制器发送的至少两个Send命令之后,所述介质控制器响应所述内存控制器发送的至少两个send命令,向所述内存控制器返回第三长度的至少两个子数据块以及所述至少两个子数据块的元数据。其中,所述至少两个send命令用于获取第三长度的数据,所述第三长度小于所述第一长度。每个子数据块的元数据中均包含有所述第一ID以及位置标识。所述位置标识用于指示对应的子数据块在所述第一数据中的偏移量,以便根据所述至少两个子数据块中的位置标识使所述至少两个子数据块能够被合并为所述第一数据。
结合第二方面,在第一种可能的实现方式中,所述介质存储器还用于接收所述内存控制器发送的第二读命令,并根据所述第二读命令中的第二地址从所述NVM中获取第二数据。其中,所述第二读命令中携带有第二ID、第二地址以及第二长度,所述第二长度用于指示所述第二读命令待读取的第二数据的大小。在接收到所述内存控制器发送的第二send命令之后,所述介质控制器响应所述第二send命令,向所述内存控制器返回所述第二数据以及所述第二数据的元数据。其中,所述第二send命令用于获取所述第三长度的数据块,所述第二长度等于所述第三长度,所述第二数据的元数据中携带有所述第二ID。
结合第二方面或第二方面的第一种可能的实现方式,所述存储器还包括缓存,所述缓存用于缓存所述介质存储器从所述NVM中读取的所述第一数 据的所述至少两个子数据块。所述介质控制器还用于记录所述至少两个子数据块的元数据。
结合第二方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述每个子数据块的元数据中还包括传输标识,所述传输标识用于指示所述子数据块是否为所述第一数据中待传输的最后一个子数据块。所述缓存还用于缓存所述第二数据。所述介质控制器还用于当所述第二数据在所述缓存中位于所述第一数据的第一子数据块之后,且位于所述第一数据的第二子数据块之前时,将所述第二数据优先于所述第一子数据块发送给所述内存控制器。其中,所述第一子数据块的传输标识指示所述第一子数据块不是所述第一数据中待传输的最后一个子数据块,所述第二子数据块的传输标识指示所述第二子数据块为所述第一数据中待传输的最后一个子数据块。
第三方面,本申请提供一种内存访问方法,所述方法应用于上述第一方面或第一方面的任意一种可能的实现方式提供的计算机系统中,实现上述第一方面或第一方面的任意一种可能的实现方式提供的计算机系统的功能。
第四方面,本申请提供了又一种内存访问方法。所述方法由上述第一方面或第一方面的任意一种可能的实现方式提供的计算机系统中的介质控制器执行,用于实现上述第一方面或第一方面的任意一种可能的实现方式提供的计算机系统中的介质控制器的功能。
第五方面,本申请提供了又一种内存访问方法。所述方法由上述第一方面或第一方面的任意一种可能的实现方式提供的计算机系统中的内存控制器执行,用于实现上述第一方面或第一方面的任意一种可能的实现方式提供的计算机系统中的内存控制器的功能。
第六方面,本申请提供了一种内存控制器。该内存控制器包括通信接口以及与所述通信接口连接的控制电路。该通信接口用于向计算机系统中的介质控制器发送第一读命令,所述第一读命令中携带有第一ID、第一地址以及第一长度,所述第一ID为所述第一读命令的标识,所述第一长度用于指示所述第一读命令待读取的第一数据的大小。该通信接口还用于向所述介质控制器发送至少两个Send命令,并接收所述介质控制器响应所述至少两个send命令发送的第三长度的至少两个子数据块以及所述至少两个子数据块的元数据。其中,所述至少两个send命令用于获取至少两个所述第三长度的数据,所述第三长度小于所述第一长度。所述至少两个子数据块是所述介质控制器根据所述第一地址从计算机系统中的非易失性内存NVM中获取的。每个子数据块的元数据中均包含有所述第一ID以及位置标识,所述位置标识用于指示对应的子数据块在所述第一数据中的位置。所述控制电路用于根据所述至少两个子数据块的元数据中的位置标识将所述至少两个子数据块合并为所述第一数据。
结合第六方面,在第六方面的第一种可能的实现方式中,所述通信接口还用于向所述介质控制器发送第二读命令。其中,所述第二读命令中携带有第二ID、第二地址以及第二长度,所述第二长度用于指示所述第二读命令待读 取的第二数据的大小。之后,所述通信接口向所述介质控制器发送第二send命令,并接收所述介质控制器根据所述第二send命令返回的所述第二数据以及所述第二数据的元数据。其中,所述第二send命令用于获取所述第三长度的数据块,所述第二长度等于所述第三长度。所述第二数据是所述介质控制器根据所述第二地址从所述NVM中获取的,所述第二数据的元数据中携带有所述第二ID。
第七方面,本申请还提供了一种计算机程序产品,包括程序代码,所述程序代码包括的指令被计算机所执行,以实现前述第三方面、第四方面或第五方面中所述的方法。
第八方面,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储程序代码,所述程序代码包括的指令被计算机所执行,以实现前述第三方面、第四方面或第五方面中所述的方法。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例。
图1为本发明实施例提供的一种计算机系统架构示意图;
图2为本发明实施例提供的一种内存访问方法的信令图;
图3为本发明实施例提供的一种读命令的数据结构示意图;
图4为本发明实施例提供的一种介质控制器向内存控制器返回的数据结构示意图;
图5为本发明实施例提供的一种介质控制器向内存控制器返回的数据中的元数据的数据结构示意图;
图6为本发明实施例提供的又一种内存访问方法的信令图;
图7为本发明实施例提供的一种调度方法流程图;
图8为本发明实施例提供的一种调度方法示意图;
图9为本发明实施例提供的又一种调度方法示意图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述。显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。
图1为本发明实施例提供的一种计算机系统架构示意图。如图1所示,计算机系统100至少可以包括处理器102、内存控制器106以及非易失性双列直插式内存模块(non-volatile dual in-line memory module,NVDIMM)108。通常,内存控制器106可以集成在处理器102中。需要说明的是,本发明实施例提供的计算机系统中,除了图1所示的器件外,计算机系统100还可以包括通信接口以及作为外存的磁盘等其他器件,在此不做限制。
处理器(processor)102是计算机系统100的运算核心和控制核心(control unit)。处理器102中可以包括多个处理器核(core)104。处理器102可以是一块超大规模的集成电路。在处理器102中安装有操作系统和其他软件程序,从而处理器102能够实现对NVDIMM108、缓存及磁盘的访问。可以理解的是,在本发明实施例中,处理器102中的Core 104例如可以是中央处理器(central processing unit,CPU),还可以是其他特定集成电路(application specific integrated circuit,ASIC)。
内存控制器(memory controller)106是计算机系统100内部控制NVDIMM108并用于管理与规划从NVDIMM 108到Core 104间的数据传输的总线电路控制器。通过内存控制器106,NVDIMM 108与Core 104之间可以交换数据。内存控制器106可以是一个单独的芯片,并通过系统总线与Core 104连接。本领域技术人员可以知道,内存控制器106也可以被集成到处理器102中(如图1所示)也可以被内置于北桥中。本发明实施例不对内存控制器106的具体位置进行限定。实际应用中,内存控制器106可以包括通信接口1062和控制电路1064,内存控制器106可以通过通信接口1062与处理器102和NVDIMM108进行通信。内存控制器106可以控制电路1064控制必要的逻辑以将数据写入NVDIMM 108或从NVDIMM108中读取数据。
NVDIMM 108是计算机系统100的一种随机存取存储器RAM,可以作为计算机系统100的内存或存储。NVDIMM 108可以包括介质控制器110、至少一个非易失性内存NVM 112以及缓存114。介质控制器110可以包括具有控制能力的逻辑电路。NVM 112用于存放操作系统中各种正在运行的软件、输入和输出数据以及与外存交换的信息等。其中,NVM 112可以以芯片的形式存在。如前所述,NVM 112可以包括相变存储器(phase change memory,PCM)、电阻性随机存取存储器(resistive random access memory,RRAM)、磁性随机存取存储器(magnetic random access memory,MRAM)、自旋扭矩转换磁性随机存取存储器(spin-transfer torque MRAM,STT MRAM)等可以作为内存的非易失性存储器。
内存控制器106通过总线105和NVDIMM 108进行连接。内存控制器106与NVDIMM108之间的通信遵从NVDIMM-P协议。NVDIMM-P协议是兼容双倍速率(double data rate,DDR)协议的一个总线访问协议。介质控制器110可以根据内存控制器106的访存命令对NVM112中存储的数据进行访问。可以理解的是,内存控制器106发送的访存命令可以是读命令或写命令。介质控制器110可以根据内存控制器106发送的读命令从NVM 112中读取数据,或者,介质控制器110还可以根据内存控制器106发送的写命令将数据写入NVM 112中。
本发明实施例中总线105可以包括数据总线、命令/地址总线以及读数据准备(ready)反馈线。其中,数据总线用于传输数据及元数据。命令/地址总线用于传输读命令、写命令等访存命令。读数据准备反馈线用于发送用于通知 内存控制器106待读取的数据已经在NVDIMM中准备好的ready信号。实际应用中,当内存控制器106通过总线105从NVDIMM 108中读取数据时,内存控制器106会先根据命令/地址总线发送读命令。NVDIMM108中的介质控制器110根据读命令中的目标地址从NVM112中获取到待读取的数据后,NVDIMM 108会向内存控制器106通过读数据准备(ready)反馈线发送用于通知数据已经在NVDIMM中准备好的ready信号。内存控制器106在接收到NVDIMM 108发送的Ready信号后,会通过命令/地址总线向NVDIMM108发送用于获取数据的send命令。在内存控制器106发送send命令的固定时延后,介质控制器110会将其缓存中准备好的数据通过数据总线返回给内存控制器106。由于NVDIMM-P协议支持NVM读命令的乱序执行,因此,实际应用中,内存控制器106在发送send命令时,无法知道介质控制器110返回的数据是哪个读命令的数据。
缓存114用于缓存介质控制器110从NVM 112读取的数据。缓存114可以包含一个缓存队列。通常,缓存队列都是采用先入先出的顺序缓存数据。介质控制器110可以根据缓存114中的数据的先后顺序调度缓存114中的数据。例如,介质控制器110可以按照缓存队列中缓存的数据的先后顺序将缓存的数据发送给内存控制器106,或者将数据写入NVM 112。在本发明实施例中,介质控制器110也可以不按照先入先出的顺序调度数据,而是按照数据的优先级或按照应用需要调度所述缓存队中的数据的先后顺序。可以理解的是,实际应用中,在NVDIMM108中还可以包括用于缓存待写入NVM112的数据的写缓存(图1中未示出)。
本领域技术人员可以知道,由于NVDIMM-P总线协议是兼容标准DDR总线协议的,其数据总线是复用的。根据这种方式,内存控制器发送的写命令以及用于获取数据的send命令都是复用相同的数据总线。因此,为了防止各命令在总线上的冲突,内存控制器在向介质控制器发送某个send命令时,必须确定根据该send命令返回的数据的传输时间,以便能够确定下一个命令的发送时间,从而能够精确调度各访存命令。然而,由于NVDIMM-P协议支持NVM读命令的乱序执行,因此,在处理访问不同长度的数据的读命令的过程中,内存控制器在发送send命令时无法知道介质控制器110返回的数据属于哪个读命令的数据,从而无法知道其接收的数据的长度,进而,内存控制器在发送send命令时无法确定返回的数据的传输时间。基于上述原因,如前所述,现有技术中,内存控制器106通常都是向NVDIMM 108发送固定长度的读命令。例如,内存控制器106向NVDIMM 108发送用于读取64B数据的读命令或者用于读取128B数据的读命令。但由于处理器会存在不同长度的数据的读需求,因此,内存控制器106向NVDIMM 108发送固定长度的读命令的方式可能造成读命令数量的增加或者浪费总线105的带宽,影响系统性能的提升。并且,NVDIMM内部通常需要根据接收的访存命令进行磨损均衡,命令数量的增多可能增加执行磨损均衡的工作,因此现有技术中的内存访问方法也不利于系统性能的提升。因此,为了不浪费带宽,且能够提高系统性能,提供一种能够支持内存控制器106从 NVDIMM 108中读取不同长度数据的计算机系统很有必要。
下面就结合图1对计算机系统100如何根据不同需求读取NVDIMM108中不同长度的数据进行详细的介绍。换一种表达方式,本发明实施例提供的计算机系统100能够支持变长(multi-length)的读命令。为了与现有技术中的读命令进行区别,在本发明实施例中将内存控制器106发送给介质控制器110的读命令称为XREAD命令。图2为本发明实施例提供的一种数据读取方法的信令图。如图2所示,该方法可以包括下述步骤。
在步骤202中,处理器102向内存控制器106发送第一访存请求。所述第一访存请求中携带有第一逻辑地址和第一长度,所述第一长度用于指示所述处理器102待读取的第一数据的大小,所述第一逻辑地址用于指示待读取的第一数据的地址。
在步骤204中,内存控制器106根据所述第一访存请求向介质控制器110发送第一读命令,所述第一读命令中携带有第一ID、第一地址以及第一长度,所述第一长度用于指示所述第一读命令待读取的第一数据的大小。所述第一地址用于指示所述第一数据在NVM112中的物理地址。
在本发明实施例中,所述第一读命令的格式可以如图3所示。图3为本发明实施例提供的XREAD命令的数据结构示意图。一个XREAD命令是分为两个周期传输的,第一个周期的片选信号(chip select,CS)为低(L),第二个周期紧跟着第一个周期,第二个周期的片选信号为高(H)。每个周期又包括时钟的上升沿和时钟的下降沿。如图3所示,根据NVDIMM-P协议,命令/地址总线时钟信号的上升沿和下降沿均可以用于传输数据信息。例如,如图3所示,时钟的上升沿传输的信息可以参见图3中的“Command/Address Signal Rising CLK_t”部分。时钟的下降沿传输的信息可以参见图3中的“Command/Address Signal Falling CLK_t”部分。具体的,本发明实施例提供的XREAD命令中可以包括下述字段。“CS”位为片选信号字段,用于指示该NVDIMM是否被选中(selected)。Length[2:0]字段用于指示该XREAD命令要读取的数据的长度。ADDR[11:5]及ADDR[4:1]字段用于指示所述XREAD命令要读取的数据的地址。RID[9:7]及RID[6:0]字段用于指示所述XREAD命令的ID。“RFU”字段为未用到的预留字段。本领域技术人员可以知道,图3所示的XREAD命令中的各个字段可以通过图1所示的总线105的命令/地址总线进行传输。其中,总线105遵从NVDIMM-P协议。
本发明实施例中,第一读命令可以包括第一读命令的第一ID,第一ID为所述第一读命令的标识。例如,第一ID可以采用图3中的RID[9:7]及RID[6:0]字段来标识。并且,所述第一读命令还可以包括待读取的数据的地址,为了描述方便,在本发明实施例中,将第一读命令中携带的待读取的数据的地址称为第一地址。例如,第一地址可以采用图3所示的ADDR[11:5]及ADDR[4:1]字段来标识。需要说明的是,第一地址为第一数据在NVM 112中的物理地址。
为了使本发明实施例提供的计算机系统能够支持处理器的变长 (multi-length)的读命令,在内存控制器106发送给介质控制器110的第一读命令中,还需要采用部分字段来指示所述第一读命令待读取的第一数据的长度。例如,可以用图3中的“Length[2:0]”字段来指示所述第一数据的长度。根据这种方式,“Length[2:0]”字段可以用于指示内存控制器106待读取的数据包括多少个64B(byte)块。例如,如图3所示,“Length[2:0]”字段可以有3位,“Length[2:0]”字段可以表示为000~111,相应的,“Length[2:0]”字段可以用于指示的内存控制器待读取的数据的长度可以为64B至512B。换一种表达方式,根据图3所示的XREAD命令的数据格式,计算机系统100能够支持一次读取512B数据的读操作。
需要说明的是,图3中的“Length[2:0]”字段仅仅是一种示例,并不对待读取的数据的长度进行限制。实际应用中,还可以采用更多的预留字段来表示待读取的数据的长度。例如,实际应用中,还可以将图3中所示的“RFU”字段也用于指示待读取的数据的长度。在这种情况下,用于指示待读取的数据的长度的字段就可以包括4bit,该字段能够指示的值可以从0000~1111。计算机系统100能够读取的数据最多可以为64B*16=1024B。并且,在本发明实施例中,“Length[2:0]”字段指示的待读取的数据的大小是以64B为粒度进行举例,根据这种方式,待读取的数据的大小均为64B的倍数。实际应用中,“Length[2:0]”字段指示的还可以以32B、128B或其他大小为粒度,在本发明实施例中不进行限制。
在步骤206中,介质控制器110根据所述第一地址从NVM 112中读取所述第一数据。具体的,介质控制器110可以根据所述第一地址及第一长度从NVM 112中读取所述第一数据。在读取所述第一数据后,介质控制器110可以将所述第一数据缓存在缓存(buffer)中。在本发明实施例中,介质控制器110在读取第一数据后,可以根据第一数据按照64B的粒度为单位进行分块缓存。例如,若第一长度为128B,则可以将第一数据分为2个64B的数据块,分别缓存在NVDIMM108的缓存114中。在缓存各数据块时,可以在各数据块中标识该数据块所属的读命令的ID以及该数据块在所述读命令待读取的数据中的位置。例如,若第一数据的第一长度为128B,介质控制器110可以将第一数据分成第一子数据块以及第二子数据块进行缓存,并在第一子数据块的元数据信息中记录第一ID以及第一子数据块在所述第一数据中的位置。第一子数据块在所述第一数据中的位置是指第一子数据块在第一数据中的偏移量。例如,若第一子数据块为第一数据中的高64B,第二子数据块为第一数据中的低64B,则可以在第一子数据块的元数据中记录第一子数据块的位置信息为1,在第二子数据块的元数据中记录第二子数据块的位置信息为0。
可以理解的是,“0”和“1”仅仅是数据块的元数据中的位置标识的一个示例。可以理解的是,数据块的元数据中的位置指示位可以不仅仅是一个bit,可以有多个bit的字段用于指示数据块在待读取的数据中的位置。例如,若以3个bit的字段来指示数据块的位置,则可以采用000~111分别指示各数据块在待读取的数据中的8个不同位置。
在步骤208中,介质控制器110向内存控制器106发送ready信号。所述ready信号用于通知内存控制器106,在介质控制器110的buffer中缓存有待读取的数据。本领域技术人员可以知道,由于NVM的访问延时不固定,因此NVDIMM无法同动态随机存储器DRAM一样在收到读命令之后的固定时间内向内存控制器返回该读命令要读取的数据,因此,NVDIMM-P协议定义了一个在读数据的过程中用于反馈数据的ready信号。这也是NVDIMM-P协议和DDR总线协议的一个区别。Ready信号用于通知内存控制器NVDIMM已经准备好内存控制器要读取的数据,内存控制器接收到Ready信号后,可以通过send命令从NVDIMM的缓存(buffer)中获取准备好的数据。
在步骤210中,内存控制器106向介质控制器110发送send命令。所述send命令用于读取NVDIMM缓存中缓存第三长度的数据块。需要说明的是,在NVDIMM的缓存中缓存有数据时,介质控制器就会向内存控制器106发送ready信号。由于NVDIMM-P协议支持NVM读命令的乱序执行,因此内存控制器106此时并不能知道NVDIMM准备的是哪个读命令的数据。如前所述,在处理用于读取变长数据的读命令的情况下,内存控制器106在向介质控制器110发送send命令时,并不知道其取回的数据的大小,因此无法确定返回的数据的传输时间。在本发明实施例中,为了不造成总线上命令的紊乱,即使在处理器发送的访存请求会读取不同长度的数据的情况下,内存控制器106仍然按照用于获取固定长度(例如,第三长度)的数据的方式来发送send命令。根据这种方式,即使不同的访存请求待读取的数据的大小不同,但由于一次获取的数据的长度固定,因此介质控制器110返回的数据的传输时间即可以确定,从而内存控制器106可以按照固定的数据传输时间向介质控制器110发送send命令以从NVDIMM获取待读取的数据。可以理解的是,所述第三长度可以根据实际应用进行设置。实际应用中,为了不浪费带宽,所述第三长度可以为64B。
在步骤212中,介质控制器110根据所述send命令向所述内存控制器106返回第三长度的数据块及相应的元数据。本领域技术人员可以知道,介质控制器110收到一个send命令,则会返回与所述第三长度大小相同的数据块及相应的元数据。其中,数据的元数据是指用于描述数据的信息。实际应用中,介质控制器110根据send命令向内存控制器106返回数据时,通常会将数据块和相应的元数据一起返回。为了描述方便,在本发明实施例中,也可以将介质控制器110返回的第三长度的数据块及相应的元数据统称为返回的数据。介质控制器110返回的数据的格式可以如图4所述。如图4所示,返回的数据中可以包括下述信息:Data 402、ECC 404、ID 406以及Location 408。其中,所述Data 402字段为所述第三长度的数据块。例如,所述Data 402字段可以为64B的数据块。可以理解的是,第三长度可以根据实际需要进行设置,例如,第三长度可以设置为64B或128B,只要是固定的长度即可。所述ECC 404字段用于指示所述数据块的纠错信息。实际应用中,所述ECC 404字段可以占用12B。并且,实际应用中,返回的数据中也可以不包括所述ECC404字段。所述ID 406字段用于指 示所述数据块所属的读命令。例如,以前述的第一读命令为例,若第一读命令待读取的第一数据被划分为第一子数据块和第二子数据块,则在介质控制器110根据内存控制器106发送的两个send命令返回的数据块的元数据中,第一子数据块的ID和第二子数据块的ID均可以为所述第一读命令的ID。Location 408用于指示返回的子数据块在ID 406指示的读命令待读取的数据中的位置。例如,当介质控制器110返回第一子数据块时,Location 408可以为“1”,用于返回的所述第一子数据块为第一读命令待读取的数据中的高64B。
实际应用中,ECC 404字段、字段ID 406和字段Location 408可以包含在返回的子数据块的元数据中。图5为本发明实施例提供的一种根据send命令返回的数据块的元数据的结构示意图。如图所示,M0和M1用于指示传输元数据的两根信号线上传输的信号。“RID”字段用于指示所述数据块所属的读命令。换一种表达方式,内存控制器106在接收到介质控制器110返回的数据块后,可以根据“RID”字段识别出返回的数据块为哪个读命令读取的数据。“SB”字段用于指示返回的数据块在“RID”字段指示的读命令待读取的数据中的偏移量。
图5所示的结构中,以RID占用10个比特(bit),SB占用3个比特进行描述。其中,元数据中的RID信息与图3所示XREAD命令中的RID[9:7]及RID[6:0]字段对应,用于指示子数据块所属的读命令。SB占用的3个bit用于和图3所示的XREAD命令中的“Length[2:0]”中的3个bit对应。根据这种方式,若XREAD中的Length[2:0]=7,则表示需要读取的数据的长度是8个64B的数据块,则返回的数据块中,若SB[2:0]=0则表示该返回的子数据块为待读取的数据中的第1个子数据块,若SB[2:0]=7则表示该返回的子数据块为待读取的数据中的第8个分块。可以理解的是,实际应用中可以根据实际需要设置字段ID 406和字段Location 408所占用的位数。在本发明实施例中不进行限定。
本领域技术人员可以知道,当NVDIMM108中用于缓存待返回的读数据的缓存114中有数据时,介质控制器110就会向内存控制器106发送ready信号。内存控制器106收到介质控制器110发送的ready信号后,会向介质控制器110发送send命令。介质控制器110接收到send命令后,会向内存控制器106返回send命令的所述第三长度的数据块。因此,可以理解的是,当某个读命令待读取的数据较大时,例如大于设置的第三长度时,则需要执行至少两次步骤208至步骤212,才能从NVDIMM中完整读取该读命令待读取的数据。在本发明实施例中,以第一数据大于所述第三长度为例,则内存控制器需要发送至少两个send命令,才能从NVDIMM取回所述第一数据。例如,内存控制器106通过发送至少两个send命令,所述介质控制器分别响应所述至少两个send命令,分别向所述内存控制器106发送所述第一数据的至少两个子数据块。
在步骤214中,内存控制器106根据接收的所述至少两个子数据块获得所述第一数据。具体的,内存控制器106收到介质控制器110根据send指令返回的数据后,可以根据返回的子数据块的元数据确定所述子数据块所属的读命令。以本发明实施例中第一读命令待读取的第一数据大于所述第三长度为例。 当内存控制器106接收到至少两个包含第一ID的子数据块后,可以根据所述至少两个数据块的元数据中的SB字段分别获得各子数据块在所述第一数据中的位置,从而内存控制器106能够根据各子数据块在所述第一数据中的偏移量将包含所述第一ID的至少两个子数据块获得所述第一数据。在步骤216中,所述内存控制器106向所述处理器102返回所述第一数据。
图2所示的实施例是以读取大数据为例对计算机系统100如何进行内存访问进行描述。由于本计算机系统能够支持不同需求的读命令,下面再以另一种情况为例对计算机系统100读取小数据的过程进行描述。图6为本发明实施例提供的又一种情况下的内存访问方法信令图。如图6所示,该方法可以包括下述步骤。
在步骤602中,处理器向内存控制器106发送第二访存请求。所述第二访存请求中包含有待读取的第二数据的第二长度,所述第二长度不大于所述第三长度。在本发明实施例中,以第二数据为64B为例进行描述。
在步骤604中,内存控制器106向介质控制器110发送第二读命令。所述第二读命令中包含有第二ID、第二地址以及所述第二长度。其中,第二读命令的数据格式也可以如图3所示。所述第二长度用于指示所述第二读命令待读取的所述第二数据的大小。在步骤606中,介质控制器110从NVM112中读取所述第二数据。同步骤206类似,介质控制器110可以根据第二地址和所述第二长度从NVM 112中读取所述第二数据。并将读取的所述第二数据缓存在NVDIMM的缓存中。在缓存第二数据的过程中,不仅需要缓存第二数据还需要缓存所述第二数据的元数据。第二数据的元数据可以包括所述第二读命令的ID以及所述第二数据的位置。由于第二数据较小,介质控制器110不必对所述第二数据进行分块缓存。
在步骤608中,介质控制器110向内存控制器106发送ready信号。在步骤610中,内存控制器106向所述介质控制器110发送send命令。在步骤612中,介质控制器110向内存控制器106返回所述第二数据以及所述第二数据的元数据。其中,介质控制器106返回的数据格式可以如图4所示。第二数据的元数据可以如图5所示。由于第二数据的大小为64B,当内存控制器获得介质控制器110返回的第二数据之后,在步骤614中,内存控制器106可以直接向所述处理器102返回所述第二数据。
需要说明的是,在本发明实施例中,由于第二数据等于send命令读取的数据的长度,因此,在介质控制器110返回第二数据时,可以所述第二数据的元数据中的将位置标识设置为000,用于指示所述第二数据只有1个数据块。在另一种情况下,当内存控制器106接收到介质控制器110返回的所述第二数据时,根据所述第二数据的元数据中的第二ID可以获知该数据属于所述第二读命令待读取的数据,进而可以获知所述第二读命令的长度等于所述第三长度,因此,内存控制器106能够知道第二数据只有一个数据块,从而内存控制器106可以将所述第二数据的元数据中的位置标识视为无意义的标识。
图6所示的实施例与图2所示的实施例类似,因此,图6所示的实施例中的相关步骤可以具体参见图2中相应步骤的描述。与图2所示的实施例不同的是,由于第二访存请求待读取的所述第二数据较小,内存控制器106通过一个send命令即可取回所述第二数据。因此,在内存控制器106根据介质控制器110返回的第二数据的元数据获得第二读命令待读取的所述第二数据已经完整返回后,则内存控制器可以直接向处理器102返回所述第二数据。
实际应用中,本发明实施例提供的计算机系统100可以并行处理访问不同NVM112芯片的多个不同的读命令。例如,计算机系统100可以并行处理第一读命令和第二读命令。图2和图6仅仅是对计算机系统100处理的用于读取不同长度数据的读命令的执行方法的示意。并且,本发明实施例提供的计算机系统100还能够支持读命令的乱序执行。根据这种方式,图2中的各个步骤与图6中的各个步骤可能交叉执行。例如,在步骤208之前,内存控制器可能执行步骤604。在介质控制器向内存控制器106返回数据时,可能先返回图2所示的第一读命令待读取的第一数据中的至少部分数据块也可能先返回图6中所示的第二读命令的待读取的第二数据。因此,在本发明实施例中,不对上述图2及图6所示的内存访问方法的各步骤的执行顺序进行限定。
在上述实施例提供的计算机系统中,在处理器102发送的用于读取不同长度数据的访存请求时,内存控制器106可以根据接收的访存请求向NVDIMM 108发送用于读取不同长度数据的读命令。当内存控制器106发送的用于读取较大数据(例如第一数据)的第一读命令时,内存控制器106可以向NVDIMM108中的介质控制器发送至少两个用于读取固定长度(例如第三长度)数据的send命令,其中,所述第三长度小于所述第一长度。介质控制器110可以根据接收到至少两个send命令向内存控制器106至少两个第三长度的子数据块及元数据,其中,每个子数据块对应的元数据中包含有用于指示该子数据块在所述第一数据中的位置标识。从而内存控制器106可以根据返回的至少两个子数据块的元数据中的位置标识将所述至少两个子数据块合并为所述第一数据。根据本发明实施例提供的方法,能够在不增加读命令的数量且不浪费总线带宽的基础上,支持读取不同长度的数据的读需求。
实际应用中,由于计算机系统100可并行处理多个不同的读命令,根据这种方式,在NVDIMM 108的缓存114中可能缓存有多个读命令待读取的数据。实际应用中,当缓存114中缓存有数据时,介质控制器110就会向内存控制器106发送ready消息通知内存控制器106取数据。为了优化内存控制器获得数据时的等待延时。在本发明实施例中,还可以通过优化缓存中的数据块的调度顺序来减少内存控制器的等待时延。下面将结合图5及图7具体描述本发明实施例提供的计算机系统100如何优化内存控制器获取数据时的等待时延。
在本发明实施例中,为了减少内存控制器获取数据时的等待时延,在图5所示的元数据中还可以增加一个传输标识(LB)。其中,传输标识LB只占用图5所示的元数据中的一个比特,具体的,可以从图5所示的元数据结构中 的未使用的位中(例如,图5中RFU指示的位)选择一个比特作为所述传输标识。所述传输标识用于指示该子数据块是否为RID所指示的读命令待读取的数据中的待传输的最后一个数据块。例如,当第一数据被划分为至少两个子数据块进行缓存时,可以将所述至少两个子数据块中的任意一个子数据块作为所述第一数据中待传输的最后一个子数据块。根据这种方式,可以将确定的待传输的最后一个子数据块的元数据中的LB位标识为“1”,而将所述第一数据中的其他子数据块的元数据中的LB位标识为“0”。可以理解的是,“1”仅仅是用于指示该子数据块为待传输的最后一个子数据块的标识的示例,“0“也仅仅是用于指示该子数据块不是待传输的最后一个子数据块的标识的示例,实际应用中还可以采用其他标识,在此不做限定。
在本发明实施例中,为了减少内存控制器110接收读命令的数据的等待延时,在上述图2所示的步骤212和图6所示的步骤612中,介质控制器110还可以优化缓存114中缓存的各读命令的子数据块的返回顺序。下面将结合图7-9对本发明实施例中介质控制器110如何向内存控制器106返回数据块进行详细描述。图7为本发明实施例提供的一种调度方法流程图。图8为本发明实施例提供的一种调度方法示意图。图9为本发明实施例提供的又一种调度方法示意图。为了描述清楚,在图7所述的实施例中以缓存114中缓存有所述第一数据的至少两个子数据块以及所述第二数据为例进行描述。如图7所示,介质控制器110在向所述内存控制器106返回数据块时可以采用下述步骤。
在步骤702中,介质控制器110确定述第二数据在所述缓存114中位于所述第一数据的第一子数据块之后,且位于所述第一数据的第二子数据块之前。其中,所述第一子数据块的传输标识指示所述第一子数据块不是所述第一数据中待传输的最后一个子数据块,所述第二子数据块的传输标识指示所述第二子数据块为所述第一数据中待传输的最后一个子数据块。
为了描述清楚,结合图8进行举例说明。如图8所示,以第一读命令A和第二读命令B为例,其中,第一读命令A待读取的数据包括子数据块A0、子数据块A1及子数据块A2(LB),第二读命令B待读取的数据包括子数据块B0(LB)。A2(LB)用于表示A2为第一读命令A读取的数据中待传输的最后一个子数据块,B0(LB)用于指示B0为第二读命令B读取的数据中待传输的最后一个子数据块。各子数据块在缓存114中的缓存顺序如802所示,其中,子数据块B0(LB)位于子数据块A0和子数据块A1之后,且位于子数据块A2(LB)之前。
在步骤704中,介质控制器110响应所述内存控制器106发送的send命令,将所述第二数据优先于所述第一子数据块发送给所述内存控制器110。具体的,如图8中的调度顺序804所示,所述介质控制器110可以先响应内存控制器106发送的一个send命令,将第二数据B0(LB)发送给内存控制器106,再响应内存控制器106发送的其他至少两个send命令,将第一子数据块A0、第二子数据块A1、及第三子数据块A2(LB)返回给所述内存控制器106。
假设传输一个子数据块的传输延时是4个周期。如果介质控制器110按照图8中802所示的缓存顺序将各子数据块发送给内存控制器106,内存控制器110收到第一读命令A的所有子数据块的等待延时为16个周期,内存控制器110收到第二读命令B的所有子数据块的等待延时为12个周期。为了减少内存控制器110的等待延时,按照本发明实施例所示的方法调整缓存114中的各个子数据块的发送顺序后,例如,根据调度顺序804所示,介质控制器110可以将第二读命令B的数据B0(LB)优先于第一读命令A的子数据块A0和A1发送给内存控制器110。在这种情况下,内存控制器110接收到第一读命令A的所有子数据块的等待延时没有改变,仍然为16个周期,但内存控制器110接收到第二读命令B的所有子数据块的等待延时为4个周期。从而减少了内存控制器110接收第二读命令B的子数据块的延时,提高了内存控制器110处理第二读命令B的处理效率。
图8是以第二读命令待读取的数据只包含一个子数据块B0(LB)为例进行说明。实际应用中,如果第二读命令待读取的数据中包含有多个子数据块,只要第二读命令待读取的各子数据块在缓存中均位于第一读命令待读取的数据中一个子数据块之后,且位于第一读命令待读取的数据中待传输的最后一个子数据块之前,则介质控制器110可以将第二读命令待读取的子数据优先于第一读命令待读取的子数据块发送给内存控制器106。如图9中的902所示,第二读命令B待读取的数据包含B0和B1(LB),B0和B1(LB)在缓存114中均位于第一读命令A待读取的一个子数据块A0之后,且B0和B1(LB)均位于第一读命令A待读取的数据中待传输的最后一个子数据块A2(LB)之前,则介质控制器110可以按照904所示的调度顺序将各子数据块发送给内存控制器110。具体的,可以将第二读命令待读取的数据B0和B1(LB)优先于第一读命令A待读取的子数据块A0发送给内存控制器。仍然以传输一个子数据块的传输延时为4个周期为例,经过调整发送顺序后,内存控制器110接收第二读命令B读取的数据的延时由16个延时减少为4个延时,内存控制器110接收第一读命令A读取的数据的延时仍然为20个延时。从而在一定程度上优化了内存控制器的处理效率。
另外,为了兼顾公平性,避免内存控制器106接收某个读命令的数据的延时的增加,在本发明实施例中,介质控制器110不能将在缓存中位于第一读命令的数据中待传输的最后一个子数据块之后的其他读命令待读取的子数据块优先于所述第一读命令的子数据块发送给内存控制器。例如,如图8和图9所示,第三读命令C的子数据块C0(LB)在缓存114中位于第一读命令A的子数据块A2(LB)之后,则介质控制器110不能将C0(LB)优先于第一读命令的子数据块A0、A1及A2(LB)发送给内存控制器106。否则会造成内存控制器110接收第一读命令A的数据块延时的增加。例如,在图8所示的示例中个,假设最后发送第一读命令A的子数据块,则内存控制器106接收第一读命令A的数据的延时将从16个周期增加到20个周期。
需要说明的是,在本发明实施例中,介质控制器110在调整数据块 的发送顺序时,某个读命令读取的数据中待传输的最后一个数据块不能优先于该命令的其他数据块发送。例如,介质控制器110不能将第一读命令中的子数据块A2(LB)优先于子数据块A0或A1发送给内存控制器106。
根据上述描述可以看出,在采用本发明实施例图2和图6的方法的基础上,在介质控制器110向内存控制器106返回读取的数据的过程中,通过调整各读命令读取的数据的返回顺序。不仅能够处理读取不同长度的数据的读命令,还能够降低内存控制器106接收数据的等待延时,提高了内存控制器106的处理效率。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的方法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如软盘、硬盘、磁带)、光介质(例如光盘)、或者半导体介质(例如固态硬盘(solid-state drive,SSD))等各种可以存储程序代码的非短暂性的(non-transitory)机器可读介质。
需要说明的是,本申请所提供的实施例仅仅是示意性的。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。在本发明实施例、权利要求以及附图中揭示的特征可以独立存在也可以组合存在。在本发明实施例中以硬件形式描述的特征可以通过软件来执行,反之亦然。在此不做限定。

Claims (20)

  1. 一种计算机系统,包括内存控制器、介质控制器以及与所述介质控制器连接的非易失性内存NVM,其中,
    所述NVM,用于存储数据;
    所述内存控制器连接所述介质控制器,所述内存控制器用于向所述介质控制器发送第一读命令,所述第一读命令中携带有第一ID、第一地址以及第一长度,所述第一ID为所述第一读命令的标识,所述第一长度用于指示所述第一读命令待读取的第一数据的大小;
    所述介质控制器,用于根据所述第一地址从所述NVM中读取所述第一数据;
    所述内存控制器,用于向所述介质控制器发送至少两个Send命令,其中,所述至少两个send命令用于获取至少两个第三长度的数据,所述第三长度小于所述第一长度;
    所述介质控制器,用于响应所述至少两个send命令,向所述内存控制器返回所述第三长度的至少两个子数据块以及所述至少两个子数据块的元数据,其中,所述元数据中包含有所述第一ID以及位置标识,所述位置标识用于指示对应的子数据块在所述第一数据中的偏移量;
    所述内存控制器用于根据所述至少两个子数据块的元数据中的位置标识将所述至少两个子数据块合并为所述第一数据。
  2. 根据权利要求1所述的计算机系统,其特征在于:
    所述内存控制器,还用于向所述介质控制器发送第二读命令,所述第二读命令中携带有第二ID、第二地址以及第二长度,所述第二长度用于指示所述第二读命令待读取的第二数据的大小;
    所述介质控制器,还用于根据所述第二地址从所述NVM中获取所述第二数据;
    所述内存控制器,还用于向所述介质控制器发送第二Send命令,所述第二send命令用于获取所述第三长度的数据块,所述第二长度等于所述第三长度;
    所述介质控制器,还用于响应所述第二send命令,向所述内存控制器返回所述第二数据以及所述第二数据的元数据,所述第二数据的元数据中携带有所述第二ID。
  3. 根据权利要求1或2所述的计算机系统,其特征在于,所述介质控制器还用于:
    将从所述NVM读取的所述第一数据分为所述至少两个子数据块进行缓存,并记录所述至少两个子数据块的元数据。
  4. 根据权利要求2或3所述的计算机系统,其特征在于:所述每个子数据块的元数据中还包括传输标识,所述传输标识用于指示所述子数据块是否为所述第 一数据中待传输的最后一个子数据块;
    所述计算机系统还包括:
    缓存,用于缓存从所述NVM读取的所述第一数据的至少两个子数据块以及所述第二数据;
    所述介质控制器,还用于当所述第二数据在所述缓存中位于所述第一数据的第一子数据块之后,且位于所述第一数据的第二子数据块之前时,将所述第二数据优先于所述第一子数据块发送给所述内存控制器,其中,所述第一子数据块的传输标识指示所述第一子数据块不是所述第一数据中待传输的最后一个子数据块,所述第二子数据块的传输标识指示所述第二子数据块为所述第一数据中待传输的最后一个子数据块。
  5. 根据权利要求1-4任意一项所述的计算机系统,其特征在于,还包括:
    处理器,用于向所述内存控制器发送第一访存请求,所述第一访存请求包括所述第一ID、所述第一地址以及所述第一长度;
    所述内存控制器,还用于根据所述第一访存请求向所述介质控制器发送所述第一读命令。
  6. 一种存储器,包括:
    非易失性内存NVM,用于存储数据;
    与所述NVM连接的介质控制器,所述介质控制器用于:
    接收计算机系统中的内存控制器发送的第一读命令,所述第一读命令中携带有第一ID、第一地址以及第一长度,所述第一ID为所述第一读命令的标识,所述第一长度用于指示所述第一读命令待读取的第一数据的大小;
    根据所述第一地址从所述NVM中读取所述第一数据;
    接收所述内存控制器发送的至少两个Send命令,其中,所述至少两个send命令用于获取第三长度的数据,所述第三长度小于所述第一长度;
    响应所述内存控制器发送的至少两个send命令,向所述内存控制器返回所述第三长度的至少两个子数据块以及所述至少两个子数据块的元数据,其中,每个子数据块的元数据中均包含有所述第一ID以及位置标识,所述位置标识用于指示对应的子数据块在所述第一数据中的偏移量,以便根据所述至少两个子数据块中的位置标识使所述至少两个子数据块能够被合并为所述第一数据。
  7. 根据权利要求6所述的存储器,其特征在于,所述介质控制器还用于:
    接收所述内存控制器发送的第二读命令,其中,所述第二读命令中携带有第二ID、第二地址以及第二长度,所述第二长度用于指示所述第二读命令待读取的第二数据的大小;
    根据所述第二地址从所述NVM中获取所述第二数据;
    接收所述内存控制器发送的第二send命令,所述第二send命令用于获取所述 第三长度的数据块,所述第二长度等于所述第三长度;
    响应所述第二send命令,向所述内存控制器返回所述第二数据以及所述第二数据的元数据,所述第二数据的元数据中携带有所述第二ID。
  8. 根据权利要求6或7所述的存储器,其特征在于,还包括:
    缓存,用于缓存所述介质存储器从所述NVM中读取的所述第一数据的所述至少两个子数据块;
    所述介质控制器还用于:记录所述至少两个子数据块的元数据。
  9. 根据权利要求7或8所述的存储器,其特征在于,所述每个子数据块的元数据中还包括传输标识,所述传输标识用于指示所述子数据块是否为所述第一数据中待传输的最后一个子数据块;
    所述缓存还用于缓存所述第二数据;
    所述介质控制器,还用于当所述第二数据在所述缓存中位于所述第一数据的第一子数据块之后,且位于所述第一数据的第二子数据块之前时,将所述第二数据优先于所述第一子数据块发送给所述内存控制器,其中,所述第一子数据块的传输标识指示所述第一子数据块不是所述第一数据中待传输的最后一个子数据块,所述第二子数据块的传输标识指示所述第二子数据块为所述第一数据中待传输的最后一个子数据块。
  10. 一种内存访问方法,所述方法应用于计算机系统中,所述计算机系统包括内存控制器、介质控制器以及与所述介质控制器连接的非易失性内存NVM,所述方法包括:
    所述内存控制器向所述介质控制器发送第一读命令,所述第一读命令中携带有第一ID、第一地址以及第一长度,所述第一ID为所述第一读命令的标识,所述第一长度用于指示所述第一读命令待读取的第一数据的大小;
    所述介质控制器根据所述第一地址从所述NVM中读取所述第一数据;
    所述内存控制器向所述介质控制器发送至少两个Send命令,其中,所述至少两个send命令用于获取至少两个第三长度的数据,所述第三长度小于所述第一长度;
    所述介质控制器响应所述至少两个send命令,向所述内存控制器返回所述第三长度的至少两个子数据块以及所述至少两个子数据块的元数据,其中,每个子数据块中的元数据中均包含有所述第一ID以及位置标识,所述位置标识用于指示对应的子数据块在所述第一数据中的位置;
    所述内存控制器根据所述至少两个子数据块的元数据中的位置标识将所述至少两个子数据块合并为所述第一数据。
  11. 根据权利要求10所述的内存访问方法,其特征在于,还包括:
    所述内存控制器向所述介质控制器发送第二读命令,所述第二读命令中携带有第二ID、第二地址以及第二长度,所述第二长度用于指示所述第二读命令待读取的第二数据的大小;
    所述介质控制器根据所述第二地址从所述NVM中获取所述第二数据;
    所述内存控制器向所述介质控制器发送第二Send命令,所述第二send命令用于获取所述第三长度的数据块,所述第二长度等于所述第三长度;
    所述内存控制器接收所述介质控制器根据所述第二send命令返回的所述第二数据以及所述第二数据的元数据,其中,所述第二数据的元数据中携带有所述第二ID。
  12. 根据权利要求10或11所述的内存访问方法,其特征在于,还包括:
    所述介质控制器将从所述NVM读取的所述第一数据分为所述至少两个子数据块进行缓存,并记录所述至少两个子数据块的元数据。
  13. 根据权利要求11或12所述的内存访问方法,其特征在于,所述计算机系统还包括缓存,所述每个子数据块的元数据中还包括传输标识,所述传输标识用于指示所述子数据块是否为所述第一数据中待传输的最后一个子数据块;
    所述方法还包括:
    当所述第二数据在所述缓存中位于所述第一数据的第一子数据块之后,且位于所述第一数据的第二子数据块之前时,所述介质控制器将所述第二数据优先于所述第一子数据块发送给所述内存控制器,其中,所述第一子数据块的传输标识指示所述第一子数据块不是所述第一数据中待传输的最后一个子数据块,所述第二子数据块的传输标识指示所述第二子数据块为所述第一数据中待传输的最后一个子数据块。
  14. 根据权利要求10-13任意一项所述的方法,其特征在于,还包括:
    所述内存控制器接收所述计算机系统的处理器发送的第一访存请求,所述第一访存请求包括所述第一ID、所述第一地址以及所述第一长度;
    所述内存控制器根据所述第一访存请求向所述介质控制器发送所述第一读命令。
  15. 一种内存访问方法,所述方法应用于计算机系统中,所述计算机系统包括内存控制器、介质控制器以及与所述介质控制器连接的非易失性内存NVM,所述方法包括:
    所述介质控制器接收所述内存控制器发送的第一读命令,所述第一读命令中携带有第一ID、第一地址以及第一长度,所述第一ID为所述第一读命令的标识,所述第一长度用于指示所述第一读命令待读取的第一数据的大小;
    所述介质控制器根据所述第一地址从所述NVM中读取所述第一数据;
    所述介质控制器接收所述内存控制器发送的至少两个Send命令,其中,所述至少两个send命令用于获取第三长度的数据,所述第三长度小于所述第一长度;
    所述介质控制器响应所述内存控制器发送的至少两个send命令,向所述内存控制器返回所述第三长度的至少两个子数据块以及所述至少两个子数据块的元数据,其中,每个子数据块的元数据中均包含有所述第一ID以及位置标识,所述位置标识用于指示对应的子数据块在所述第一数据中的偏移量,以便根据所述至少两个子数据块中的位置标识使所述至少两个子数据块能够被合并为所述第一数据。
  16. 根据权利要求15所述的方法,其特征在于,还包括:
    所述介质控制器接收所述内存控制器发送的第二读命令,所述第二读命令中携带有第二ID、第二地址以及第二长度,所述第二长度用于指示所述第二读命令待读取的第二数据的大小;
    所述介质控制器根据所述第二地址从所述NVM中获取所述第二数据;
    所述介质控制器接收所述内存控制器发送的第二send命令,所述第二send命令用于获取所述第三长度的数据块,所述第二长度等于所述第三长度;
    所述介质控制器响应所述第二send命令,向所述内存控制器返回所述第二数据以及所述第二数据的元数据,所述第二数据的元数据中携带有所述第二ID。
  17. 根据权利要求15或16所述的方法,其特征在于,还包括:
    所述介质控制器将从所述NVM读取的所述第一数据分为所述至少两个子数据块进行缓存,并记录所述至少两个子数据块的元数据。
  18. 根据权利要求16或17所述的方法,其特征在于,所述计算机系统还包括缓存,所述每个子数据块的元数据中还包括传输标识,所述传输标识用于指示所述子数据块是否为所述第一数据中待传输的最后一个子数据块;
    所述方法还包括:
    当所述第二数据在所述缓存中位于所述第一数据的第一子数据块之后,且位于所述第一数据的第二子数据块之前时,所述介质控制器将所述第二数据优先于所述第一子数据块发送给所述内存控制器,其中,所述第一子数据块的传输标识指示所述第一子数据块不是所述第一数据中待传输的最后一个子数据块,所述第二子数据块的传输标识指示所述第二子数据块为所述第一数据中待传输的最后一个子数据块。
  19. 一种内存访问方法,所述方法应用于计算机系统中,所述计算机系统包括内存控制器、介质控制器以及与所述介质控制器连接的非易失性内存NVM,所述方法包括:
    所述内存控制器向所述介质控制器发送第一读命令,所述第一读命令中携带 有第一ID、第一地址以及第一长度,所述第一ID为所述第一读命令的标识,所述第一长度用于指示所述第一读命令待读取的第一数据的大小;
    所述内存控制器向所述介质控制器发送至少两个Send命令,其中,所述至少两个send命令用于获取至少两个第三长度的数据,所述第三长度小于所述第一长度;
    所述内存控制器接收所述介质控制器响应所述至少两个send命令发送的所述第三长度的至少两个子数据块以及所述至少两个子数据块的元数据,其中,所述至少两个子数据块是所述介质控制器根据所述第一地址从所述NVM中获取的,每个子数据块的元数据中均包含有所述第一ID以及位置标识,所述位置标识用于指示对应的子数据块在所述第一数据中的位置;
    根据所述至少两个子数据块的元数据中的位置标识将所述至少两个子数据块合并为所述第一数据。
  20. 根据权利要求19所述的方法,其特征在于,还包括:
    所述内存控制器向所述介质控制器发送第二读命令,所述第二读命令中携带有第二ID、第二地址以及第二长度,所述第二长度用于指示所述第二读命令待读取的第二数据的大小;
    所述内存控制器向所述介质控制器发送第二send命令,所述第二send命令用于获取所述第三长度的数据块,所述第二长度等于所述第三长度;
    所述内存控制器接收所述介质控制器根据所述第二send命令返回的所述第二数据以及所述第二数据的元数据,其中,所述第二数据是所述介质控制器根据所述第二地址从所述NVM中获取的,所述第二数据的元数据中携带有所述第二ID。
PCT/CN2017/089774 2017-06-23 2017-06-23 内存访问技术及计算机系统 WO2018232736A1 (zh)

Priority Applications (15)

Application Number Priority Date Filing Date Title
BR112019026942-8A BR112019026942B1 (pt) 2017-06-23 2017-06-23 Tecnologia de acesso à memória e sistema de computador
ES17914958T ES2840423T3 (es) 2017-06-23 2017-06-23 Tecnología de acceso a la memoria y sistema informático
EP17914958.8A EP3480702B1 (en) 2017-06-23 2017-06-23 Memory access technology and computer system
CN201780043116.5A CN109478168B (zh) 2017-06-23 2017-06-23 内存访问技术及计算机系统
KR1020227031161A KR102532173B1 (ko) 2017-06-23 2017-06-23 메모리 액세스 기술 및 컴퓨터 시스템
PCT/CN2017/089774 WO2018232736A1 (zh) 2017-06-23 2017-06-23 内存访问技术及计算机系统
JP2019570989A JP6900518B2 (ja) 2017-06-23 2017-06-23 メモリアクセス技術およびコンピュータシステム
KR1020217039534A KR102443106B1 (ko) 2017-06-23 2017-06-23 메모리 액세스 기술 및 컴퓨터 시스템
KR1020207001375A KR102336232B1 (ko) 2017-06-23 2017-06-23 메모리 액세스 기술 및 컴퓨터 시스템
EP22188013.1A EP4152166A3 (en) 2017-06-23 2017-06-23 Memory access technology and computer system
EP20195180.3A EP3822798B1 (en) 2017-06-23 2017-06-23 Memory access technology and computer system
US16/284,609 US10732876B2 (en) 2017-06-23 2019-02-25 Memory access technology and computer system
US16/927,066 US11231864B2 (en) 2017-06-23 2020-07-13 Memory access technology and computer system
JP2021099325A JP7162102B2 (ja) 2017-06-23 2021-06-15 メモリアクセス技術およびコンピュータシステム
US17/569,911 US11681452B2 (en) 2017-06-23 2022-01-06 Memory access technology and computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/089774 WO2018232736A1 (zh) 2017-06-23 2017-06-23 内存访问技术及计算机系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/284,609 Continuation US10732876B2 (en) 2017-06-23 2019-02-25 Memory access technology and computer system

Publications (1)

Publication Number Publication Date
WO2018232736A1 true WO2018232736A1 (zh) 2018-12-27

Family

ID=64735409

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/089774 WO2018232736A1 (zh) 2017-06-23 2017-06-23 内存访问技术及计算机系统

Country Status (8)

Country Link
US (3) US10732876B2 (zh)
EP (3) EP3822798B1 (zh)
JP (2) JP6900518B2 (zh)
KR (3) KR102532173B1 (zh)
CN (1) CN109478168B (zh)
BR (1) BR112019026942B1 (zh)
ES (1) ES2840423T3 (zh)
WO (1) WO2018232736A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10877669B1 (en) * 2011-06-30 2020-12-29 Amazon Technologies, Inc. System and method for providing a committed throughput level in a data store
US10831650B2 (en) * 2018-03-07 2020-11-10 Exten Technologies, Inc. Systems and methods for accessing non-volatile memory and write acceleration cache
US11442634B2 (en) * 2018-04-12 2022-09-13 Micron Technology, Inc. Replay protected memory block command queue
US10969994B2 (en) * 2018-08-08 2021-04-06 Micron Technology, Inc. Throttle response signals from a memory system
US11074007B2 (en) 2018-08-08 2021-07-27 Micron Technology, Inc. Optimize information requests to a memory system
US11409436B2 (en) 2018-08-08 2022-08-09 Micron Technology, Inc. Buffer management in memory systems for read and write requests
US10782916B2 (en) 2018-08-08 2020-09-22 Micron Technology, Inc. Proactive return of write credits in a memory system
US11210093B2 (en) 2019-04-08 2021-12-28 Micron Technology, Inc. Large data read techniques
US11256423B2 (en) * 2019-10-14 2022-02-22 Western Digital Technologies, Inc. Efficiently identifying command readiness based on system state and data spread in multi queue depth environment
CN110781120B (zh) * 2019-10-23 2023-02-28 山东华芯半导体有限公司 一种axi总线主机设备跨4kb传输的实现方法
US11599485B2 (en) * 2020-11-25 2023-03-07 Micron Technology, Inc. Status check using signaling

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876944A (zh) * 2009-11-26 2010-11-03 威盛电子股份有限公司 动态随机存取存储器控制器和控制方法
US20110041039A1 (en) * 2009-08-11 2011-02-17 Eliyahou Harari Controller and Method for Interfacing Between a Host Controller in a Host and a Flash Memory Device
CN102414666A (zh) * 2009-05-06 2012-04-11 苹果公司 用于受管理的非易失性存储器的低等待时间读取操作
CN103034603A (zh) * 2012-12-07 2013-04-10 天津瑞发科半导体技术有限公司 多通道闪存卡控制装置及其控制方法
CN106843772A (zh) * 2017-02-14 2017-06-13 郑州云海信息技术有限公司 一种基于一致性总线扩展非易失内存的系统及方法

Family Cites Families (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07302176A (ja) * 1994-05-09 1995-11-14 Toshiba Corp 半導体ディスク装置
US7480781B2 (en) * 2004-12-30 2009-01-20 Intel Corporation Apparatus and method to merge and align data from distributed memory controllers
WO2010093356A1 (en) * 2009-02-11 2010-08-19 Stec, Inc. A flash backed dram module
TWI454906B (zh) * 2009-09-24 2014-10-01 Phison Electronics Corp 資料讀取方法、快閃記憶體控制器與儲存系統
JP5611889B2 (ja) * 2011-05-17 2014-10-22 株式会社東芝 データ転送装置、データ送信システムおよびデータ送信方法
US9294564B2 (en) * 2011-06-30 2016-03-22 Amazon Technologies, Inc. Shadowing storage gateway
US8793343B1 (en) * 2011-08-18 2014-07-29 Amazon Technologies, Inc. Redundant storage gateways
CN102609378B (zh) * 2012-01-18 2016-03-30 中国科学院计算技术研究所 一种消息式内存访问装置及其访问方法
CN104216837A (zh) * 2013-05-31 2014-12-17 华为技术有限公司 一种内存系统、内存访问请求的处理方法和计算机系统
CN104375946B (zh) * 2013-08-16 2018-04-20 华为技术有限公司 一种数据处理的方法及装置
JP6217241B2 (ja) 2013-08-28 2017-10-25 コニカミノルタ株式会社 胸部診断支援システム
US9021154B2 (en) * 2013-09-27 2015-04-28 Intel Corporation Read training a memory controller
JP6287571B2 (ja) * 2014-05-20 2018-03-07 富士通株式会社 演算処理装置、情報処理装置、及び、演算処理装置の制御方法
US9823864B2 (en) * 2014-06-02 2017-11-21 Micron Technology, Inc. Systems and methods for throttling packet transmission in a scalable memory system protocol
KR102249416B1 (ko) * 2014-06-11 2021-05-07 삼성전자주식회사 메모리 시스템 및 메모리 시스템의 구동 방법
WO2016071954A1 (ja) * 2014-11-04 2016-05-12 株式会社日立製作所 半導体メモリデバイス、及び、半導体メモリデバイスを有するストレージ装置
US9711194B2 (en) * 2015-01-28 2017-07-18 Xilinx, Inc. Circuits for and methods of controlling the operation of a hybrid memory system
US9778864B2 (en) * 2015-03-10 2017-10-03 SK Hynix Inc. Data storage device using non-sequential segment access and operating method thereof
JP6515602B2 (ja) * 2015-03-12 2019-05-22 日本電気株式会社 データ処理装置及びデータ処理方法
JP6541998B2 (ja) * 2015-03-24 2019-07-10 東芝メモリ株式会社 メモリデバイス、半導体装置および情報処理装置
US10353747B2 (en) * 2015-07-13 2019-07-16 Futurewei Technologies, Inc. Shared memory controller and method of using same
US10254990B2 (en) * 2015-12-07 2019-04-09 Netapp, Inc. Direct access to de-duplicated data units in memory-based file systems
US9460791B1 (en) * 2015-12-08 2016-10-04 Inphi Corporation Data clock synchronization in hybrid memory modules
US10152237B2 (en) * 2016-05-05 2018-12-11 Micron Technology, Inc. Non-deterministic memory protocol
KR102554416B1 (ko) * 2016-08-16 2023-07-11 삼성전자주식회사 메모리 장치의 내부 상태 출력 장치 및 이를 적용하는 메모리 시스템
US20180059933A1 (en) * 2016-08-26 2018-03-01 Sandisk Technologies Llc Electrically-Buffered NV-DIMM and Method for Use Therewith
US10542089B2 (en) * 2017-03-10 2020-01-21 Toshiba Memory Corporation Large scale implementation of a plurality of open channel solid state drives

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102414666A (zh) * 2009-05-06 2012-04-11 苹果公司 用于受管理的非易失性存储器的低等待时间读取操作
US20110041039A1 (en) * 2009-08-11 2011-02-17 Eliyahou Harari Controller and Method for Interfacing Between a Host Controller in a Host and a Flash Memory Device
CN101876944A (zh) * 2009-11-26 2010-11-03 威盛电子股份有限公司 动态随机存取存储器控制器和控制方法
CN103034603A (zh) * 2012-12-07 2013-04-10 天津瑞发科半导体技术有限公司 多通道闪存卡控制装置及其控制方法
CN106843772A (zh) * 2017-02-14 2017-06-13 郑州云海信息技术有限公司 一种基于一致性总线扩展非易失内存的系统及方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3480702A4 *

Also Published As

Publication number Publication date
EP4152166A3 (en) 2023-04-26
JP2021152933A (ja) 2021-09-30
JP7162102B2 (ja) 2022-10-27
CN109478168B (zh) 2020-12-04
EP3822798A2 (en) 2021-05-19
EP3480702A4 (en) 2019-09-04
KR20200019706A (ko) 2020-02-24
BR112019026942B1 (pt) 2024-02-15
US11231864B2 (en) 2022-01-25
KR20220129100A (ko) 2022-09-22
EP4152166A2 (en) 2023-03-22
EP3822798B1 (en) 2022-08-24
EP3480702B1 (en) 2020-09-30
KR102532173B1 (ko) 2023-05-16
US20220206686A1 (en) 2022-06-30
CN109478168A (zh) 2019-03-15
KR102336232B1 (ko) 2021-12-07
EP3480702A1 (en) 2019-05-08
BR112019026942A2 (pt) 2020-07-07
US20200393965A1 (en) 2020-12-17
US11681452B2 (en) 2023-06-20
US20190196716A1 (en) 2019-06-27
KR20210150611A (ko) 2021-12-10
KR102443106B1 (ko) 2022-09-14
EP3822798A3 (en) 2021-06-09
ES2840423T3 (es) 2021-07-06
JP2020524859A (ja) 2020-08-20
JP6900518B2 (ja) 2021-07-07
US10732876B2 (en) 2020-08-04

Similar Documents

Publication Publication Date Title
JP7162102B2 (ja) メモリアクセス技術およびコンピュータシステム
US20200218662A1 (en) Data caching device and control method therefor, data processing chip, and data processing system
JP6373487B2 (ja) 方法、プログラム、装置、メモリデバイス、電子デバイス、およびコンピュータ可読記録媒体
WO2013170731A1 (zh) 将数据写入存储设备的方法与存储设备
TW201234188A (en) Memory access device for memory sharing among multiple processors and access method for the same
CN111448543B (zh) 内存访问技术及计算机系统
CN107783727B (zh) 一种内存设备的访问方法、装置和系统
KR20200100151A (ko) 집단화된 메모리 장치에 대한 메모리 요청 스케줄링
CN117312201B (zh) 一种数据传输方法、装置及加速器设备、主机和存储介质
EP2998867B1 (en) Data writing method and memory system
US8639840B2 (en) Processing unit, chip, computing device and method for accelerating data transmission
WO2019084789A1 (zh) 直接存储器访问控制器、数据读取方法和数据写入方法
CN110781107A (zh) 基于dram接口的低延迟融合io控制方法和装置
US20220253238A1 (en) Method and apparatus for accessing solid state disk
US8959278B2 (en) System and method for scalable movement and replication of data
CN117472817A (zh) 数据处理方法、装置、系统及网卡

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17914958

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017914958

Country of ref document: EP

Effective date: 20190204

ENP Entry into the national phase

Ref document number: 2019570989

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112019026942

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 20207001375

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 112019026942

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20191217