CN103838676A - Data storage system, data storage method and PCM bridge - Google Patents
Data storage system, data storage method and PCM bridge Download PDFInfo
- Publication number
- CN103838676A CN103838676A CN201210478421.6A CN201210478421A CN103838676A CN 103838676 A CN103838676 A CN 103838676A CN 201210478421 A CN201210478421 A CN 201210478421A CN 103838676 A CN103838676 A CN 103838676A
- Authority
- CN
- China
- Prior art keywords
- pcm
- data
- read
- small data
- operation signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明实施例提供一种数据存储系统、数据存储方法及PCM桥,该系统包括:处理器、内存控制器、相变存储器PCM桥以及相变存储器PCM,处理器通过内存控制器与PCM桥相连,PCM桥与PCM相连,PCM中存储有非易失性的小数据,PCM桥用于通过内存控制器接收来自CPU的用于读或写小数据的第一操作信号,将第一操作信号转化成能对PCM进行读或写的第二操作信号以通过第二操作信号对PCM中的小数据进行读或往PCM中写入小数据。本发明实施例提供的数据存储系统、数据存储方法及PCM桥,利用PCM读或写可按位读或写,提升了操作效率,增加了系统寿命,加速数据访问的能力。
Embodiments of the present invention provide a data storage system, a data storage method, and a PCM bridge. The system includes: a processor, a memory controller, a phase-change memory PCM bridge, and a phase-change memory PCM. The processor is connected to the PCM bridge through the memory controller. , the PCM bridge is connected to the PCM, and non-volatile small data is stored in the PCM, and the PCM bridge is used to receive the first operation signal for reading or writing small data from the CPU through the memory controller, and convert the first operation signal A second operation signal capable of reading or writing to the PCM is formed to read small data in the PCM or write small data in the PCM through the second operation signal. The data storage system, the data storage method and the PCM bridge provided by the embodiments of the present invention can be read or written bit by bit by using the PCM, which improves the operation efficiency, increases the life of the system, and accelerates the ability of data access.
Description
技术领域technical field
本发明实施例涉及数据存储技术,尤其涉及一种数据存储系统、数据存储方法及PCM桥。The embodiments of the present invention relate to data storage technologies, and in particular to a data storage system, a data storage method and a PCM bridge.
背景技术Background technique
在传统NAND闪存NAND Flash构成的存储架构中,在存储系统中数据写入NAND Flash时,NAND Flash需要经过读取到动态随机存取存储器(Dynamic RandomAccess Memory,以下简称:DRAM),在DRAM中修改,然后写回NAND Flash中的过程;在写入过程中,元数据Metadata与用户数据Userdata一起写入到NAND Flash中,元数据Metadata通常存放在NANDMetadata block中,由于元数据Metadata尺寸一般小于基于NAND Flash存储的文件系统最小块的大小并且更新频繁,一方面造成了NAND Flash的额外管理开销,另一方面也加重了NAND Flash的寿命损耗;另外对NAND Flash本身操作也需要先擦除Erase然后才能编程。In the storage architecture composed of traditional NAND flash memory NAND Flash, when data is written into NAND Flash in the storage system, NAND Flash needs to be read into Dynamic Random Access Memory (Dynamic Random Access Memory, hereinafter referred to as: DRAM), and modified in DRAM. , and then write back to the process in NAND Flash; in the writing process, the metadata Metadata and the user data Userdata are written into the NAND Flash together, and the metadata Metadata is usually stored in the NANDMetadata block, because the size of the metadata Metadata is generally smaller than that based on NAND The minimum block size of the file system stored in Flash and the frequent updates cause additional management overhead for NAND Flash on the one hand, and increase the life loss of NAND Flash on the other hand; in addition, the operation of NAND Flash itself needs to be erased first before it can be used. programming.
在实现本发明实施例的过程中,发明人发现现有技术中,NAND Flash写入流程复杂,不支持直接写入,需要先读取到DRAM中修改;元数据Matadata频繁修改会加速损耗NAND Flash寿命,并且元数据Matadata多数是小数据,小于基于NAND Flash的文件系统最小块设备管理尺寸,造成文件系统负载的浪费。In the process of realizing the embodiment of the present invention, the inventor found that in the prior art, the NAND Flash writing process is complicated, does not support direct writing, and needs to be read into DRAM for modification; frequent modification of metadata Matadata will accelerate the loss of NAND Flash Lifespan, and most of the metadata Matadata is small data, which is smaller than the minimum block device management size of the NAND Flash-based file system, resulting in a waste of file system load.
发明内容Contents of the invention
本实施例提供了一种数据存储系统、数据存储方法及PCM桥,用于解决现有技术存在着的读写NAND Flash造成文件系统负载浪费的问题。This embodiment provides a data storage system, a data storage method and a PCM bridge, which are used to solve the problem in the prior art that reading and writing NAND Flash causes a waste of file system load.
第一方面,本发明实施例提供一种数据存储系统,包括:In a first aspect, an embodiment of the present invention provides a data storage system, including:
处理器、内存控制器、相变存储器PCM桥以及相变存储器PCM;Processor, memory controller, phase change memory PCM bridge and phase change memory PCM;
所述处理器通过所述内存控制器与所述PCM桥相连,所述PCM桥与所述PCM相连;The processor is connected to the PCM bridge through the memory controller, and the PCM bridge is connected to the PCM;
所述PCM中存储有非易失性的小数据;Non-volatile small data is stored in the PCM;
所述PCM桥用于通过所述内存控制器接收来自所述CPU的用于读或写小数据的第一操作信号,将所述第一操作信号转化成能对所述PCM进行读或写的第二操作信号以通过所述第二操作信号对所述PCM中的小数据进行读或往所述PCM中写入小数据。The PCM bridge is used to receive a first operation signal from the CPU for reading or writing small data through the memory controller, and convert the first operation signal into a signal capable of reading or writing the PCM. The second operation signal is used to read small data in the PCM or write small data in the PCM through the second operation signal.
结合第一方面,在第一方面的第一种可能的实施方式中,所述PCM具体用于存储经常读或写的非易失性小数据。With reference to the first aspect, in a first possible implementation manner of the first aspect, the PCM is specifically used to store non-volatile small data that is often read or written.
结合第一方面或第一方面的第一种可能的实施方式,在第一方面的第二种可能的实施方式中,所述第一操作信号包括读信号,所述将所述第一操作信号转化成能对所述PCM进行读的第二操作信号以通过所述第二操作信号对所述PCM中的小数据进行读包括:With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the first operation signal includes a read signal, and the first operation signal Converting into a second operation signal capable of reading the PCM so as to read the small data in the PCM through the second operation signal includes:
将所述读信号转化成能对所述PCM进行读的读信号以通过所述读信号对所述PCM中的小数据进行读。converting the read signal into a read signal capable of reading the PCM so as to read small data in the PCM through the read signal.
结合第一方面或第一方面的第一种可能的实施方式或第一方面的第二种可能的实施方式,在第一方面的第三种可能的实施方式中,所述PCM桥还用于:With reference to the first aspect or the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect, in the third possible implementation manner of the first aspect, the PCM bridge is also used for :
通过所述内存控制器接收来自所述CPU的用于对所述PCM存储的所述小数据的存储位置进行调整的调整信号,所述对所述PCM存储的所述小数据的存储位置进行调整包括:将所述PCM存储的使用频率较低的小数据从所述PCM存储器移出,或者将使用频率较高的小数据移动到所述PCM存储器;The memory controller receives an adjustment signal from the CPU for adjusting the storage location of the small data stored in the PCM, the adjusting the storage location of the small data stored in the PCM Including: moving the small data stored in the PCM with a low frequency of use from the PCM memory, or moving the small data with a high frequency of use to the PCM memory;
将所述调整信号转化成能对所述PCM进行读或写的调整信号以通过所述调整信号对所述PCM中的所述小数据的存储位置进行调整。converting the adjustment signal into an adjustment signal capable of reading or writing the PCM so as to adjust the storage location of the small data in the PCM through the adjustment signal.
结合第一方面或第一方面的第一种可能的实施方式或第一方面的第二种可能的实施方式或第一方面的第三种可能的实施方式,还包括:In combination with the first aspect or the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect or the third possible implementation manner of the first aspect, it further includes:
内存,通过所述内存控制器与所述处理器相连,用于存储CPU执行程序时所需的数据。The memory, connected to the processor through the memory controller, is used to store data required by the CPU for executing programs.
外设存储器,用于通过外设接口与所述CPU相连;Peripheral memory, used to connect with the CPU through a peripheral interface;
所述外设存储器存储有非易失性的大数据,所述CPU还用于通过所述外设接口对所述外设存储器进行读或写操作,其中,所述大数据为比小数据大的数据。The peripheral memory stores non-volatile large data, and the CPU is also used to read or write the peripheral memory through the peripheral interface, wherein the large data is larger than the small data The data.
结合第一方面或第一方面的第一种可能的实施方式或第一方面的第二种可能的实施方式或第一方面的第三种可能的实施方式,所述小数据为小的用户数据,或者元数据metadata,或者系统日志数据中的任意一种或多种。In combination with the first aspect or the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect or the third possible implementation manner of the first aspect, the small data is small user data , or metadata, or any one or more of system log data.
结合第一方面及第一方面的所有实施方式,在另一实施例中,所述小数据为大小小于通用flash操作时的块操作数据。Combining the first aspect and all implementation manners of the first aspect, in another embodiment, the small data is block operation data whose size is smaller than that of general flash operations.
结合第一方面及第一方面的所有实施方式,在另一实施例中,所述小数据字节大小小于或等于512字节。Combining the first aspect and all implementation manners of the first aspect, in another embodiment, the size of the small data byte is less than or equal to 512 bytes.
第二方面,本发明实施例提供一种数据存储方法,包括:In a second aspect, an embodiment of the present invention provides a data storage method, including:
通过与所述PCM桥相连的内存控制器接收来自与所述内存控制器相连的CPU的用于对与所述PCM桥相连的相变存储器PCM中存储的非易失性的小数据进行读或写的第一操作信号;The memory controller connected to the PCM bridge is used to read or store the non-volatile small data stored in the phase change memory PCM connected to the PCM bridge from the CPU connected to the memory controller. write first operation signal;
将所述第一操作信号转化成能对所述PCM进行读或写的第二操作信号以通过所述第二操作信号对所述PCM中的小数据进行读或往所述PCM中写入小数据。converting the first operation signal into a second operation signal capable of reading or writing the PCM so as to read small data in the PCM or write small data in the PCM through the second operation signal data.
在第二方面的第一种实施方式中,所述小数据为被经常读或写的小数据。In the first implementation manner of the second aspect, the small data is small data that is frequently read or written.
结合第二方面或第二方面的第一种实施方式,在第二方面的第二种实施方式中,所述第一操作信号包括读信号,所述将所述第一操作信号转化成能对所述PCM进行读的第二操作信号以通过所述第二操作信号对所述PCM中的小数据进行读包括:With reference to the second aspect or the first implementation manner of the second aspect, in the second implementation manner of the second aspect, the first operation signal includes a read signal, and the conversion of the first operation signal into a The second operation signal that the PCM reads to read the small data in the PCM through the second operation signal includes:
将所述读信号转化成能对所述PCM进行读的读信号以通过所述读信号对所述PCM中的小数据进行读。converting the read signal into a read signal capable of reading the PCM so as to read small data in the PCM through the read signal.
结合第二方面或第二方面的第一种实施方式或第二方面的第二种实施方式,在第二方面的第三种实施方式中,还包括:In combination with the second aspect or the first implementation manner of the second aspect or the second implementation manner of the second aspect, in the third implementation manner of the second aspect, it further includes:
通过所述内存控制器接收来自所述CPU的用于对所述PCM存储的所述小数据的存储位置进行调整的调整信号,所述对所述PCM存储的所述小数据的存储位置进行调整包括:将所述PCM存储的使用频率较低的小数据从所述PCM存储器移出,或者将使用频率较高的小数据移动到所述PCM存储器;The memory controller receives an adjustment signal from the CPU for adjusting the storage location of the small data stored in the PCM, the adjusting the storage location of the small data stored in the PCM Including: moving the small data stored in the PCM with a low frequency of use from the PCM memory, or moving the small data with a high frequency of use to the PCM memory;
将所述调整信号转化成能对所述PCM进行读或写的调整信号以通过所述调整信号对所述PCM中的所述小数据的存储位置进行调整。converting the adjustment signal into an adjustment signal capable of reading or writing the PCM so as to adjust the storage location of the small data in the PCM through the adjustment signal.
结合第二方面或第二方面的第一种实施方式或第二方面的第二种实施方式或第二方面的第三种实施方式,在第二方面的第四种实施方式中,还包括:In combination with the second aspect or the first implementation manner of the second aspect or the second implementation manner of the second aspect or the third implementation manner of the second aspect, the fourth implementation manner of the second aspect further includes:
通过所述内存控制器与处理器相连的内存存储CPU运行所需的数据,以供所述CPU读或写执行程序所需的数据;The memory connected to the processor through the memory controller stores the data required for the CPU to run, so that the CPU can read or write the data required to execute the program;
外设存储器通过外设接口与所述CPU相连;The peripheral memory is connected to the CPU through a peripheral interface;
所述外设存储器存储有非易失性的大数据,所述CPU还用于通过所述外设接口对所述外设存储器进行读或写操作。The peripheral memory stores non-volatile big data, and the CPU is also used to read or write the peripheral memory through the peripheral interface.
结合第二方面或第二方面的第一种实施方式或第二方面的第二种实施方式或第二方面的第三种实施方式或第二方面的第四种实施方式,所述小数据为小的用户数据,或者元数据metadata,或者系统日志数据中的任意一种或多种;或者,In combination with the second aspect or the first implementation manner of the second aspect or the second implementation manner of the second aspect or the third implementation manner of the second aspect or the fourth implementation manner of the second aspect, the small data is Any one or more of small user data, or metadata, or system log data; or,
所述小数据为小于通用flash操作时的块操作数据;或者,The small data is less than the block operation data during the general flash operation; or,
所述小数据大小为小于或等于512字节。The small data size is less than or equal to 512 bytes.
第三方面,本发明实施例提供一种PCM桥,包括:In a third aspect, an embodiment of the present invention provides a PCM bridge, including:
接收单元,用于通过与所述PCM桥相连的内存控制器接收来自与所述内存控制器相连的CPU的用于对与所述PCM桥相连的相变存储器PCM中存储的非易失性的小数据进行读或写的第一操作信号;The receiving unit is used to receive the non-volatile data stored in the phase change memory PCM connected to the PCM bridge from the CPU connected to the memory controller through the memory controller connected to the PCM bridge. The first operation signal for reading or writing small data;
转化单元,用于将所述接收单元接收的所述第一操作信号转化成能对所述PCM进行读或写的第二操作信号;a conversion unit, configured to convert the first operation signal received by the receiving unit into a second operation signal capable of reading or writing the PCM;
读或写单元,用于根据所述转化单元转化的所述第二操作信号对所述PCM中的小数据进行读或往所述PCM中写入小数据。A read or write unit, configured to read small data in the PCM or write small data in the PCM according to the second operation signal converted by the conversion unit.
在第三方面的第一种实施方式中,所述小数据为被经常读或写的小数据。In the first implementation manner of the third aspect, the small data is small data that is frequently read or written.
结合第三方面或第三方面的第一种实施方式,在第三方面的第二种实施方式中,所述第一操作信号包括读信号,所述将所述第一操作信号转化成能对所述PCM进行读的第二操作信号以通过所述第二操作信号对所述PCM中的小数据进行读包括:With reference to the third aspect or the first implementation manner of the third aspect, in the second implementation manner of the third aspect, the first operation signal includes a read signal, and the conversion of the first operation signal into a The second operation signal that the PCM reads to read the small data in the PCM through the second operation signal includes:
将所述读信号转化成能对所述PCM进行读的读信号以通过所述读信号对所述PCM中的小数据进行读。converting the read signal into a read signal capable of reading the PCM so as to read small data in the PCM through the read signal.
结合第三方面或第三方面的第一种实施方式或第三方面的第二种实施方式,所述小数据为小的用户数据,或者元数据metadata,或者系统日志数据中的任意一种或多种;或者,In combination with the third aspect or the first implementation manner of the third aspect or the second implementation manner of the third aspect, the small data is any one of small user data, or metadata, or system log data, or Various; or,
所述小数据为小于通用flash操作时的块操作数据;或者The small data is less than the block operation data during general flash operation; or
所述小数据字节大小为小于等于512字节。The small data byte size is less than or equal to 512 bytes.
本发明实施例提供的数据存储系统、数据存储方法及PCM桥,处理器通过内存控制器与PCM桥相连,PCM桥与PCM相连,PCM中存储有非易失性的小数据,PCM桥用于通过内存控制器接收来自CPU的用于对PCM存储的小数据进行读或写的第一操作信号,将第一操作信号转化成能对PCM进行物理读或写的第二操作信号以通过第二操作信号对PCM中的小数据进行读或写。实现了利用PCM读或写可按位读或写的特性,提升了操作效率,增加了系统寿命,加速数据访问的能力。In the data storage system, data storage method, and PCM bridge provided by the embodiments of the present invention, the processor is connected to the PCM bridge through a memory controller, and the PCM bridge is connected to the PCM. Non-volatile small data is stored in the PCM, and the PCM bridge is used for The first operation signal used to read or write the small data stored in the PCM is received by the memory controller from the CPU, and the first operation signal is converted into a second operation signal capable of physically reading or writing the PCM to pass through the second The operation signal reads or writes small data in the PCM. The feature of using PCM to read or write can be read or written bit by bit, which improves the operation efficiency, increases the system life, and accelerates the ability of data access.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为本发明实施例提供的数据存储系统实施例一的结构示意图;FIG. 1 is a schematic structural diagram of Embodiment 1 of a data storage system provided by an embodiment of the present invention;
图2为本发明实施例提供的数据存储系统实施例二的结构示意图;FIG. 2 is a schematic structural diagram of Embodiment 2 of the data storage system provided by the embodiment of the present invention;
图3为本发明实施例提供的数据存储系统实施例三的结构示意图;FIG. 3 is a schematic structural diagram of Embodiment 3 of the data storage system provided by the embodiment of the present invention;
图4为本发明实施例提供的数据存储系统实施例四的软件构成结构示意图;FIG. 4 is a schematic diagram of the software structure of Embodiment 4 of the data storage system provided by the embodiment of the present invention;
图5为本发明实施例提供的数据存储方法实施例一的流程示意图;FIG. 5 is a schematic flowchart of Embodiment 1 of the data storage method provided by the embodiment of the present invention;
图6为本发明实施例提供的数据存储方法的数据写入流程示意图;FIG. 6 is a schematic diagram of a data writing process of a data storage method provided by an embodiment of the present invention;
图7为本发明实施例提供的PCM桥实施例一的结构示意图。FIG. 7 is a schematic structural diagram of Embodiment 1 of a PCM bridge provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
在传统基于DRAM&Flash/HDD的存储系统中,存储器Memory是高速易失性的,存储器Storage是相对低速非易失的,二者有不可跨越的鸿沟。PCM拥有接近DRAM的读或写延迟和优秀的划等级Scale能力,预示其容量扩展的潜力,并且还具有字节Byte可变性和非易失性,模糊了存储器Memory和存储器Storage的界限。在闪存Flash工艺面临物理极限,PCM作为最有可能取代闪存Flash的技术,设计基于PCM的存储方案,可以最大化发挥器件的性能。In a traditional DRAM&Flash/HDD-based storage system, the memory is volatile at high speed, and the storage is relatively low-speed non-volatile. There is an insurmountable gap between the two. PCM has read or write latency close to DRAM and excellent graded Scale capability, indicating its potential for capacity expansion, and also has Byte variability and non-volatility, blurring the boundaries between memory and storage. As the Flash technology faces physical limits, PCM is the most likely technology to replace Flash, and designing a PCM-based storage solution can maximize device performance.
下面结合附图详细说明本发明实施例提供的数据存储系统、数据存储方法及PCM桥。The data storage system, data storage method, and PCM bridge provided by the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.
图1为本发明实施例提供的数据存储系统实施例一的结构示意图,如图1所示,数据存储系统包括处理器11、内存控制器12、相变存储器PCM桥13以及相变存储器PCM14,其中,FIG. 1 is a schematic structural diagram of Embodiment 1 of a data storage system provided by an embodiment of the present invention. As shown in FIG. 1 , the data storage system includes a
处理器11通过内存控制器12与PCM桥13相连,PCM桥13与PCM14相连,PCM14中存储有非易失性的小数据(非易失性是指下电后数据不会消失,仍然保存在存储器中),PCM桥13用于通过内存控制器12接收来自CPU的用于读或写小数据的第一操作信号,将第一操作信号转化成能对PCM14进行读或写的第二操作信号以通过第二操作信号对PCM14中的小数据进行读或往PCM14中写入小数据。第一操作信号包括读或写信号,将第一操作信号转化成能对PCM进行读或写的第二操作信号以通过第二操作信号对PCM中的小数据进行读或写包括:将读或写信号转化成能对PCM进行读或写的读或写信号以通过读或写信号对PCM中的小数据进行读或写。例如,CPU下发逻辑写的第一操作信号,PCM桥通过内存控制器接收此第一操作信号,然后将第一操作信号转化成能对PCM进行物理读或写的第二操作信号以通过第二操作信号对PCM中的小数据进行写操作。读操作与此类似,此处不做赘述。The
其中,小数据为被经常读或写的小数据,可根据不同的情况而定,本实施例对此不做限制。Wherein, the small data is small data that is often read or written, and may be determined according to different situations, which is not limited in this embodiment.
其中,PCM桥还用于通过内存控制器接收来自CPU的用于对PCM存储的小数据的存储位置进行调整的调整信号,对PCM存储的小数据的存储位置进行调整包括:将PCM存储的使用频率较低的小数据从PCM存储器移出,或者将使用频率较高的小数据移动到PCM存储器;将调整信号转化成能对PCM进行读或写的调整信号以通过调整信号对PCM中的小数据的存储位置进行调整。Wherein, the PCM bridge is also used to receive an adjustment signal from the CPU for adjusting the storage location of the small data stored in the PCM through the memory controller, and adjusting the storage location of the small data stored in the PCM includes: The small data with lower frequency is moved from the PCM memory, or the small data with higher frequency is moved to the PCM memory; the adjustment signal is converted into an adjustment signal that can read or write the PCM to adjust the small data in the PCM through the adjustment signal to adjust the storage location.
本实施例提供的数据存储系统,处理器通过内存控制器与PCM桥相连,PCM桥与PCM相连,PCM中存储有非易失性的小数据,PCM桥用于通过内存控制器接收来自CPU的用于对PCM存储的小数据进行读或写的第一操作信号,将第一操作信号转化成能对PCM进行物理读或写的第二操作信号以通过第二操作信号对PCM中的小数据进行读或写。利用PCM读或写可按位读或写,需要读或写的时候,只需要几位即可,提升了操作效率。同时,由于每次并不需要读或写一个块,从而可以增加寿命,因此实现提升了操作效率,增加了系统寿命,加速数据访问的能力。In the data storage system provided by this embodiment, the processor is connected to the PCM bridge through the memory controller, and the PCM bridge is connected to the PCM. Non-volatile small data is stored in the PCM, and the PCM bridge is used to receive data from the CPU through the memory controller. The first operation signal used to read or write the small data stored in the PCM, and convert the first operation signal into a second operation signal that can physically read or write the PCM so that the small data in the PCM can be processed by the second operation signal to read or write. Using PCM to read or write can be read or written bit by bit. When reading or writing is required, only a few bits are needed, which improves the operating efficiency. At the same time, because there is no need to read or write a block each time, the lifespan can be increased, so the operation efficiency is improved, the lifespan of the system is increased, and the ability to speed up data access is realized.
图2为本发明实施例提供的数据存储系统实施例二的结构示意图,如图2所示,在图1所示实施例的基础上,数据存储系统还包括内存15,内存15通过内存控制器12与处理器11相连,内存15用于供CPU读或写执行程序所需的数据。FIG. 2 is a schematic structural diagram of the second embodiment of the data storage system provided by the embodiment of the present invention. As shown in FIG. 2, on the basis of the embodiment shown in FIG. 12 is connected to the
作为一种可实施的方式,数据存储系统还可包括外设存储器,外设存储器用于通过外设接口与CPU相连,外设存储器存储有非易失性的大数据(比小数据大的数据,如大小超过某个阈值的数据,这里的“阈值”大小并不限定,本领域技术人员可以结合实际情况进行调整,例如,可以为512字节,或者更大的字节数),CPU还用于通过外设接口对外设存储器进行读或写操作。相比较上述实施例,非易失性的大数据可以存储在外设存储器中,进行读或写操作。As an implementable manner, the data storage system may also include a peripheral memory, which is used to connect to the CPU through a peripheral interface, and the peripheral memory stores non-volatile big data (data larger than small data) , such as data whose size exceeds a certain threshold, the size of the "threshold" here is not limited, and those skilled in the art can adjust it according to the actual situation, for example, it can be 512 bytes, or a larger number of bytes), the CPU can also Used to read or write to the peripheral memory through the peripheral interface. Compared with the above embodiments, non-volatile large data can be stored in the peripheral memory for read or write operations.
上述实施例中小数据为小的用户数据,或者元数据metadata,或者系统日志数据中的任意一种或多种,小数据为小于通用flash操作时的块操作数据,小数据大小为小于等于512字节。In the foregoing embodiments, small data is small user data, or metadata, or any one or more of system log data, and small data is block operation data smaller than general flash operations, and the size of small data is less than or equal to 512 words Festival.
下面采用一个具体的实施例,对上述系统实施例的技术方案进行详细说明。A specific embodiment is used below to describe the technical solution of the above-mentioned system embodiment in detail.
图3为本发明实施例提供的数据存储系统实施例三的结构示意图,如图3所示,本实施例提供的数据存储系统包括主机系统和外设存储器,主机系统的主机总线适配器与外设存储器的主机适配器之间通过光纤通道协议(Fibre Channel Protocol,简称:FC)、以太网等通信连接。主机系统包括第一中央处理器CPU,主机系统中有一个服务器机框,里面有一块底板,底板上安装有多核CPU、内存、PCM桥等芯片,用于对其他扩展卡进行控制,实现主机的功能;以及连接在第一中央处理器CPU上的主机存储模块,本发明实施例中主机存储模块包括有数个第一相变存储器PCM和DRAM,通过内存总线与第一中央处理器CPU中的第一内存控制器相连,由于PCM与CPU中的第一内存控制器相连所以其响应及处理速度快,但是其内存不是特别大,所以出于内存需要,本发明实施例中主机存储模块还可包括数个相变存储器双列直插式存储模块PCM DIMM,通过输入输出转发器IOH与第一中央处理器CPU连接,相变存储器双列直插式存储模块PCM DIMM相比于PCM其响应及处理速度慢,但是其有较大的内存。因此此处主机存储模块可以针对不同需求设置包括PCM或/和相变存储器双列直插式存储模块PCM DIMM。Figure 3 is a schematic structural diagram of the third embodiment of the data storage system provided by the embodiment of the present invention. The host adapters of the storage are connected through communication such as Fiber Channel Protocol (Fibre Channel Protocol, FC for short), Ethernet, and the like. The host system includes the first central processing unit CPU. There is a server frame in the host system, and there is a bottom board inside. The multi-core CPU, memory, PCM bridge and other chips are installed on the bottom board, which are used to control other expansion cards and realize the host computer. function; and the host storage module connected on the first central processing unit CPU, the host storage module includes several first phase-change memories PCM and DRAM in the embodiment of the present invention, communicates with the first central processing unit CPU in the memory bus A memory controller is connected, because the PCM is connected with the first memory controller in the CPU so its response and processing speed are fast, but its memory is not particularly large, so for memory needs, the host memory module in the embodiment of the present invention can also include Several phase-change memory dual-in-line memory modules PCM DIMM are connected with the first central processing unit CPU through the input-output transponder IOH, and the phase-change memory dual-in-line memory module PCM DIMM is compared to the response and processing of PCM Slow, but it has a larger memory. Therefore, the host memory module here can be configured to include PCM or/and phase change memory dual in-line memory module PCM DIMM according to different requirements.
外设存储器中至少包括外设硬盘。The peripheral memory at least includes a peripheral hard disk.
上述提到的数个相变存储器双列直插式存储模块PCM DIMM以外设组件互连标准快速通道PCIE扩展卡的形式,连接在输入输出转发器IOH上,以PCIE扩展卡形式,连接在IO Hub上面的PCM DIMM条,可以取代NAND flash,提供更快的读或写性能和更长的使用寿命。PCM内存颗粒包括PCM控制器,PCM控制器也是一个芯片,如FPGA、ASIC等,通过对这个芯片进行编程来完成接收主机的读或写请求,并对PCM芯片进行各种访问及控制;PCM控制器对应的芯片可以与各个PCM都设置在一个PCB板上,通过PCB走线相连,最后呈现的是一个双列直插式存储模块DIMM条形式,可以通过内存总线Memory bus直接访问。本实施例中也可以将相变存储器双列直插式存储模块PCM DIMM条和PCM控制器做成一个PCIE SSD卡,通过PCIE接口与底板相连,作为主机的数据存储使用,通过PCIE访问。The above-mentioned several phase-change memory dual-in-line memory modules PCM DIMM are connected to the input and output transponder IOH in the form of a standard fast channel PCIE expansion card for interconnecting peripheral components, and connected to the IO in the form of a PCIE expansion card. The PCM DIMM on the Hub can replace NAND flash, providing faster read or write performance and longer service life. PCM memory particles include PCM controller, which is also a chip, such as FPGA, ASIC, etc., by programming this chip to complete the read or write request of the receiving host, and perform various access and control on the PCM chip; PCM control The chip corresponding to the device can be set on a PCB board with each PCM, connected by PCB wiring, and finally presents a dual in-line memory module DIMM strip form, which can be directly accessed through the memory bus Memory bus. In this embodiment, the phase change memory dual in-line memory module PCM DIMM bar and the PCM controller can also be made into a PCIE SSD card, which is connected to the base plate through the PCIE interface, used as the data storage of the host, and accessed through the PCIE.
外设存储器还包括第二中央处理器CPU,如图3所示,外设存储器中有一个服务器机框,里面有一块底板,底板上安装有多核CPU、内存、PCM桥等芯片,用于对其他扩展卡进行控制。第二中央处理器CPU通过输入输出转发器IOH与外设硬盘连接。The peripheral memory also includes a second central processing unit CPU, as shown in Figure 3, a server frame is arranged in the peripheral memory, and a base plate is arranged inside, and chips such as multi-core CPU, memory, PCM bridge are installed on the base plate, are used for pairing other expansion cards for control. The second central processing unit CPU is connected with the peripheral hard disk through the input-output transponder IOH.
外设存储器还包括多个第二相变存储器PCM及DRAM,PCM与DRAM通过内存总线与第二中央处理器CPU中的第二内存控制器连接,PCM颗粒和控制器连接在内存总线Memory bus上,由于PCM掉电数据不丢失,可以作为小数据存储,以内存的形式访问,作为服务器code和元数据Metadata存储。外设存储器中的主机适配器经PCIE通过IO Hub中转,到PCIE/SAS/SATA接口NAND SSD及SAS/SATA接口HDD。外设存储器主机通过Memory控制器读或写PCM/DRAM中的小数据,通过PCIE卡,读取PCM中的数据。The peripheral memory also includes a plurality of second phase change memories PCM and DRAM, PCM and DRAM are connected with the second memory controller in the second central processing unit CPU through the memory bus, and the PCM particles and the controller are connected on the memory bus Memory bus , because PCM power-off data is not lost, it can be stored as small data, accessed in the form of memory, and stored as server code and metadata. The host adapter in the peripheral memory is transferred to the PCIE/SAS/SATA interface NAND SSD and SAS/SATA interface HDD through PCIE through the IO Hub. The peripheral memory host reads or writes small data in PCM/DRAM through the Memory controller, and reads data in PCM through the PCIE card.
本实施例中外设硬盘包括NAND Flash和/或硬盘驱动器HDD。In this embodiment, the peripheral hard disk includes NAND Flash and/or hard disk drive HDD.
本发明实施例对数据存储流程进行了改进,即区分大数据和小数据存储的架构和通道,基于PCM存储器读或写可按位读或写的特点,对小数据存储和读或写进行了优化,实现提升了操作效率,增加了系统寿命,加速数据访问的能力。The embodiment of the present invention improves the data storage process, that is, distinguishes the architecture and channel of large data and small data storage, and based on the feature that PCM memory read or write can be read or written bit by bit, small data storage and read or write are carried out. Optimization, to achieve improved operating efficiency, increased system life, and accelerated data access capabilities.
引入PCM作为存储介质后,需要针对PCM字节可变的特点,不同于块设备访问的文件系统,设计基于字节访问的存储软件系统。图4为本发明实施例提供的数据存储系统实施例四的软件构成结构示意图,如图4所示,在字节访问的传统文件系统中,包含一个虚拟存储层,虚拟存储层有64bit(或更大)的地址空间或者64bit(或更大)的进行读或写和重新分配的地址空间,可进行冷热数据层的功能的操作。在虚拟存储层之下有虚拟PCM存储层、虚拟Flash存储层、虚拟HDD存储层,虚拟PCM存储层实现地址空间重新映射,原子级写操作,原子级写操作基于CPU的高速缓冲存储器(Cache Memory,以下简称:Cache)大小,做极细的颗粒度划分,可以以字节Byte为单位进行读取和写入,日志功能和磨损均衡算法,PCM卡上面有多个PCM颗粒,由PCM控制器控制。After introducing PCM as a storage medium, it is necessary to design a storage software system based on byte access, which is different from the file system accessed by block devices, in view of the variable characteristics of PCM bytes. FIG. 4 is a schematic diagram of the software structure of the fourth embodiment of the data storage system provided by the embodiment of the present invention. As shown in FIG. Larger) address space or 64bit (or larger) address space for reading or writing and reallocation, which can perform functions of hot and cold data layers. Under the virtual storage layer, there are virtual PCM storage layer, virtual Flash storage layer, and virtual HDD storage layer. The virtual PCM storage layer realizes address space remapping, atomic-level write operations, and atomic-level write operations are based on CPU's cache memory (Cache Memory) , hereinafter referred to as: Cache) size, very fine granularity division, can read and write in Byte units, log function and wear leveling algorithm, there are multiple PCM particles on the PCM card, controlled by the PCM controller control.
本发明实施例采用了3级加速的数据访问加速方案,解决了目前业界针对小数据访问性能降级的难点。The embodiment of the present invention adopts a three-level accelerated data access acceleration scheme, which solves the current difficulty in the industry regarding performance degradation of small data access.
第一级:中央处理器CPU通过内存总线Memory bus连接PCM。PCM中存储小数据和热点数据(Small&Hot data),例如元数据Meta data、日志log、小用户数据(small user data)(利用了PCM按字节访问的形式);The first level: the central processing unit CPU is connected to the PCM through the memory bus Memory bus. PCM stores small data and hot data (Small&Hot data), such as metadata Meta data, log log, small user data (small user data) (using the form of PCM byte-by-byte access);
第二级:NAND Flash存放热点数据和大数据(Hot&large data),大数据热点迁移加速系统存取;The second level: NAND Flash stores hot data and big data (Hot&large data), and big data hotspot migration accelerates system access;
第三级:外设存储器External Storage中,PCM取代Nor Flash,存放码Code,数据基(Data Base(config data))The third level: in the external storage, PCM replaces Nor Flash, stores code Code, and data base (Data Base (config data))
图5为本发明实施例提供的数据存储方法实施例一的流程示意图,该方法应用于相变存储器PCM桥,如图5所示,该方法可以包括:Fig. 5 is a schematic flow chart of the first embodiment of the data storage method provided by the embodiment of the present invention. The method is applied to the phase change memory PCM bridge. As shown in Fig. 5, the method may include:
S501、通过与PCM桥相连的内存控制器接收来自与内存控制器相连的CPU的用于对与PCM桥相连的相变存储器PCM中存储的非易失性的小数据进行读或写的第一操作信号。S501, receiving the first request from the CPU connected to the memory controller through the memory controller connected to the PCM bridge for reading or writing the non-volatile small data stored in the phase change memory PCM connected to the PCM bridge Action signal.
S502、将第一操作信号转化成能对PCM进行物理读或写的第二操作信号以通过第二操作信号对PCM中的小数据进行读或往PCM中写入小数据。S502. Convert the first operation signal into a second operation signal capable of physically reading or writing the PCM, so as to read small data in the PCM or write small data in the PCM through the second operation signal.
其中,小数据为被经常读或写的小数据,可根据不同的情况而定,本实施例对此不做限制。第一操作信号包括读或写信号,将第一操作信号转化成能对PCM进行读或写的第二操作信号以通过第二操作信号对PCM中的小数据进行读或写包括:将读或写信号转化成能对PCM进行读或写的读或写信号以通过读或写信号对PCM中的小数据进行读或写。例如,写操作时,CPU下发逻辑写的第一操作信号,PCM桥通过内存控制器接收此第一操作信号,然后将第一操作信号转化成能对PCM进行物理读或写的第二操作信号以通过第二操作信号对PCM中的小数据进行写操作。读操作与此类似,此处不做赘述。Wherein, the small data is small data that is often read or written, and may be determined according to different situations, which is not limited in this embodiment. The first operation signal includes a read or write signal, and converting the first operation signal into a second operation signal capable of reading or writing the PCM to read or write the small data in the PCM through the second operation signal includes: converting the read or write signal to the PCM The write signal is converted into a read or write signal capable of reading or writing to the PCM so as to read or write small data in the PCM through the read or write signal. For example, during a write operation, the CPU sends the first operation signal for logical writing, and the PCM bridge receives the first operation signal through the memory controller, and then converts the first operation signal into a second operation that can physically read or write the PCM signal to perform a write operation on the small data in the PCM through the second operation signal. The read operation is similar to this and will not be repeated here.
在上述实施例的基础上,数据存储方法还可以包括:通过内存控制器接收来自CPU的用于对PCM存储的小数据的存储位置进行调整的调整信号,对PCM存储的小数据的存储位置进行调整具体包括:将PCM存储的使用频率较低的小数据从PCM存储器移出,或者将使用频率较高的小数据移动到PCM存储器。将调整信号转化成能对PCM进行读或写的调整信号以通过调整信号对PCM中的小数据的存储位置进行调整。On the basis of the above embodiments, the data storage method may further include: receiving an adjustment signal from the CPU through the memory controller for adjusting the storage location of the small data stored in the PCM, and adjusting the storage location of the small data stored in the PCM The adjustment specifically includes: moving small data stored in the PCM with low usage frequency from the PCM memory, or moving small data with high usage frequency to the PCM memory. The adjustment signal is converted into an adjustment signal capable of reading or writing the PCM so as to adjust the storage position of the small data in the PCM through the adjustment signal.
数据存储方法还可以包括:通过内存控制器与处理器相连的内存存储CPU运行所需的数据,以供CPU读或写执行程序所需的数据,外设存储器通过外设接口与CPU相连,外设存储器存储有非易失性的大数据,CPU还用于通过外设接口对外设存储器进行读或写操作。The data storage method may also include: storing the data required by the CPU through the memory connected to the processor through the memory controller, for the CPU to read or write the data required for executing the program, the peripheral memory is connected to the CPU through the peripheral interface, and the peripheral It is assumed that the memory stores non-volatile large data, and the CPU is also used to read or write the peripheral memory through the peripheral interface.
上述实施例中小数据为小的用户数据,或者元数据metadata,或者系统日志数据中的任意一种或多种,小数据为小于通用flash操作时的块操作数据,小数据大小为小于等于512字节。In the foregoing embodiments, small data is small user data, or metadata, or any one or more of system log data, and small data is block operation data smaller than general flash operations, and the size of small data is less than or equal to 512 words Festival.
本实施例提供的数据存储方法,通过与PCM桥相连的内存控制器接收来自与内存控制器相连的CPU的用于对与PCM桥相连的相变存储器PCM中存储的非易失性的小数据进行读或写的第一操作信号。将第一操作信号转化成能对PCM进行物理读或写的第二操作信号以通过第二操作信号对PCM中的小数据进行读或写。利用PCM读或写可按位读或写,需要读或写的时候,只需要几位即可,提升了操作效率。同时,由于每次并不需要读或写一个块,从而可以增加寿命,因此实现提升了操作效率,增加了系统寿命,加速数据访问的能力。In the data storage method provided by this embodiment, the memory controller connected to the PCM bridge receives the non-volatile small data stored in the phase change memory PCM connected to the PCM bridge from the CPU connected to the memory controller. The first operation signal for reading or writing. The first operation signal is converted into a second operation signal capable of physically reading or writing the PCM so as to read or write small data in the PCM through the second operation signal. Using PCM to read or write can be read or written bit by bit. When reading or writing is required, only a few bits are needed, which improves the operating efficiency. At the same time, because there is no need to read or write a block each time, the lifespan can be increased, so the operation efficiency is improved, the lifespan of the system is increased, and the ability to speed up data access is realized.
下面采用一个具体的实施例,对上述方法实施例的技术方案进行详细说明。A specific embodiment is used below to describe the technical solution of the above-mentioned method embodiment in detail.
本发明实施例中具体的数据存储方法,可以分为两种情况,一是若判断获知待存储数据的数据类型为系统文件类型,则直接写入主机存储模块PCM中;此处系统文件类型包括用户数据metadata类型和/或日志log类型,本发明实施例中即文件系统元数据Metadata和日志log,全部作为小数据写入PCM中;The specific data storage method in the embodiment of the present invention can be divided into two situations. One is that if it is judged that the data type of the data to be stored is a system file type, it is directly written into the host memory module PCM; here the system file type includes User data metadata type and/or log log type, namely file system metadata and log log in the embodiment of the present invention, all are written in the PCM as small data;
二是若判断获知待存储数据的数据类型为用户文件类型,且待存储数据的数据大小不超过预设的数据颗粒度,预设的数据颗粒度为小于等于512字节之间,本发明实施例中数据颗粒度如果不超过预设的数据颗粒度大小,则写入主机存储模块,本发明实施例中即用户数据user data需要针对数据大小进行判断,如果是小数据(数据尺寸大小根据CPU cache大小决定),则写入PCM中;Second, if it is determined that the data type of the data to be stored is a user file type, and the data size of the data to be stored does not exceed the preset data granularity, and the preset data granularity is less than or equal to 512 bytes, the implementation of the present invention In the example, if the data granularity does not exceed the preset data granularity, it will be written into the host storage module. In the embodiment of the present invention, the user data user data needs to be judged according to the data size. If it is small data (the data size is determined according to the CPU cache size), then write to PCM;
若判断获知待存储数据的数据类型为用户文件类型,且待存储数据的数据大小超过数据颗粒度,则写入外设硬盘。本发明实施例中即用户数据userdata需要针对数据大小进行判断,如果是大数据(数据尺寸大小根据CPUcache大小决定),则写入外设硬盘NAND Flash/HDD中。If it is judged that the data type of the data to be stored is a user file type, and the data size of the data to be stored exceeds the data granularity, write to the external hard disk. In the embodiment of the present invention, the user data userdata needs to be judged for the data size, if it is large data (the data size is determined according to the CPUcache size), then write in the peripheral hard disk NAND Flash/HDD.
若判断获知待存储数据的数据类型为用户文件类型,且待存储数据的数据大小不超过预设的数据颗粒度,则写入主机存储模块,本发明实施例中即用户数据user data需要针对数据大小进行判断,如果是小数据(数据尺寸大小根据CPU cache大小决定),则写入PCM中,此种情况下包括:If it is judged that the data type of the data to be stored is a user file type, and the data size of the data to be stored does not exceed the preset data granularity, it is written into the host storage module. Judging by the size, if it is small data (the size of the data is determined according to the size of the CPU cache), it will be written into the PCM. In this case, it includes:
若判断获知待存储数据的数据类型为用户文件类型,且待存储数据的数据大小不超过预设的数据颗粒度,则查找待存储数据的原数据,若在主机存储模块中查找到原数据,则直接在原数据的存储位置对原数据进行更新,本发明实施例中即用户数据user data如果是小数据,则需查找此小数据的原数据,若在主机存储模块PCM中查找到原数据,则直接在原数据的存储位置对原数据进行更新;若在主机存储模块中没有查找到原数据,则在外设硬盘中查找。If it is determined that the data type of the data to be stored is a user file type, and the data size of the data to be stored does not exceed the preset data granularity, the original data of the data to be stored is searched, and if the original data is found in the host storage module, Then update the original data directly at the storage location of the original data. In the embodiment of the present invention, if the user data user data is small data, it is necessary to search for the original data of the small data. If the original data is found in the host storage module PCM, Then update the original data directly at the storage location of the original data; if the original data is not found in the host storage module, then search in the peripheral hard disk.
若在外设硬盘中查找到原数据,则将原数据读取到主机存储模块中,并在主机存储模块中对原数据进行更新,更新之后,还包括:将主机存储模块中存储的原数据标记为脏数据,等待空闲时擦除,本发明实施例中即若在NAND Flash中查找到原数据,则认为是旧数据更新,需要将旧数据读取到PCM中,然后标记NAND Flash中的数据位脏数据,在NAND Flash空闲时候擦除,同时在此搬移过程中,实现热点数据的迁移,如果下一次对此数据进行更新,可以直接在PCM中命中。若查找不到原数据,则直接写入主机存储模块,本发明实施例中即若在NAND Flash中查找不到原数据,则直接写入PCM中。If the original data is found in the peripheral hard disk, the original data is read into the host storage module, and the original data is updated in the host storage module. After the update, it also includes: marking the original data stored in the host storage module It is dirty data, and it is erased when it is idle. In the embodiment of the present invention, if the original data is found in the NAND Flash, it is considered as an old data update. It is necessary to read the old data into the PCM, and then mark the data in the NAND Flash Dirty data is erased when the NAND Flash is idle. At the same time, the migration of hot data is realized during the moving process. If the data is updated next time, it can be directly hit in the PCM. If the original data cannot be found, it is directly written into the host storage module. In the embodiment of the present invention, if the original data cannot be found in the NAND Flash, it is directly written into the PCM.
下面结合图6详细说明数据写入流程,图6为本发明实施例提供的数据存储方法的数据写入流程示意图,如图6所示,例如预先将数据设置为64字节,数据写入流程包括以下步骤:The following describes the data writing process in detail in conjunction with FIG. 6. FIG. 6 is a schematic diagram of the data writing process of the data storage method provided by the embodiment of the present invention. As shown in FIG. 6, for example, the data is set to 64 bytes in advance, and the data writing process Include the following steps:
步骤101、主机CPU下发写入数据指令;
步骤102、主机CPU根据基于字节可变的文件系统判断数据类型,即判断要写入的数据是文件系统的元数据metadata,log,还是用户数据user data,由此决定后面写入数据的流程;
步骤103、若是元数据metadata和log,则会直接写入第一PCM中;
步骤104、若是用户数据User data,则需要进一步判断数据的大小尺寸;
步骤105、判断数据是否大于64Byte,判断尺寸由文件系统根据情况设定,假设文件系统颗粒度设置为64Byte;
步骤106、如果大于64Byte,则认为是大数据,主机CPU将写数据请求发送给外设存储器CPU,外设存储器CPU将数据写入NAND Flash/HDD中;
步骤107、如果是小于64Byte,则认为是小数据,但是在写入前,为了保证数据一致性,必须对原数据进行查找;
步骤108、判断是否能在第一PCM中查找到原数据;
步骤109、如果能够在第一PCM中查找到原数据,则直接在原数据的存储位置对原数据进行更新;
步骤110、如果找不到,则需要在外设存储器的NAND Flash中寻找;
步骤111、判断是否能在外设存储器的NAND Flash中找到原数据;
步骤112、如果在外设存储器的NAND Flash中找不到原数据,则认为此数据是新数据,在第一PCM中写入新的小数据;
步骤113、如果能在外设存储器的NAND Flash中找到原数据,则认为是旧数据更新,需要将旧数据读取到第一PCM中,然后标记外设存储器的NANDFlash中的数据为脏数据,在外设存储器的NAND Flash空闲时候擦除,同时在此搬移过程中,实现热点数据的迁移,如果下一次对此数据进行更新,可以直接在第一PCM中命中。
本发明实施例提供的数据存储方法,由于PCM本身的读性能是NANDFlash的100倍以上,写入PCM时候,不需要像NAND Flash一样要在DRAMBuffer中先读取再修改,所以本发明实施例实现了小数据的优化,小数据读或写加速;目前最新的20nm的MLC NAND Flash写入寿命只有几千次,PCM的写寿命是NAND的100-1000倍以上,将频繁更新的小数据在PCM中操作,可以对NAND Flash做小数据的写吸收,极大延长存储系统中NAND Flash的写入寿命;PCM字节可变,NAND Flash按照页page操作,在小数据写入时,数据尺寸远小于NAND Flash的页page(2-4K)大小,用PCM可以降低文件系统的负载payload,加速文件系统运行,因此降低了文件系统负载,提升了系统的运行效率。In the data storage method provided by the embodiment of the present invention, since the read performance of PCM itself is more than 100 times that of NANDFlash, when writing to PCM, it is not necessary to read and then modify in DRAMBuffer like NAND Flash, so the embodiment of the present invention realizes Small data optimization, small data read or write acceleration; currently the latest 20nm MLC NAND Flash write life is only a few thousand times, the write life of PCM is more than 100-1000 times that of NAND, and the frequently updated small data will be stored in PCM Medium operation can write and absorb small data to NAND Flash, which greatly prolongs the writing life of NAND Flash in the storage system; PCM bytes are variable, and NAND Flash operates according to the page page. When small data is written, the data size is much larger. Smaller than the page (2-4K) size of NAND Flash, using PCM can reduce the load payload of the file system and speed up the operation of the file system, thus reducing the load of the file system and improving the operating efficiency of the system.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above method embodiments can be completed by program instructions and related hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
图7为本发明实施例提供的PCM桥实施例一的结构示意图,如图7所示,PCM桥包括:接收单元20、转化单元21和读或写单元22,其中,FIG. 7 is a schematic structural diagram of Embodiment 1 of the PCM bridge provided by the embodiment of the present invention. As shown in FIG. 7, the PCM bridge includes: a receiving
接收单元20用于通过与PCM桥相连的内存控制器接收来自与内存控制器相连的CPU的用于对与PCM桥相连的相变存储器PCM中存储的非易失性的小数据进行读或写的第一操作信号.The receiving
转化单元21用于将接收单元接收的第一操作信号转化成能对PCM进行读或写的第二操作信号。The
读或写单元22用于根据转化单元转化的第二操作信号对PCM中的小数据进行读或往PCM中写入小数据。The read or write
其中,小数据为被经常读或写的小数据,小数据可以为小的用户数据,或者元数据metadata,或者系统日志数据中的任意一种或多种,小数据还可为小于通用flash操作时的块操作数据,小数据大小为小于等于512字节,可根据不同的情况而定,本实施例对此不做限制。第一操作信号包括读或写信号,将第一操作信号转化成能对PCM进行读或写的第二操作信号以通过第二操作信号对PCM中的小数据进行读或写包括:将读或写信号转化成能对PCM进行读或写的读或写信号以通过读或写信号对PCM中的小数据进行读或写。Among them, small data is small data that is often read or written. Small data can be small user data, or metadata, or any one or more of system log data. Small data can also be smaller than general flash operations. When the block operation data, the size of the small data is less than or equal to 512 bytes, which can be determined according to different situations, and this embodiment does not limit it. The first operation signal includes a read or write signal, and converting the first operation signal into a second operation signal capable of reading or writing the PCM to read or write the small data in the PCM through the second operation signal includes: converting the read or write signal to the PCM The write signal is converted into a read or write signal capable of reading or writing to the PCM so as to read or write small data in the PCM through the read or write signal.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (18)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210478421.6A CN103838676B (en) | 2012-11-22 | 2012-11-22 | Data-storage system, date storage method and PCM bridges |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210478421.6A CN103838676B (en) | 2012-11-22 | 2012-11-22 | Data-storage system, date storage method and PCM bridges |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103838676A true CN103838676A (en) | 2014-06-04 |
CN103838676B CN103838676B (en) | 2017-10-17 |
Family
ID=50802199
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210478421.6A Active CN103838676B (en) | 2012-11-22 | 2012-11-22 | Data-storage system, date storage method and PCM bridges |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103838676B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104281536A (en) * | 2014-09-28 | 2015-01-14 | 株洲南车时代电气股份有限公司 | Device and method for separated storage of data |
CN105404596A (en) * | 2015-10-30 | 2016-03-16 | 华为技术有限公司 | Data transmission method, device and system |
CN107590285A (en) * | 2017-09-30 | 2018-01-16 | 郑州云海信息技术有限公司 | A kind of method of heterogeneous system data consistency |
CN108431784A (en) * | 2015-12-30 | 2018-08-21 | 华为技术有限公司 | Access request processing method, device and computer system |
CN109918352A (en) * | 2019-03-04 | 2019-06-21 | 北京百度网讯科技有限公司 | The method of storage system and storing data |
US10649897B2 (en) | 2015-12-30 | 2020-05-12 | Huawei Technologies Co., Ltd. | Access request processing method and apparatus, and computer device |
US10929309B2 (en) | 2017-12-19 | 2021-02-23 | Western Digital Technologies, Inc. | Direct host access to storage device memory space |
US11017126B2 (en) | 2017-12-19 | 2021-05-25 | Western Digital Technologies, Inc. | Apparatus and method of detecting potential security violations of direct access non-volatile memory device |
CN114691045A (en) * | 2022-03-30 | 2022-07-01 | 广州万协通信息技术有限公司 | System and method for accelerating user system modification of NorFlash storage medium |
US11720283B2 (en) | 2017-12-19 | 2023-08-08 | Western Digital Technologies, Inc. | Coherent access to persistent memory region range |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101727982A (en) * | 2008-10-17 | 2010-06-09 | 三星电子株式会社 | Resistance variable memory device performing program and verification operation |
CN101887350A (en) * | 2009-05-14 | 2010-11-17 | E·孔法洛涅里 | PCM memory for memory bus interface |
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 |
CN102331974A (en) * | 2010-06-09 | 2012-01-25 | 美光科技公司 | Persistent memory for processor main memory |
CN102737711A (en) * | 2011-03-29 | 2012-10-17 | Nxp股份有限公司 | Phase change memory (pcm) architecture and a method for writing into pcm architecture |
US8307151B1 (en) * | 2009-11-30 | 2012-11-06 | Micron Technology, Inc. | Multi-partitioning feature on e-MMC |
-
2012
- 2012-11-22 CN CN201210478421.6A patent/CN103838676B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101727982A (en) * | 2008-10-17 | 2010-06-09 | 三星电子株式会社 | Resistance variable memory device performing program and verification operation |
CN101887350A (en) * | 2009-05-14 | 2010-11-17 | E·孔法洛涅里 | PCM memory for memory bus interface |
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 |
US8307151B1 (en) * | 2009-11-30 | 2012-11-06 | Micron Technology, Inc. | Multi-partitioning feature on e-MMC |
CN102331974A (en) * | 2010-06-09 | 2012-01-25 | 美光科技公司 | Persistent memory for processor main memory |
CN102737711A (en) * | 2011-03-29 | 2012-10-17 | Nxp股份有限公司 | Phase change memory (pcm) architecture and a method for writing into pcm architecture |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104281536A (en) * | 2014-09-28 | 2015-01-14 | 株洲南车时代电气股份有限公司 | Device and method for separated storage of data |
CN105404596B (en) * | 2015-10-30 | 2018-07-20 | 华为技术有限公司 | A kind of data transmission method, apparatus and system |
CN105404596A (en) * | 2015-10-30 | 2016-03-16 | 华为技术有限公司 | Data transmission method, device and system |
CN108431784B (en) * | 2015-12-30 | 2020-12-04 | 华为技术有限公司 | Access request processing method, device and computer system |
CN108431784A (en) * | 2015-12-30 | 2018-08-21 | 华为技术有限公司 | Access request processing method, device and computer system |
US11301379B2 (en) | 2015-12-30 | 2022-04-12 | Huawei Technologies Co., Ltd. | Access request processing method and apparatus, and computer device |
US10606746B2 (en) | 2015-12-30 | 2020-03-31 | Huawei Technologies Co., Ltd. | Access request processing method and apparatus, and computer system |
US10649897B2 (en) | 2015-12-30 | 2020-05-12 | Huawei Technologies Co., Ltd. | Access request processing method and apparatus, and computer device |
US11030092B2 (en) | 2015-12-30 | 2021-06-08 | Huawei Technologies Co., Ltd. | Access request processing method and apparatus, and computer system |
CN107590285A (en) * | 2017-09-30 | 2018-01-16 | 郑州云海信息技术有限公司 | A kind of method of heterogeneous system data consistency |
US11017126B2 (en) | 2017-12-19 | 2021-05-25 | Western Digital Technologies, Inc. | Apparatus and method of detecting potential security violations of direct access non-volatile memory device |
US10929309B2 (en) | 2017-12-19 | 2021-02-23 | Western Digital Technologies, Inc. | Direct host access to storage device memory space |
US11354454B2 (en) | 2017-12-19 | 2022-06-07 | Western Digital Technologies, Inc. | Apparatus and method of detecting potential security violations of direct access non-volatile memory device |
US11681634B2 (en) | 2017-12-19 | 2023-06-20 | Western Digital Technologies, Inc. | Direct host access to storage device memory space |
US11720283B2 (en) | 2017-12-19 | 2023-08-08 | Western Digital Technologies, Inc. | Coherent access to persistent memory region range |
CN109918352A (en) * | 2019-03-04 | 2019-06-21 | 北京百度网讯科技有限公司 | The method of storage system and storing data |
CN114691045A (en) * | 2022-03-30 | 2022-07-01 | 广州万协通信息技术有限公司 | System and method for accelerating user system modification of NorFlash storage medium |
CN114691045B (en) * | 2022-03-30 | 2024-12-27 | 广州万协通信息技术有限公司 | System and method for accelerating user system modification of NorFlash storage media |
Also Published As
Publication number | Publication date |
---|---|
CN103838676B (en) | 2017-10-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103838676B (en) | Data-storage system, date storage method and PCM bridges | |
TWI627536B (en) | System and method for a shared cache with adaptive partitioning | |
KR102761563B1 (en) | Apparatus and method to provide cache move with nonvolatile mass memory system | |
US10754785B2 (en) | Checkpointing for DRAM-less SSD | |
KR102517685B1 (en) | Memory block recovery method and device | |
KR20110110720A (en) | Method and system for wear leveling in solid state drives | |
US10402338B2 (en) | Method and apparatus for erase block granularity eviction in host based caching | |
EP3926451B1 (en) | Communication of data relocation information by storage device to host to improve system performance | |
CN103761988A (en) | SSD (solid state disk) and data movement method | |
CN112599170A (en) | Apparatus and method for providing multi-stream operation in a memory system | |
EP3506075A1 (en) | Mass storage device capable of fine grained read and/or write operations | |
JP2022537520A (en) | Hard disk control method and related device | |
US20210405913A1 (en) | Host access tracking in a memory sub-system | |
CN102999441A (en) | Fine granularity memory access method | |
CN113448487B (en) | Computer-readable storage medium, method and device for writing flash memory management table | |
Du et al. | SSW: A strictly sequential writing method for open-channel SSD | |
US12333179B2 (en) | Operation method of host configured to communicate with storage devices and memory devices, and system including storage devices and memory devices | |
CN104699414A (en) | Data reading and writing method and saving equipment | |
CN117112219A (en) | Method and device for accessing memory data of host | |
US10331385B2 (en) | Cooperative write-back cache flushing for storage devices | |
JP2017068805A (en) | Information processing apparatus, processor, and information processing method | |
JP6254986B2 (en) | Information processing apparatus, access controller, and information processing method | |
CN117009278A (en) | Computing system and method of operating the same | |
CN104423892A (en) | Data writing method, disk module and data writing system | |
US11797183B1 (en) | Host assisted application grouping for efficient utilization of device resources |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |