CN106201326A - Information processor - Google Patents
Information processor Download PDFInfo
- Publication number
- CN106201326A CN106201326A CN201510239405.5A CN201510239405A CN106201326A CN 106201326 A CN106201326 A CN 106201326A CN 201510239405 A CN201510239405 A CN 201510239405A CN 106201326 A CN106201326 A CN 106201326A
- Authority
- CN
- China
- Prior art keywords
- data
- block
- unit
- information
- block group
- 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
Landscapes
- Memory System (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
根据一个实施例,一种信息处理装置(17)包含发射单元(18)及接收单元(19)。所述发射单元(18)将写入数据及所述写入数据的逻辑地址发射到存储器装置(5)。所述存储器装置(5)包含多个擦除单位区域。所述擦除单位区域中的每一者包含多个写入单位区域。所述接收单元(19)从所述存储器装置(5)接收包含指示写入到待经受无用单元收集的擦除单位区域的数据的数据识别信息的区域信息。
According to an embodiment, an information processing device (17) includes a transmitting unit (18) and a receiving unit (19). The transmitting unit (18) transmits write data and a logical address of the write data to a memory device (5). The memory device (5) includes a plurality of erase unit areas. Each of the erase unit areas includes a plurality of write unit areas. The receiving unit (19) receives area information including data identification information indicating data written to an erasure unit area to be subjected to garbage collection from the memory device (5).
Description
相关申请案的交叉参考Cross References to Related Applications
本申请案是基于以下申请案且主张所述申请案的优先权权益:2014年12月29日提出申请的第62/097,538号美国临时申请案;2015年2月27日提出申请的第2015-038999号日本专利申请案;及2015年3月12日提出申请的第14/656,524号美国非临时申请案,所有这些申请案的全部内容以引用方式并入本文中。This application is based on, and claims the benefit of priority from, the following applications: U.S. Provisional Application No. 62/097,538, filed December 29, 2014; 2015- 038999; and U.S. Nonprovisional Application No. 14/656,524, filed March 12, 2015, all of which are incorporated herein by reference in their entirety.
技术领域technical field
本文中所描述的实施例大体来说涉及一种信息处理装置。Embodiments described herein generally relate to an information processing device.
背景技术Background technique
固态驱动器(SSD)包含例如NAND快闪存储器等非易失性半导体存储器。所述NAND快闪存储器包含多个块(物理块)。所述多个块包含布置于字线与位线的交叉点处的多个存储器单元。Solid state drives (SSDs) include non-volatile semiconductor memory such as NAND flash memory. The NAND flash memory includes a plurality of blocks (physical blocks). The plurality of blocks includes a plurality of memory cells arranged at intersections of word lines and bit lines.
发明内容Contents of the invention
一般来说,根据一个实施例,一种信息处理装置包含发射单元及接收单元。所述发射单元将写入数据及所述写入数据的逻辑地址发射到存储器装置。所述存储器装置包含多个擦除单位区域。所述擦除单位区域中的每一者包含多个写入单位区域。所述接收单元从所述存储器装置接收包含指示写入到待经受无用单元收集的擦除单位区域的数据的数据识别信息的区域信息。In general, according to an embodiment, an information processing device includes a transmitting unit and a receiving unit. The transmit unit transmits write data and a logical address of the write data to a memory device. The memory device includes a plurality of unit areas of erase. Each of the erase unit areas includes a plurality of write unit areas. The receiving unit receives area information including data identification information indicating data written to an erase unit area to be subjected to garbage collection from the memory device.
附图说明Description of drawings
图1是展示根据第一实施例的信息处理系统的配置实例的框图;FIG. 1 is a block diagram showing a configuration example of an information processing system according to a first embodiment;
图2是展示根据第一实施例由信息处理系统执行的过程的实例的流程图;FIG. 2 is a flowchart showing an example of a process performed by the information processing system according to the first embodiment;
图3是展示根据第二实施例的信息处理系统的配置实例的框图;3 is a block diagram showing a configuration example of an information processing system according to a second embodiment;
图4是展示第二实施例的第一高速缓存控制的实例的流程图;4 is a flowchart showing an example of the first cache control of the second embodiment;
图5是展示第二实施例的第二高速缓存控制的实例的流程图;FIG. 5 is a flowchart showing an example of the second cache control of the second embodiment;
图6是展示第二实施例的第三高速缓存控制的实例的流程图;6 is a flowchart showing an example of the third cache control of the second embodiment;
图7是展示第二实施例的第四高速缓存控制的实例的流程图;7 is a flowchart showing an example of the fourth cache control of the second embodiment;
图8是展示根据第三实施例的信息处理系统的详细配置的实例的框图;及8 is a block diagram showing an example of a detailed configuration of an information processing system according to a third embodiment; and
图9是展示根据第三实施例的存储系统的实例的透视图。Fig. 9 is a perspective view showing an example of a storage system according to a third embodiment.
具体实施方式detailed description
下文将参考图式来描述实施例。在以下描述中,相同参考编号表示具有几乎相同功能及布置之组件,且在必要时,将对所述组件给出重复描述。Embodiments will be described below with reference to the drawings. In the following description, the same reference numerals denote components having almost the same function and arrangement, and a repeated description will be given to the components when necessary.
在稍后所提及的实施例中的每一者中,在非易失性存储器及非易失性高速缓冲存储器中,数据是每擦除单位区域地被共同擦除。所述擦除单位区域包含多个写入单位区域及多个读取单位区域。In each of the embodiments mentioned later, in the nonvolatile memory and the nonvolatile cache memory, data is commonly erased per erase unit area. The erase unit area includes a plurality of write unit areas and a plurality of read unit areas.
在本实施例中,使用NAND快闪存储器作为非易失性存储器及非易失性高速缓冲存储器中的每一者。然而,所述非易失性存储器及所述非易失性高速缓冲存储器中的每一者均可为除NAND快闪存储器之外的存储器,前提是所述存储器满足所述擦除单位区域、所述写入单位区域及所述读取单位区域当中的上述关系。In this embodiment, a NAND flash memory is used as each of the nonvolatile memory and the nonvolatile cache memory. However, each of the nonvolatile memory and the nonvolatile cache memory may be a memory other than a NAND flash memory, provided that the memory satisfies the erase unit area, The above-described relationship among the write unit area and the read unit area.
当所述非易失性存储器及所述非易失性高速缓冲存储器为NAND快闪存储器时,所述擦除单位区域对应于一块。所述写入单位区域及所述读取单位区域对应于一页。When the nonvolatile memory and the nonvolatile cache memory are NAND flash memories, the erase unit area corresponds to one block. The writing unit area and the reading unit area correspond to one page.
在本实施例中,举例来说,可以例如两个块的另一单位来控制所述擦除单位区域,这允许共同地擦除数据。In this embodiment, for example, the erase unit area can be controlled in another unit such as two blocks, which allows data to be erased collectively.
在本实施例中,存取指示将数据写入到存储器装置及从存储器装置读取数据两者。In this embodiment, the access indicates both writing data to and reading data from the memory device.
[第一实施例][first embodiment]
在本实施例中,描述信息处理装置与存储器装置之间的数据及信息发射及接收。In this embodiment, data and information transmission and reception between an information processing device and a memory device are described.
在本实施例中,使用逻辑地址(例如,逻辑块寻址)作为数据的识别信息。然而,可通过其它信息来识别数据。In this embodiment, logical addresses (for example, logical block addressing) are used as identification information of data. However, data can be identified by other information.
图1是展示根据本实施例的信息处理系统的配置实例的框图。FIG. 1 is a block diagram showing a configuration example of an information processing system according to the present embodiment.
信息处理系统35包含信息处理装置17及SSD 5。SSD 5是存储器装置的实例。信息处理装置17可为对应于SSD 5的主机装置。The information processing system 35 includes the information processing device 17 and the SSD 5 . SSD 5 is an example of a memory device. The information processing device 17 may be a host device corresponding to the SSD 5 .
SSD 5可包含于信息处理装置17中,或可连接到信息处理装置17以便经由网络等发射及接收数据。代替SSD 5,可使用例如硬盘驱动器(HDD)等另一非易失性存储器装置。The SSD 5 may be included in the information processing device 17, or may be connected to the information processing device 17 so as to transmit and receive data via a network or the like. Instead of SSD 5, another non-volatile memory device such as a hard disk drive (HDD) may be used.
信息处理装置17包含高速缓存控制单元9、存储管理信息61到64的存储器3及非易失性高速缓冲存储器4。然而,可在信息处理装置17之外提供高速缓存控制单元9、管理信息61到64、存储器3及非易失性高速缓冲存储器4的全部或一部分。The information processing device 17 includes a cache control unit 9 , a memory 3 storing management information 61 to 64 , and a nonvolatile cache memory 4 . However, all or part of the cache control unit 9 , the management information 61 to 64 , the memory 3 , and the nonvolatile cache memory 4 may be provided outside the information processing device 17 .
存储器3存储各种类型的控制数据,例如管理信息(列表)61到64及地址转换信息7。存储器3可为例如动态随机存取存储器(DRAM)或静态随机存取存储器(SRAM)等易失性存储器,或者可为非易失性存储器。存储器3可包含于非易失性高速缓冲存储器4中。所述存储器可包含于非易失性高速缓冲存储器4中。The memory 3 stores various types of control data such as management information (lists) 61 to 64 and address conversion information 7 . The memory 3 may be a volatile memory such as a dynamic random access memory (DRAM) or a static random access memory (SRAM), or may be a nonvolatile memory. The memory 3 may be included in a non-volatile cache memory 4 . The memory may be included in a non-volatile cache memory 4 .
管理信息61到64分别是写入到稍后所提及的块群组BG1到BG4的数据的元数据。举例来说,管理信息61到64包含指示处理器对相应数据的使用状态的信息。举例来说,管理信息61到64包含相应数据的识别信息、指示数据是否为待删除数据的删除信息、指示数据是否为有效数据的有效/无效信息及用以确定是否满足用于擦除块的擦除条件的高速缓存确定信息。The management information 61 to 64 are metadata of data written to the later-mentioned block groups BG 1 to BG 4 , respectively. For example, the management information 61 to 64 includes information indicating the usage status of the corresponding data by the processor. For example, the management information 61 to 64 includes identification information of the corresponding data, deletion information indicating whether the data is data to be deleted, valid/invalid information indicating whether the data is valid data, and determining whether the criteria for erasing blocks are satisfied. Cache determination information for erasure conditions.
所述删除信息是指示发布对数据的删除命令的信息。更具体来说,所述删除信息是指示从由处理器执行的应用程序或操作系统(OS)接收到对数据的删除命令的信息等。在本实施例中,举例来说,所述删除信息包含使每一块的识别信息与指示写入到每一块的待删除数据的逻辑地址相关的信息。The delete information is information indicating the issuance of a delete command for data. More specifically, the deletion information is information indicating that a deletion command for data has been received from an application program executed by a processor or an operating system (OS), or the like. In this embodiment, for example, the deletion information includes information correlating identification information of each block with a logical address indicating data to be deleted written in each block.
所述有效/无效信息是指示例如当将相同数据写入到多个位置时最新数据是有效数据且除最新数据之外的数据是无效数据的信息。换句话说,例如,在执行对写入到非易失性高速缓冲存储器4的数据的更新的情况中,有效数据是经更新数据。举例来说,在执行更新的情况中,无效数据是未经更新的数据。在本实施例中,举例来说,所述有效/无效信息包含使每一块的识别信息与指示写入到每一块的有效数据或无效数据的逻辑地址相关的信息。The valid/invalid information is information indicating, for example, that when the same data is written to a plurality of locations, the latest data is valid data and data other than the latest data is invalid data. In other words, valid data is updated data, for example, in the case where updating of data written to the nonvolatile cache memory 4 is performed. For example, in the case of performing an update, invalid data is data that has not been updated. In this embodiment, for example, the valid/invalid information includes information correlating identification information of each block with a logical address indicating valid data or invalid data written to each block.
所述高速缓存确定信息是例如包含每数据的写入信息及读取信息中的至少一者或每块的写入信息及读取信息中的至少一者的信息等。The cache specifying information is, for example, information including at least one of write information and read information for each data or at least one of write information and read information for each block.
举例来说,写入信息包含写入时间、写入次数、写入频率及写入次序中的至少一者。For example, the writing information includes at least one of writing time, writing times, writing frequency and writing order.
举例来说,读取信息包含读取时间、读取次数、读取频率及读取次序中的至少一者。For example, the read information includes at least one of read time, read times, read frequency and read order.
举例来说,地址转换信息7使数据的逻辑地址与非易失性高速缓冲存储器4的对应于所述逻辑地址的物理地址相关(举例来说,物理块寻址)。举例来说,地址转换信息7是以表形式来管理的。For example, the address translation information 7 relates the logical address of the data to the physical address of the non-volatile cache memory 4 corresponding to said logical address (eg physical block addressing). For example, the address conversion information 7 is managed in the form of a table.
高速缓存控制单元9为存取速度高于SSD 5的存取速度的非易失性高速缓冲存储器4执行高速缓存控制。举例来说,高速缓存控制单元9通过透写方法或回写方法来管理数据以及指示所述数据的逻辑地址及物理地址。The cache control unit 9 performs cache control for the nonvolatile cache memory 4 whose access speed is higher than that of the SSD 5 . For example, the cache control unit 9 manages data and indicates logical addresses and physical addresses of the data by a write-through method or a write-back method.
在透写方法中,数据是存储于非易失性高速缓冲存储器4中且也存储于SSD 5中。In the write-through method, data is stored in the non-volatile cache memory 4 and also in the SSD 5 .
在回写方法中,存储于非易失性高速缓冲存储器4中的数据并非一起存储于SSD 5中。首先将所述数据存储于非易失性高速缓冲存储器4中,且随后将从非易失性高速缓冲存储器4推出的数据存储于SSD 5中。In the write-back method, data stored in the nonvolatile cache memory 4 is not stored in the SSD 5 together. The data is first stored in the non-volatile cache memory 4 , and the data pushed from the non-volatile cache memory 4 is then stored in the SSD 5 .
在第一实施例中,高速缓存控制单元9包含发射单元18、接收单元19、写入单元20及发射单元21。可通过软件来实施或者可通过硬件来实施高速缓冲存储器9的全部或一部分。In the first embodiment, the cache control unit 9 includes a transmitting unit 18 , a receiving unit 19 , a writing unit 20 and a transmitting unit 21 . All or part of the cache memory 9 may be implemented by software or may be implemented by hardware.
发射单元18向SSD 5发射用于SSD 5的写入数据及所述写入数据的地址。在本实施例中,举例来说,从发射单元18发射到SSD 5的地址为逻辑地址。The transmitting unit 18 transmits write data for the SSD 5 and an address of the write data to the SSD 5 . In this embodiment, for example, the address transmitted from the transmitting unit 18 to the SSD 5 is a logical address.
接收单元19从SSD 5接收包含指示写入到待经受无用单元收集(garbage collection)的块的有效数据的逻辑地址的块信息。The receiving unit 19 receives block information including a logical address indicating valid data written to a block to be subjected to garbage collection from the SSD 5 .
在本实施例中,所述块信息可包含使SSD 5中的每一块的识别信息与写入到每一块的数据的识别信息相关的信息。In this embodiment, the block information may include information correlating identification information of each block in the SSD 5 with identification information of data written to each block.
写入单元20基于从SSD 5接收的块信息及管理信息61到64而将由块信息中所包含的逻辑地址指示的有效数据的全部或一部分写入(转录)到除非易失性存储器24之外的存储器。举例来说,另一存储器可为非易失性高速缓冲存储器4。The writing unit 20 writes (duplicates) all or a part of the valid data indicated by the logical address contained in the block information to the non-volatile memory 24 based on the block information received from the SSD 5 and the management information 61 to 64 of memory. The other memory may be, for example, a non-volatile cache memory 4 .
举例来说,在接收到删除命令的情况下,写入单元20将指示是待删除数据(删除候选者)的数据的逻辑地址从块信息中所包含的指示有效数据的逻辑地址排除。因此,可选择写入到待经受无用单元收集的块且并非待删除数据的有效数据。写入单元20将选定数据写入到另一存储器。For example, in the case of receiving a delete command, the writing unit 20 excludes a logical address indicating data that is data to be deleted (deletion candidate) from a logical address indicating valid data included in the block information. Thus, valid data written to a block to be subject to garbage collection and not data to be deleted can be selected. The writing unit 20 writes selected data to another memory.
发射单元21产生包含指示待删除数据的逻辑地址的删除信息并将所述删除信息发射到SSD 5。举例来说,所述删除信息可包含指示块信息中所包含的有效数据的逻辑地址中指示是未被写入单元20写入到另一存储器的删除目标的数据的逻辑地址。代替删除信息,可将包含待维持数据的逻辑地址的维持信息从发射单元21发射到SSD 5。The transmission unit 21 generates deletion information including a logical address indicating data to be deleted and transmits the deletion information to the SSD 5 . For example, the deletion information may include a logical address indicating data that is a deletion target that is not written to another memory by the writing unit 20 among logical addresses indicating valid data included in the block information. Instead of deleting information, maintaining information including logical addresses of data to be maintained may be transmitted from transmitting unit 21 to SSD 5 .
SSD 5包含处理器22、存储器23及非易失性存储器24。The SSD 5 includes a processor 22 , a memory 23 and a non-volatile memory 24 .
举例来说,存储器23存储各种类型的控制数据,例如地址转换信息32、有效/无效信息33及删除信息34。存储器23可为例如DRAM或SRAM等易失性存储器,或者可为非易失性存储器。存储器23可包含于非易失性存储器24中。For example, the memory 23 stores various types of control data, such as address translation information 32 , valid/invalid information 33 and deletion information 34 . The memory 23 may be a volatile memory such as DRAM or SRAM, or may be a nonvolatile memory. Memory 23 may be included in non-volatile memory 24 .
处理器22通过执行存储于处理器22中的存储器中的程序、存储于存储器23中的程序或存储于非易失性存储器24中的程序而充当地址转换单元25、写入单元26、有效/无效产生单元27、选择单元28、发射单元29、接收单元30及无用单元收集单元31。The processor 22 functions as an address conversion unit 25, a write unit 26, a valid/ The invalid generation unit 27 , the selection unit 28 , the transmitting unit 29 , the receiving unit 30 and the garbage collection unit 31 .
在本实施例中,举例来说,用以致使处理器22充当地址转换单元25、写入单元26、有效/无效产生单元27、选择单元28、发射单元29、接收单元30及无用单元收集单元31的程序可为OS、中间件或固件。在本实施例中,可通过硬件来实施地址转换单元25、写入单元26、有效/无效产生单元27、选择单元28、发射单元29、接收单元30及无用单元收集单元31的全部或一部分。In this embodiment, for example, to cause the processor 22 to act as an address conversion unit 25, a writing unit 26, a valid/invalid generating unit 27, a selecting unit 28, a transmitting unit 29, a receiving unit 30 and a garbage collection unit The program at 31 may be OS, middleware or firmware. In this embodiment, all or a part of the address conversion unit 25, the writing unit 26, the valid/invalid generating unit 27, the selecting unit 28, the transmitting unit 29, the receiving unit 30 and the garbage collecting unit 31 can be implemented by hardware.
当从高速缓存控制单元9接收到写入数据及所述写入数据的逻辑地址时,地址转换单元25产生使写入数据的逻辑地址与指示非易失性存储器24中的存储所述写入数据的位置的物理地址相关的信息,且将所述信息寄存到地址转换信息32。When receiving the write data and the logical address of the write data from the cache control unit 9, the address conversion unit 25 generates the logical address of the write data and the storage instruction in the nonvolatile memory 24. The information related to the physical address of the location of the data is stored in the address translation information 32 .
在本实施例中,地址转换单元25由处理器22实施。然而,地址转换单元25可与处理器22分开而配置。In this embodiment, the address translation unit 25 is implemented by the processor 22 . However, the address conversion unit 25 may be configured separately from the processor 22 .
地址转换单元25基于(例如)表形式地址转换信息32而转换地址。代替地,可通过关键字-值检索来转换地址。举例来说,可通过使用逻辑地址作为关键字并使用物理地址作为值而借助于关键字-值检索来实施地址转换。The address conversion unit 25 converts addresses based on, for example, tabular address conversion information 32 . Alternatively, addresses may be translated by key-value retrieval. For example, address translation may be implemented by means of key-value retrieval by using a logical address as a key and a physical address as a value.
写入单元26将写入数据写入到由地址转换单元25获得的物理地址所指示的位置。The writing unit 26 writes write data to the location indicated by the physical address obtained by the address conversion unit 25 .
有效/无效产生单元27基于例如地址转换信息32而产生指示写入到非易失性存储器24的数据的每一项是有效数据还是无效数据的有效/无效信息33。随后,有效/无效产生单元27将有效/无效信息33存储于存储器23中。Valid/invalid generating unit 27 generates valid/invalid information 33 indicating whether each item of data written to nonvolatile memory 24 is valid data or invalid data based on, for example, address conversion information 32 . Subsequently, the valid/invalid generating unit 27 stores the valid/invalid information 33 in the memory 23 .
选择单元28选择待经受无用单元收集的块。Selection unit 28 selects blocks to be subjected to garbage collection.
举例来说,选择单元28可从非易失性存储器24中的块选择具有最旧写入时间的块来作为待经受无用单元收集的块。For example, selection unit 28 may select, from the blocks in non-volatile memory 24, the block with the oldest write time as the block to be subjected to garbage collection.
举例来说,选择单元28可随机地从非易失性存储器24中的块选择待经受无用单元收集的块。For example, selection unit 28 may randomly select blocks from blocks in non-volatile memory 24 to be subject to garbage collection.
举例来说,选择单元28可基于有效/无效信息33而选择具有最大无效数据量或具有大于预定量的无效数据量作为待经受无用单元收集的块。For example, selection unit 28 may select, based on valid/invalid information 33, a block having a maximum amount of invalid data or having an amount of invalid data greater than a predetermined amount as a block to be subjected to garbage collection.
举例来说,选择单元28可基于有效/无效信息33及删除信息34而选择具有最大无效数据及待删除数据量或具有大于预定量的无效数据及待删除数据量的块作为待经受无用单元收集的块。For example, the selection unit 28 may select, based on the valid/invalid information 33 and the deletion information 34, a block having the largest amount of invalid data and data to be deleted or having more than a predetermined amount of invalid data and the amount of data to be deleted as a block to be subjected to garbage collection of blocks.
发射单元29通过将指示由有效/无效信息33确定为无效的无效数据的逻辑地址从指示写入到待经受无用单元收集的块的数据的逻辑地址删除而产生块信息。换句话说,所述块信息包含使待经受无用单元收集的块的识别信息与指示写入到所述块的有效数据的逻辑地址相关的信息。发射单元29将所述块信息发射到高速缓冲存储器控制单元9。The transmission unit 29 generates block information by deleting a logical address indicating invalid data determined to be invalid by the valid/invalid information 33 from a logical address indicating data written to a block to be subjected to garbage collection. In other words, the block information includes information correlating identification information of a block to be subjected to garbage collection with a logical address indicating valid data written to the block. The transmission unit 29 transmits the block information to the cache memory control unit 9 .
接收单元30从高速缓冲存储器控制单元9接收删除信息并将删除信息34存储于非易失性存储器24中。The receiving unit 30 receives deletion information from the cache control unit 9 and stores the deletion information 34 in the nonvolatile memory 24 .
无用单元收集单元31基于有效/无效信息33及存储于非易失性存储器24中的删除信息34而将无效数据及待删除数据从写入到待经受无用单元收集的块的数据排除,且仅为并非待删除数据的有效数据执行无用单元收集。The garbage collection unit 31 excludes invalid data and data to be deleted from data written to blocks to be subjected to garbage collection based on valid/invalid information 33 and deletion information 34 stored in the nonvolatile memory 24, and only Garbage collection is performed for valid data that is not data to be deleted.
图2是展示根据本实施例由信息处理系统执行的过程的实例的流程图。FIG. 2 is a flowchart showing an example of a procedure executed by the information processing system according to the present embodiment.
在步骤S201中,发射单元18将写入数据及逻辑地址发射到SSD 5。In step S201 , the transmitting unit 18 transmits the write data and the logical address to the SSD 5 .
在步骤S202中,地址转换单元25接收写入数据及逻辑地址,并将使写入数据的逻辑地址与物理地址相关的信息寄存到地址转换信息32。In step S202 , the address conversion unit 25 receives the write data and the logical address, and registers information relating the logical address of the write data to the physical address in the address conversion information 32 .
在步骤S203中,写入单元26将写入数据写入到非易失性存储器24中的由所述物理地址指示的位置。In step S203 , the writing unit 26 writes the write data into the location indicated by the physical address in the nonvolatile memory 24 .
在步骤S204中,有效/无效产生单元27产生指示写入到非易失性存储器24的每一数据项是有效数据还是无效数据的有效/无效信息33并将有效/无效信息33存储于存储器23中。In step S204, the valid/invalid generating unit 27 generates valid/invalid information 33 indicating whether each data item written to the nonvolatile memory 24 is valid data or invalid data and stores the valid/invalid information 33 in the memory 23 middle.
在步骤S205中,选择单元28选择待经受无用单元收集的块。In step S205, the selection unit 28 selects a block to be subjected to garbage collection.
在步骤S206中,发射单元29通过将指示由有效/无效信息33指示为无效的无效数据的逻辑地址从指示写入到待经受无用单元收集的块的数据的逻辑地址删除而产生块信息,并将所述块信息发射到高速缓存控制单元9。In step S206, the transmitting unit 29 generates block information by deleting a logical address indicating invalid data indicated by the valid/invalid information 33 as invalid from a logical address indicating data written to a block to be subjected to garbage collection, and The block information is transmitted to the cache control unit 9 .
在步骤S207中,接收单元19从SSD 5接收块信息。In step S207 , the receiving unit 19 receives block information from the SSD 5 .
在步骤S208中,写入单元20基于从SSD 5接收的块信息以及管理信息61到64而将由块信息中所包含的逻辑地址指示的数据的全部或一部分写入到除SSD 5的非易失性存储器24之外的存储器。In step S208, the writing unit 20 writes all or a part of the data indicated by the logical address contained in the block information to the nonvolatile memory of the SSD 5 based on the block information received from the SSD 5 and the management information 61 to 64. Memory other than permanent memory 24.
举例来说,在接收到删除命令的情况下,写入单元20将指示待删除数据的逻辑地址从块信息中所包含的逻辑地址排除,并将由所述逻辑地址指示的待维持数据写入到另一存储器。For example, when a delete command is received, the writing unit 20 excludes a logical address indicating data to be deleted from the logical addresses contained in the block information, and writes the data to be maintained indicated by the logical address into Another memory.
在步骤S209中,发射单元21将包含待删除数据的逻辑地址的删除信息发射到SSD5。In step S209, the transmitting unit 21 transmits deletion information including the logical address of the data to be deleted to the SSD5.
在步骤S210中,接收单元30从高速缓存控制单元9接收删除信息并将删除信息34存储于存储器23中。In step S210 , the receiving unit 30 receives deletion information from the cache control unit 9 and stores the deletion information 34 in the memory 23 .
在步骤S211中,无用单元收集单元31基于有效/无效信息33及删除信息34而将无效数据及待删除数据数据从写入到待经受无用单元收集的块的数据排除,且针对并非待删除数据的有效数据执行无用单元收集。In step S211, the garbage collection unit 31 excludes invalid data and data to be deleted from the data written to the block to be subjected to garbage collection based on the valid/invalid information 33 and the deletion information 34, and for data not to be deleted Garbage collection is performed on valid data.
在上文所描述的本实施例中,高速缓存控制单元9可从SSD 5获取关于写入到非易失性存储器24的块的数据的信息。高速缓存控制单元9可借此辨识数据在非易失性存储器24的块中的写入状态。举例来说,在本实施例中,可辨识写入到非易失性存储器24的块的数据是有效数据还是无效数据及是否可删除所述数据。In the present embodiment described above, the cache control unit 9 can acquire information on data written to a block of the nonvolatile memory 24 from the SSD 5 . The cache control unit 9 can thereby identify the write status of data in the block of the non-volatile memory 24 . For example, in this embodiment, it can be identified whether the data written to the block of the nonvolatile memory 24 is valid data or invalid data and whether the data can be deleted.
在本实施例中,SSD 5包含用以确定数据是有效数据还是无效数据的有效/无效信息33及用以确定是否可删除数据的删除信息34。借此,可在于SSD 5中执行无用单元收集时确定是否将擦除写入到待经受无用单元收集的块的数据。因此,可避免非必需数据写入且可增加非易失性存储器24的寿命。In this embodiment, the SSD 5 includes valid/invalid information 33 for determining whether the data is valid or invalid, and deletion information 34 for determining whether the data can be deleted. By this, whether or not to erase data written to a block to be subjected to garbage collection can be determined when garbage collection is performed in the SSD 5 . Therefore, unnecessary data writing can be avoided and the lifetime of the nonvolatile memory 24 can be increased.
在本实施例中,高速缓存控制单元9可防止由从SSD 5接收的块信息中所包含的逻辑地址指示的有效数据当中的删除目标数据被从非易失性存储器24转录到另一存储器。在本实施例中,SSD 5可将并未从高速缓存控制单元9转录到另一存储器的数据(举例来说,可删除的无效数据或有效数据)从SSD 5删除。In the present embodiment, the cache control unit 9 can prevent deletion target data among valid data indicated by a logical address contained in the block information received from the SSD 5 from being transcribed from the nonvolatile memory 24 to another memory. In this embodiment, the SSD 5 can delete from the SSD 5 data that is not transcribed from the cache control unit 9 to another memory (for example, invalid data or valid data that can be deleted).
在上文所描述的本实施例中,将与待擦除块相关的块信息从SSD 5发射到信息处理装置17。然而,举例来说,所述块信息可包含使非易失性存储器24中的每一块与写入到每一块的数据的识别信息相关的信息。信息处理装置17可通过从SSD 5接收关系信息来辨识SSD 5中的块与数据之间的存储关系。In the present embodiment described above, the block information related to the block to be erased is transmitted from the SSD 5 to the information processing device 17 . However, the block information may include information that correlates each block in the nonvolatile memory 24 with identification information of data written to each block, for example. The information processing device 17 can recognize the storage relationship between blocks and data in the SSD 5 by receiving the relationship information from the SSD 5 .
[第二实施例][Second embodiment]
在本实施例中描述包含非易失性高速缓冲存储器4的高速缓冲存储器装置。A cache memory device including the nonvolatile cache memory 4 is described in this embodiment.
图3是展示根据本实施例的信息处理装置35的配置实例的框图。FIG. 3 is a block diagram showing a configuration example of the information processing device 35 according to the present embodiment.
信息处理装置17包含处理器2、存储器3及非易失性高速缓冲存储器4。The information processing device 17 includes a processor 2 , a memory 3 and a nonvolatile cache memory 4 .
非易失性高速缓冲存储器4包含块群组BG1到BG4。非易失性高速缓冲存储器4具有比SSD 5的存取速度高的存取速度。The nonvolatile cache memory 4 includes block groups BG 1 to BG 4 . The nonvolatile cache memory 4 has an access speed higher than that of the SSD 5 .
块群组(第一群组)BG1包含块(第一擦除单位区域)B1,1到B1,K。块群组BG1存储由处理器2存取的数据(即,由处理器2使用的数据)。The block group (first group) BG 1 includes blocks (first erase unit regions) B 1,1 to B 1,K . Block group BG1 stores data accessed by processor 2 (ie, data used by processor 2).
在本实施例中,当块群组BG1满足擦除条件(第一擦除条件)时,基于先进先出(FIFO)而从块群组BG1中的块B1,1到B1,K选择待擦除块(待丢弃或推出块)(第一待擦除区域)。In this embodiment, when the block group BG 1 satisfies the erasure condition (the first erasure condition), blocks B 1,1 to B 1 , K selects a block to be erased (a block to be discarded or pushed out) (the first area to be erased).
举例来说,当块群组BG1的块B1,1到B1,K中的每一者的数据量超过预定值时,满足擦除条件。举例来说,当写入到块群组BG1的块B1,1到B1,K中的每一者的页数目超过预定数目时,可满足擦除条件。For example, when the data amount of each of the blocks B 1,1 to B 1,K of the block group BG 1 exceeds a predetermined value, the erasure condition is satisfied. For example, an erase condition may be satisfied when the number of pages written to each of blocks B 1,1 to B 1,K of block group BG 1 exceeds a predetermined number.
当写入到基于FIFO而选自块B1,1到B1,K的待擦除块的数据处于第一低使用状态时(举例来说,当所述数据被存取达少于所设定第一次数或以小于所设定第一频率被存取时),将所述数据写入到块群组BG2。相比之下,当写入到选自块B1,1到B1,K的待擦除块的数据处于第一高使用状态时(举例来说,当所述数据被存取达第一次数或更多或以第一频率或更大被存取时),将所述数据写入到块群组BG3。写入到选自块B1,1到B1,K的待擦除块的数据是每块地被擦除(即,丢弃或推出)。When data written to a block to be erased selected from blocks B 1,1 to B 1,K on a FIFO basis is in a first low usage state (for example, when the data is accessed for less than the set The data is written into the block group BG 2 when it is accessed for a predetermined number of times or less than the set first frequency). In contrast, when the data written to the block to be erased selected from blocks B 1,1 to B 1,K is in the first high usage state (for example, when the data is accessed for the first the number of times or more or the first frequency or more), the data is written to the block group BG 3 . Data written to blocks to be erased selected from blocks B 1,1 to B 1,K are erased (ie discarded or pushed out) on a block-by-block basis.
块群组(第二群组)BG2包含块(第二擦除单位区域)B2,1到B2,L。块群组BG2存储写入到选自块群组BG1的待擦除块的数据中的处于第一低使用状态的数据。The block group (second group) BG 2 includes blocks (second erase unit regions) B 2,1 to B 2,L . The block group BG 2 stores data in a first low usage state written to data of blocks to be erased selected from the block group BG 1 .
在本实施例中,当块群组BG2满足擦除条件(第三擦除条件)时,基于FIFO而从块群组BG2中的块B2,1到B2,L选择待擦除块(第三待擦除区域)。In this embodiment, when the block group BG 2 satisfies the erasing condition (the third erasing condition), the blocks B 2,1 to B 2,L in the block group BG 2 are selected to be erased based on FIFO block (the third area to be erased).
当写入到依据FIFO而选自块B2,1到B2,L的待擦除块的数据处于第三低使用状态时(举例来说,当所述数据被存取达少于所设定第三次数或以小于所设定第三频率被存取时),擦除所述数据。相比之下,当写入到选自块B2,1到B2,L的待擦除块的数据处于第三高使用状态时(举例来说,当所述数据被存取达第三次数或更多或以第三频率或更大被存取时),将所述数据写入到块群组BG3。随后,写入到选自块B2,1到B2,L的待擦除块的数据被每块地擦除。When the data written to the block to be erased selected from the blocks B 2,1 to B 2,L according to the FIFO is in the third low usage state (for example, when the data is accessed for less than the set When accessing for a predetermined third number of times or less than the set third frequency), the data is erased. In contrast, when data written to a block to be erased selected from blocks B 2,1 to B 2,L is in the third highest usage state (for example, when the data is accessed up to the third or more times or is accessed at a third frequency or more), the data is written to the block group BG 3 . Subsequently, the data written to the blocks to be erased selected from the blocks B 2,1 to B 2,L are erased block by block.
块群组(第三群组)BG3包含块(第三擦除单位区域)B3,1到B3,M。块群组BG3存储写入到选自块群组BG1的待擦除块的数据中的处于第一低使用状态的数据。块群组BG3还存储写入到选自块群组BG2的待擦除块的数据中的处于第三高使用状态的数据。The block group (third group) BG 3 includes blocks (third erase unit regions) B 3,1 to B 3,M . Block group BG 3 stores data in a first low usage state written to data of blocks to be erased selected from block group BG 1 . The block group BG 3 also stores data in the third highest usage state written to the data of the blocks to be erased selected from the block group BG 2 .
在本实施例中,当块群组BG3满足擦除条件(第二擦除条件)时,基于FIFO而从块群组BG3中的块B3,1到B3,M选择待擦除块(第二待擦除区域)。In this embodiment, when the block group BG3 satisfies the erasing condition (second erasing condition), the blocks B3,1 to B3 ,M in the block group BG3 are selected to be erased based on FIFO block (the second area to be erased).
当写入到依据FIFO而选自块B3,1到B3,M的待擦除块的数据处于第二低使用状态时(举例来说,当所述数据被存取达少于所设定第二次数或以小于所设定第二频率被存取时),将所述数据写入到块群组BG4。相比之下,当写入到选自块B3,1到B3,M的待擦除块的数据处于第二高使用状态时(举例来说,当所述数据被存取达第二次数或更多或以第二频率或更大被存取时),再次将所述数据写入到块群组BG3中的另一块。随后,写入到选自块B3,1到B3,M的待擦除块的数据被每块地擦除。When data written to a block to be erased selected from blocks B 3,1 to B 3,M according to the FIFO is in the second least used state (for example, when the data is accessed for less than the set The data is written into the block group BG 4 when it is accessed for a predetermined second number of times or less than the set second frequency. In contrast, when the data written to the block to be erased selected from blocks B 3,1 to B 3,M is in the second highest usage state (for example, when the data is accessed for the second or more times or at the second frequency or more), the data is written again to another block in the block group BG3 . Subsequently, the data written to the blocks to be erased selected from the blocks B 3,1 to B 3,M are erased block by block.
块群组(第四群组)BG4包含块(第四擦除单位区域)B4,1到B4,N,块群组BG4存储写入到选自块群组BG3的待擦除块的数据中的处于第二低使用状态的数据。Block group (fourth group) BG 4 includes blocks (fourth erasing unit area) B 4,1 to B 4,N , and block group BG 4 stores and writes to the data to be erased selected from block group BG 3 . The data in the second least used state among the data except the block.
在本实施例中,当块群组BG4满足擦除条件(第四擦除条件)时,基于FIFO而从块群组BG4中的块B4,1到B4,N选择待擦除块(第四待擦除区域)。In this embodiment, when the block group BG 4 satisfies the erasing condition (the fourth erasing condition), the blocks B 4,1 to B 4,N in the block group BG 4 are selected to be erased based on FIFO block (the fourth area to be erased).
擦除写入到依据FIFO而选自块B4,1到B4,N的待擦除块的数据。Data written to blocks to be erased selected from blocks B 4,1 to B 4,N according to the FIFO are erased.
在本实施例中,FIFO用作用于从块群组BG1到BG4中的每一者选择待擦除块的方法。通过依据FIFO选择待擦除块,在块群组BG1到BG4中的每一者中从具有与最旧写入时间及写入次序的块开始循序地执行擦除。然而,举例来说,可随机地或基于最近最少使用(LRU)或最不经常使用(LFU)来选择待擦除块。举例来说,管理信息61到64包含数据的识别信息、指示数据是否为待删除数据的信息及数据的使用状态信息。可基于管理信息61到64而选择具有最大无效数据量的块或具有大于预定量的无效数据量的块作为待擦除块。举例来说,可基于管理信息61到64而选择具有最大无效数据及待删除数据(删除目标数据)量的块或具有大于预定量的无效数据及待删除数据量的块作为待擦除块。In the present embodiment, FIFO is used as a method for selecting a block to be erased from each of the block groups BG 1 to BG 4 . By selecting blocks to be erased according to the FIFO, erasing is sequentially performed starting from the block with the oldest writing time and writing order in each of the block groups BG1 to BG4 . However, blocks to be erased may be selected randomly or based on least recently used (LRU) or least frequently used (LFU), for example. For example, the management information 61 to 64 includes identification information of the data, information indicating whether the data is data to be deleted, and usage status information of the data. A block having the largest amount of invalid data or a block having an amount of invalid data greater than a predetermined amount may be selected as a block to be erased based on the management information 61 to 64 . For example, a block with the largest amount of invalid data and data to be deleted (deletion target data) or a block with an amount of invalid data and data to be deleted larger than a predetermined amount may be selected as a block to be erased based on the management information 61 to 64 .
在本实施例中,高速缓存控制单元9可基于管理信息61到64及地址转换信息7而辨识经高速缓存数据的识别信息(举例来说,从主机提供的逻辑地址(举例来说,逻辑块寻址))、所述数据被写入到的位置及所述数据的使用状态。举例来说,高速缓存控制单元9可基于管理信息61到64及地址转换信息7而选择高速缓存到块群组BG1到BG4中的每一者的数据及依据FIFO擦除的块。In the present embodiment, the cache control unit 9 can recognize identification information of the cached data (for example, a logical address (for example, logical block addressing)), the location where the data is written to, and the usage status of the data. For example, cache control unit 9 may select data cached to each of block groups BG 1 to BG 4 and blocks erased according to FIFOs based on management information 61 to 64 and address translation information 7 .
处理器2通过执行存储于处理器2的存储器、存储器3、非易失性高速缓冲存储器4或SSD 5中的程序而充当地址转换单元8及高速缓存控制单元9。The processor 2 functions as the address conversion unit 8 and the cache control unit 9 by executing programs stored in the memory of the processor 2 , the memory 3 , the nonvolatile cache memory 4 , or the SSD 5 .
在本实施例中,举例来说,用以致使处理器2充当地址转换单元8及高速缓存控制单元9的程序可为OS、中间件或固件。在本实施例中,可通过硬件来实施地址转换单元8的全部或一部分或者高速缓存控制单元9的全部或一部分。In this embodiment, for example, the program for causing the processor 2 to function as the address translation unit 8 and the cache control unit 9 may be OS, middleware or firmware. In this embodiment, all or a part of the address translation unit 8 or all or a part of the cache control unit 9 may be implemented by hardware.
地址转换单元8产生使写入数据的逻辑地址与指示非易失性高速缓冲存储器4中的存储所述写入数据的位置的物理地址相关的信息,且将所产生信息寄存到地址转换信息7。The address conversion unit 8 generates information correlating the logical address of the write data with the physical address indicating the location in the nonvolatile cache memory 4 where the write data is stored, and registers the generated information to the address conversion information 7 .
当从处理器2接收到读取数据的逻辑地址时,地址转换单元8基于地址转换信息7而将逻辑地址转换为物理地址。When receiving a logical address of read data from processor 2 , address conversion unit 8 converts the logical address into a physical address based on address conversion information 7 .
高速缓存控制单元9包含产生单元10、控制单元11到14以及变化单元15及16。Cache control unit 9 includes generation unit 10 , control units 11 to 14 and variation units 15 and 16 .
产生单元10产生对应于非易失性高速缓冲存储器4中的块群组BG1到BG4的管理信息61到64并将管理信息61到64写入到存储器3。The generating unit 10 generates management information 61 to 64 corresponding to the block groups BG 1 to BG 4 in the nonvolatile cache memory 4 and writes the management information 61 to 64 to the memory 3 .
控制单元11到14分别为块群组BG1到BG4控制数据写入及块擦除。The control units 11 to 14 control data writing and block erasing for the block groups BG1 to BG4, respectively.
控制单元11包含写入单元111、确定单元112、选择单元113、确定单元114及擦除单元115。The control unit 11 includes a writing unit 111 , a determining unit 112 , a selecting unit 113 , a determining unit 114 and an erasing unit 115 .
写入单元(第一写入单元)111将由处理器2存取的数据写入到块群组BG1。The writing unit (first writing unit) 111 writes data accessed by the processor 2 to the block group BG 1 .
确定单元(第一确定单元)112确定块群组BG1是否满足擦除条件(第一擦除条件)。The determination unit (first determination unit) 112 determines whether the block group BG1 satisfies an erasure condition (first erasure condition).
当块群组BG1满足擦除条件时,选择单元(第一选择单元)113从块群组BG1选择待擦除块(第一待擦除区域)。When the block group BG1 satisfies the erasing condition, the selection unit ( first selection unit) 113 selects a block to be erased ( first area to be erased) from the block group BG1.
确定单元(第二确定单元)114基于管理信息61而确定写入到待擦除块的每一数据项是处于第一高使用状态还是第一低使用状态及所述数据的每一项是否为待删除数据。Determining unit (second determining unit) 114 determines whether each data item written into the block to be erased is in the first high usage state or the first low usage state and whether each item of the data is based on the management information 61 Data to be deleted.
当写入到待擦除块的每一数据项可因每一数据项被写入到块群组BG2到BG3或是待删除数据而被丢弃时,擦除单元(第一擦除单元)115擦除待擦除块。When each data item written to the block to be erased can be discarded because each data item is written into block groups BG 2 to BG 3 or data to be deleted, the erasing unit (the first erasing unit ) 115 erases the block to be erased.
控制单元12包含写入单元121、确定单元122、选择单元123、确定单元124及擦除单元125。The control unit 12 includes a writing unit 121 , a determining unit 122 , a selecting unit 123 , a determining unit 124 and an erasing unit 125 .
当确定单元114确定写入到块群组BG1的待擦除块的数据处于第一低使用状态且并非待删除数据时,写入单元(第二写入单元)121将所述数据写入到块群组BG2。When the determining unit 114 determines that the data written to the block to be erased in the block group BG 1 is in the first low usage state and is not data to be deleted, the writing unit (second writing unit) 121 writes the data into to block group BG 2 .
确定单元(第五确定单元)122确定块群组BG2是否满足擦除条件(第三擦除条件)。The determination unit (fifth determination unit) 122 determines whether the block group BG2 satisfies an erasure condition (third erasure condition).
当块群组BG2满足擦除条件时,选择单元(第三选择单元)123从块群组BG2选择待擦除块(第三待擦除区域)。When the block group BG2 satisfies the erasing condition, the selection unit (third selection unit) 123 selects a block to be erased (third region to be erased ) from the block group BG2.
确定单元124基于管理信息62而确定写入到待擦除块的每一数据项是处于第三高使用状态还是第三低使用状态及所述数据的每一项是否为待删除数据。The determining unit 124 determines whether each data item written into the block to be erased is in the third highest usage state or the third lowest usage state and whether each item of data is data to be deleted based on the management information 62 .
当处于第三高使用状态且并非待删除数据的写入到待擦除块的数据被写入到块群组BG3时,擦除单元(第二擦除单元)125擦除写入到待擦除块的数据。When the data written to the block to be erased that is not the data to be erased is written into the block group BG 3 in the third high usage state, the erase unit (second erase unit) 125 erases the data written to the block to be erased. Erases the data of a block.
控制单元13包含写入单元131、确定单元132、选择单元133、确定单元134、写入单元135、擦除单元136及写入单元137。The control unit 13 includes a writing unit 131 , a determining unit 132 , a selecting unit 133 , a determining unit 134 , a writing unit 135 , an erasing unit 136 and a writing unit 137 .
当确定单元114确定写入到块群组BG1的待擦除块的数据处于第一高使用状态且并非待删除数据时,写入单元(第三写入单元)131将所述数据写入到块群组BG3。When the determination unit 114 determines that the data written to the block to be erased in the block group BG 1 is in the first high usage state and is not data to be deleted, the writing unit (third writing unit) 131 writes the data into to block group BG 3 .
当写入到块群组BG2的数据处于第三高使用状态且并非待删除数据时,写入单元(第六写入单元)137将所述数据写入到块群组BG3。举例来说,当写入到块群组BG2的数据是待由处理器2存取的数据时,写入单元137可将块群组BG2的待存取数据写入到块群组BG3。When the data written into the block group BG 2 is in the third highest usage state and is not data to be deleted, the writing unit (sixth writing unit) 137 writes the data into the block group BG 3 . For example, when the data written into the block group BG2 is data to be accessed by the processor 2 , the writing unit 137 may write the data to be accessed of the block group BG2 into the block group BG 3 .
确定单元(第三确定单元)132确定块群组BG3是否满足擦除条件(第二擦除条件)。The determination unit ( third determination unit) 132 determines whether the block group BG3 satisfies an erasure condition (second erasure condition).
当块群组BG3满足擦除条件时,选择单元(第二选择单元)133从块群组BG3选择待擦除块(第二待擦除区域)。When the block group BG3 satisfies the erasure condition, the selection unit (second selection unit) 133 selects a block to be erased (second area to be erased ) from the block group BG3.
确定单元(第四确定单元)134基于管理信息63而确定写入到待擦除块的每一数据项是处于第二高使用状态还是第二低使用状态及所述数据的每一项是否为待删除数据。Determining unit (the 4th determining unit) 134 is based on the management information 63 and determines whether each data item written into the block to be erased is in the second high usage state or the second low usage state and whether each item of the data is Data to be deleted.
当写入到块群组BG3的待擦除块的数据被确定为处于第二高使用状态且并非待删除数据时,写入单元(第五写入单元)135再次将所述数据写入到块群组BG3中的另一可写入块。When the data written to the block to be erased in the block group BG 3 is determined to be in the second highest usage state and not to be deleted, the writing unit (fifth writing unit) 135 writes the data again to another writable block in block group BG 3 .
当写入到待擦除块的数据的每一项可因每一数据项被写入到块群组BG4、再次被写入到块群组BG3或是待删除数据而被丢弃时,擦除单元(第三擦除单元)136擦除待擦除块。When each item of data written to the block to be erased can be discarded due to each data item being written to the block group BG4 , written again to the block group BG3 , or data to be deleted, The erasing unit (third erasing unit) 136 erases a block to be erased.
控制单元14包含写入单元141、确定单元142、选择单元143及擦除单元144。The control unit 14 includes a writing unit 141 , a determining unit 142 , a selecting unit 143 and an erasing unit 144 .
当确定单元134确定写入到块群组BG3的待擦除块的数据处于第二低使用状态且并非待删除数据时,写入单元(第四写入单元)141将所述数据写入到块群组BG4。When the determining unit 134 determines that the data written to the block to be erased in the block group BG 3 is in the second low usage state and is not data to be deleted, the writing unit (fourth writing unit) 141 writes the data into to block group BG 4 .
确定单元(第六确定单元)142确定块群组BG4是否满足擦除条件(第四擦除条件)。The determination unit (sixth determination unit) 142 determines whether the block group BG4 satisfies an erasure condition ( fourth erasure condition).
当块群组BG4满足擦除条件(第四擦除条件)时,选择单元(第四选择单元)143从块群组BG4选择待擦除块(第四待擦除区域)。When block group BG4 satisfies the erase condition ( fourth erase condition), the selection unit ( fourth selection unit) 143 selects a block to be erased (fourth area to be erased) from block group BG4.
擦除单元(第四擦除单元)144擦除写入到块群组BG4的待擦除块的数据。The erasing unit ( fourth erasing unit) 144 erases the data written to the block to be erased of the block group BG4.
当写入到块群组BG2的数据达到第三高使用状态时,变化单元(第一变化单元)15增加块群组BG1中所包含的块的数目且减少块群组BG3中所包含的块的数目。举例来说,当写入到块群组BG2的数据由处理器2存取时,变化单元15增加块群组BG1中所包含的块的数目且减少块群组BG3中所包含的块的数目。When the data written into block group BG 2 reaches the third highest usage state, change unit (first change unit) 15 increases the number of blocks contained in block group BG 1 and decreases the number of blocks contained in block group BG 3 The number of blocks to contain. For example, when data written to block group BG 2 is accessed by processor 2, change unit 15 increases the number of blocks contained in block group BG 1 and decreases the number of blocks contained in block group BG 3 number of blocks.
当写入到块群组BG4的数据达到第四高使用状态时,变化单元(第二变化单元)16增加块群组BG3中所包含的块的数目且减少块群组BG1中所包含的块的数目。举例来说,当写入到块群组BG4的数据由处理器2存取时,变化单元16增加块群组BG3中所包含的块的数目且减少块群组BG1中所包含的块的数目。When the data written to block group BG 4 reaches the fourth highest usage state, change unit (second change unit) 16 increases the number of blocks contained in block group BG 3 and decreases the number of blocks contained in block group BG 1 The number of blocks to contain. For example, when data written to block group BG 4 is accessed by processor 2, variation unit 16 increases the number of blocks contained in block group BG 3 and decreases the number of blocks contained in block group BG 1 number of blocks.
图4是展示根据本实施例的第一高速缓存控制的实例的流程图。图4示范性地展示其中将数据写入到块群组BG1、将数据写入到块群组BG2或BG3并擦除块群组BG1中的待擦除块的过程。FIG. 4 is a flowchart showing an example of the first cache control according to the present embodiment. FIG. 4 exemplarily shows a process in which data is written to block group BG1, data is written to block group BG2 or BG3 , and a block to be erased in block group BG1 is erased.
在步骤S401中,写入单元111将由处理器2存取的数据写入到块群组BG1。In step S401 , the writing unit 111 writes data accessed by the processor 2 into the block group BG 1 .
在步骤402中,确定单元112确定块群组BG1是否满足擦除条件。In step 402, the determination unit 112 determines whether the block group BG1 satisfies an erasure condition.
当块群组BG1不满足擦除条件时,所述过程继续进行到步骤S406。When the block group BG1 does not satisfy the erasure condition, the process proceeds to step S406.
当块群组BG1满足擦除条件时,在步骤S403中,选择单元113从块群组BG1选择待擦除块。When the block group BG 1 satisfies the erasing condition, in step S403 , the selection unit 113 selects a block to be erased from the block group BG 1 .
在步骤S404中,确定单元114基于管理信息61而确定写入到待擦除块的每一数据项是处于第一高使用状态还是第一低使用状态及所述数据的每一项是否为待擦除数据(删除目标数据)。In step S404, the determination unit 114 determines based on the management information 61 whether each data item written to the block to be erased is in the first high usage state or the first low usage state and whether each item of the data is a pending block. Wipe data (delete target data).
当数据项处于第一低使用状态且数据并非待删除数据(非删除目标数据)时,在步骤S501中,写入单元121将所述数据项写入到块群组BG2。When the data item is in the first low usage state and the data is not data to be deleted (non-deletion target data), in step S501 , the writing unit 121 writes the data item into the block group BG 2 .
当数据项处于第一高使用状态且并非待删除数据时,在步骤S601中,写入单元131将所述数据项写入到块群组BG3。When the data item is in the first high usage state and is not data to be deleted, in step S601 , the writing unit 131 writes the data item into the block group BG 3 .
当写入到待擦除块的数据的每一项可因数据的每一项被写入到块群组BG2或块群组BG3或是待删除数据而被丢弃时,在步骤S405中,擦除单元115擦除待擦除块。When each item of data written into the block to be erased may be discarded due to each item of data being written into the block group BG2 or block group BG3 or the data to be deleted, in step S405, The erasing unit 115 erases a block to be erased.
在步骤S406中,高速缓存控制单元9确定是否将结束所述过程。In step S406, the cache control unit 9 determines whether the process is to be ended.
当高速缓存控制单元9不结束所述过程时,所述过程返回到步骤S401。When the cache control unit 9 does not end the process, the process returns to step S401.
当高速缓存控制单元9结束所述过程时,所述过程便结束。When the cache control unit 9 ends the process, the process ends.
图5是展示根据本实施例的第二高速缓存控制的实例的流程图。图5示范性地展示其中将数据写入到块群组BG2并擦除块群组BG2中的待擦除块的过程。FIG. 5 is a flowchart showing an example of the second cache control according to the present embodiment. FIG. 5 exemplarily shows a process in which data is written to the block group BG2 and blocks to be erased in the block group BG2 are erased.
当在步骤S404中,写入到块群组BG1的待擦除块的数据被确定为处于第一低使用状态且并非待删除数据时,在步骤S501中,写入单元121将所述数据写入到块群组BG2。When in step S404, the data written to the block to be erased in block group BG 1 is determined to be in the first low usage state and not to be deleted, in step S501, the writing unit 121 writes the data Write to block group BG 2 .
在步骤S502中,确定单元122确定块群组BG2是否满足擦除条件。In step S502, the determination unit 122 determines whether the block group BG2 satisfies the erasure condition.
当块群组BG2不满足擦除条件时,所述过程继续进行到步骤S506。When the block group BG 2 does not satisfy the erasure condition, the process proceeds to step S506.
当块群组BG2满足擦除条件时,在步骤S503中,选择单元123从块群组BG2选择待擦除块。When the block group BG 2 satisfies the erasing condition, in step S503 , the selection unit 123 selects a block to be erased from the block group BG 2 .
在步骤S504中,确定单元124基于管理信息62而确定写入到待擦除块的每一数据项是处于第三高使用状态还是第三低使用状态及所述数据的每一项是否为待删除数据。In step S504, the determination unit 124 determines based on the management information 62 whether each data item written to the block to be erased is in the third high usage state or the third low usage state and whether each item of the data is a pending block. delete data.
当数据项处于第三低使用状态或是待删除数据时,所述过程继续进行到步骤S505。When the data item is in the third lowest usage state or is data to be deleted, the process proceeds to step S505.
当数据项处于第三高使用状态且并非待删除数据时,在步骤S601中,写入单元137将所述数据项写入到块群组BG3。When the data item is in the third highest usage state and is not data to be deleted, in step S601 , the writing unit 137 writes the data item into the block group BG 3 .
在步骤S505中,擦除单元125擦除写入到块群组BG2的待擦除块的数据。In step S505, the erasing unit 125 erases the data written to the block to be erased in the block group BG2 .
在步骤S506中,高速缓存控制单元9确定是否将结束所述过程。In step S506, the cache control unit 9 determines whether the process is to be ended.
当高速缓存控制单元9不结束所述过程时,所述过程返回到步骤S501。When the cache control unit 9 does not end the process, the process returns to step S501.
当高速缓存控制单元9结束所述过程时,所述过程便结束。When the cache control unit 9 ends the process, the process ends.
图6是展示根据本实施例的第三高速缓存控制的实例的流程图。图6示范性地展示从将数据写入到块群组BG3到擦除块群组BG3中的数据的过程。FIG. 6 is a flowchart showing an example of the third cache control according to the present embodiment. FIG. 6 exemplarily shows the process from writing data into the block group BG3 to erasing the data in the block group BG3.
当在步骤S404中,写入到块群组BG1的待擦除块的数据被确定为处于第一高使用状态且并非待删除数据时,在步骤S601中,写入单元131将所述数据写入到块群组BG3。当在步骤S304中,写入到块群组BG2的数据被确定为处于第三高使用状态(举例来说,所述数据由处理器2存取)且并非待删除数据时,写入单元137将块群组BG2的数据写入到块群组BG3。When in step S404, the data written to the block to be erased in block group BG 1 is determined to be in the first high usage state and not to be deleted, in step S601, the writing unit 131 writes the data Write to block group BG 3 . When in step S304, the data written into the block group BG2 is determined to be in the third highest usage state (for example, the data is accessed by the processor 2 ) and not to be deleted, the write unit 137 writes the data of the block group BG 2 into the block group BG 3 .
在步骤S602中,确定单元132确定块群组BG3是否满足擦除条件。In step S602, the determination unit 132 determines whether the block group BG3 satisfies the erasure condition.
当块群组BG3不满足擦除条件时,所述过程继续进行到步骤S607。When the block group BG 3 does not satisfy the erasure condition, the process proceeds to step S607.
当块群组BG3满足擦除条件时,在步骤S603中,选择单元133从块群组BG3选择待擦除块。When the block group BG 3 satisfies the erasing condition, in step S603 , the selection unit 133 selects a block to be erased from the block group BG 3 .
在步骤S604中,确定单元134基于管理信息63而确定写入到待擦除块的每一数据项是处于第二高使用状态还是第二低使用状态及所述数据的每一项是否为待删除数据。In step S604, the determining unit 134 determines based on the management information 63 whether each data item written to the block to be erased is in the second high usage state or the second low usage state and whether each item of the data is a pending block. delete data.
当数据项处于第二低使用状态且并非待删除数据时,在步骤S701中,写入单元141将所述数据写入到块群组BG4。When the data item is in the second lowest usage state and is not data to be deleted, in step S701 , the writing unit 141 writes the data into the block group BG 4 .
当数据处于第二高使用状态且并非待删除数据时,在步骤S605中,写入单元135再次将写入到块群组BG3的待擦除块的数据写入到块群组BG3中的另一块。When the data is in the second highest usage state and is not data to be deleted, in step S605, the writing unit 135 writes the data of the block to be erased written into the block group BG 3 into the block group BG 3 again another piece of .
在步骤S606中,当写入到待擦除块的数据的每一项可因每一数据项被写入到块群组BG4、再次写入到块群组BG3或是待删除数据而被丢弃时,擦除单元136擦除待擦除块。In step S606, when each item of data written into the block to be erased can be written into block group BG 4 , rewritten into block group BG 3 or data to be deleted When discarded, the erasing unit 136 erases the block to be erased.
在步骤S607中,高速缓存控制单元9确定是否将结束所述过程。In step S607, the cache control unit 9 determines whether the process is to be ended.
当高速缓存控制单元9不结束所述过程时,所述过程返回到步骤S601。When the cache control unit 9 does not end the process, the process returns to step S601.
当高速缓存控制单元9结束所述过程时,所述过程便结束。When the cache control unit 9 ends the process, the process ends.
图7是展示根据本实施例的第四高速缓存控制的实例的流程图。图7示范性地展示其中将数据写入到块群组BG4并擦除块群组BG4中的数据的过程。FIG. 7 is a flowchart showing an example of fourth cache control according to the present embodiment. FIG. 7 exemplarily shows a process in which data is written to block group BG4 and data in block group BG4 is erased.
当在步骤S604中,写入到块群组BG3的待擦除块的数据被确定为处于第二低状态且并非待删除数据时,在步骤S701中,写入单元141将所述数据写入到块群组BG4。When in step S604, the data written to the block to be erased in block group BG 3 is determined to be in the second low state and not to be deleted, in step S701, the writing unit 141 writes the data to into block group BG 4 .
在步骤S702中,确定单元142确定块群组BG4是否满足擦除条件。In step S702, the determination unit 142 determines whether the block group BG4 satisfies the erasure condition.
当块群组BG4不满足擦除条件时,所述过程继续进行到步骤S705。When the block group BG 4 does not satisfy the erasure condition, the process proceeds to step S705.
当块群组BG4满足擦除条件时,在步骤S703中,选择单元143从块群组BG4选择待擦除块。When the block group BG 4 satisfies the erasing condition, in step S703 , the selection unit 143 selects a block to be erased from the block group BG 4 .
在步骤S704中,擦除单元144擦除写入到块群组BG4中的待擦除块的数据。In step S704, the erasing unit 144 erases the data written in the block to be erased in the block group BG4 .
在步骤S705中,高速缓存控制单元9确定是否将结束所述过程。In step S705, the cache control unit 9 determines whether the process is to be ended.
当高速缓存控制单元9不结束所述过程时,所述过程返回到步骤S701。When the cache control unit 9 does not end the process, the process returns to step S701.
当高速缓存控制单元9结束所述过程时,所述过程便结束。When the cache control unit 9 ends the process, the process ends.
在本实施例的块群组BG1中,举例来说,数据是首先写入到块B1,1、接下来循序写入到块B1,2,且随后类似地写入到块B1,3到B1,K。当块群组BG1中所包含的块B1,1到B1,K的数据量超过预定数据量时,其中依据FIFO而擦除写入首先完成的块B1,1,且再次将数据循序写入到经擦除块B1,1。在完成向块B1,1的写入之后,依据FIFO而擦除块B1,2。随后,再次将数据循序写入到经擦除块B1,2。重复相同控制。In the block group BG 1 of the present embodiment, for example, data is first written to block B 1,1 , next sequentially written to block B 1,2 , and then similarly written to block B 1 ,3 to B 1,K . When the data volume of the blocks B 1,1 to B 1,K contained in the block group BG 1 exceeds the predetermined data volume, among them, the block B 1,1 which is completed first is erased and written according to the FIFO, and the data is written again Sequential writes to erased block B 1,1 . After writing to block B 1,1 is complete, block B 1,2 is erased according to the FIFO. Subsequently, data is sequentially written to erased block B 1,2 again. Repeat the same control.
在块群组BG1中,基于管理信息61而确定写入到块群组BG1中的待擦除块的数据是否(例如)被存取达少于第一次数或以小于第一频率被存取。当写入到块群组BG1中的待擦除块的数据被存取达少于第一次数或以小于第一频率被存取时,选择块群组BG2作为数据的写入目的地。 In the block group BG1, it is determined based on the management information 61 whether the data of the block to be erased written in the block group BG1 is, for example, accessed less than the first number or at a rate less than the first frequency is accessed. When the data written into the block to be erased in the block group BG 1 is accessed for less than the first number of times or is accessed less than the first frequency, select the block group BG 2 as the writing destination of the data land.
相比之下,当写入到块群组BG1中的待擦除块的数据被存取达第一次数或更多或以第一频率或更大被存取时,选择块群组BG3作为数据的写入目的地。In contrast, when the data of the block to be erased written in the block group BG 1 is accessed for the first number of times or more or is accessed at the first frequency or more, the block group is selected BG 3 serves as the write destination of data.
当写入到块群组BG1中的待擦除块的数据是待删除数据时,丢弃所述数据。When the data written in the block to be erased in the block group BG1 is data to be deleted, the data is discarded.
在本实施例的块群组BG2中,来自块群组BG1的处于第一低使用状态的数据被首先循序写入到块B2,1、接下来循序写入到块B2,2,且随后类似地写入到块B2,3到B2,L。当块群组BG2中所包含的块B2,1到B2,L的数据量超过预定数据量时,依据FIFO而擦除其中写入首先完成的块B2,1且再次将数据循序写入到经擦除块B2,1。在完成向块B2,1的写入之后,依据FIFO而擦除块B2,2。随后,将数据循序写入到经擦除块B2,2。重复相同控制。In block group BG 2 of this embodiment, data from block group BG 1 in the first low usage state is first sequentially written to block B 2,1 , followed by sequential writing to block B 2,2 , and then similarly write to blocks B 2,3 to B 2,L . When the data volume of the blocks B 2,1 to B 2,L included in the block group BG 2 exceeds a predetermined data volume, the block B 2,1 in which writing is completed first is erased according to the FIFO and the data is sequentially again Write to erased block B 2,1 . After writing to block B 2,1 is complete, block B 2,2 is erased according to the FIFO. Subsequently, data is sequentially written to erased block B 2,2 . Repeat the same control.
在块群组BG2中,基于管理信息62而确定写入到块群组BG2中的待擦除块的数据是否(例如)被存取达少于第三次数或以小于第三频率被存取。当写入到块群组BG2中的待擦除块的数据被存取达少于第三次数或以小于第三频率被存取时,擦除所述数据。In the block group BG2, it is determined based on the management information 62 whether the data written to the block to be erased in the block group BG2 is, for example, accessed less than the third number of times or less than the third frequency. access. When the data written in the block to be erased in the block group BG2 is accessed less than a third number of times or accessed less than a third frequency, the data is erased.
相比之下,当写入到块群组BG2中的待擦除块的数据被存取达第三次数或更多或以第三频率或更大被存取时,选择块群组BG3作为数据的写入目的地。In contrast, when the data of the block to be erased written in the block group BG 2 is accessed a third number of times or more or is accessed at a third frequency or more, the block group BG is selected 3 as the write destination of the data.
当写入到块群组BG2中的待擦除块的数据是待删除数据时,丢弃所述数据。When the data written in the block to be erased in the block group BG2 is data to be deleted, the data is discarded.
在本实施例的块群组BG3中,来自块群组BG1的处于第一高使用状态的数据、来自块群组BG2的处于第三高使用状态的数据或来自块群组BG3的重新写入数据被首先循序写入到块B3,1、接下来循序写入到块B3,2,且随后类似地写入到块B3,3到B3,M。当块群组BG3中所包含的块B3,1到B3,M的数据量超过预定数据量时,依据FIFO而擦除其中写入首先完成的块B3,1且再次将数据循序写入到经擦除块B3,1。在完成向块B3,1的写入之后,依据FIFO而擦除块B3,2。随后,再次将数据循序写入到经擦除块B3,2。重复相同控制。In the block group BG 3 of this embodiment, the data in the first high usage state from the block group BG 1 , the data in the third high usage state from the block group BG 2 or the data in the third high usage state from the block group BG 3 The rewritten data of is first sequentially written to block B 3,1 , next sequentially written to block B 3,2 , and then similarly written to blocks B 3,3 to B 3,M . When the data volume of the blocks B 3,1 to B 3,M contained in the block group BG 3 exceeds a predetermined data volume, the block B 3,1 in which writing is completed first is erased according to the FIFO and the data is sequentially again Write to erased block B 3,1 . After writing to block B 3,1 is complete, block B 3,2 is erased according to the FIFO. Subsequently, data is sequentially written to erased block B 3,2 again. Repeat the same control.
在块群组BG3中,基于管理信息63而确定写入到块群组BG3中的待擦除块的数据是否(例如)被存取达少于第二次数或以小于第二频率被存取。当写入到块群组BG3中的待擦除块的数据被存取达少于第二次数或以小于第二频率被存取时,选择块群组BG4作为数据的写入目的地。 In the block group BG3, it is determined based on the management information 63 whether the data written to the block to be erased in the block group BG3 is, for example, accessed less than the second number of times or less than the second frequency. access. When the data written into the block to be erased in the block group BG3 is accessed less than the second number of times or is accessed less than the second frequency, the block group BG4 is selected as the write destination of the data .
相比之下,当写入到块群组BG3中的待擦除块的数据被存取达第二次数或更多或以第二频率或更大被存取时,再次将数据写入到块群组BG3。In contrast, when the data written to the block to be erased in the block group BG 3 is accessed the second number of times or more or is accessed at the second frequency or more, the data is written again to block group BG 3 .
当写入到块群组BG3中的待擦除块的数据是待删除数据时,丢弃所述数据。When the data written in the block to be erased in the block group BG3 is data to be deleted, the data is discarded.
在本实施例的块群组BG4中,来自块群组BG3的处于第二低使用状态的数据被首先循序写入到块B4,1、接下来循序写入到块B4,2,且随后类似地写入到块B4,3到B4,N。当块群组BG4中所包含的块B4,1到B4,N的数据量超过预定数据量时,依据FIFO而擦除其中写入首先完成的块B4,1且再次将数据循序写入到经擦除块B4,1。在完成向块B4,1的写入之后,依据FIFO而擦除块B4,2。随后,将数据循序写入到经擦除块B4,2。重复相同控制。In block group BG 4 of the present embodiment, data from block group BG 3 in the second lowest usage state is first sequentially written to block B 4,1 , followed by sequential writing to block B 4,2 , and then similarly write to blocks B 4,3 to B 4,N . When the data volume of the blocks B 4,1 to B 4,N contained in the block group BG 4 exceeds a predetermined data volume, the block B 4,1 in which writing is completed first is erased according to the FIFO and the data is sequentially again Write to erased block B 4,1 . After writing to block B 4,1 is complete, block B 4,2 is erased according to the FIFO. Subsequently, data is sequentially written to erased block B 4,2 . Repeat the same control.
在本实施例中,控制单元14可确定写入到块群组BG4的待擦除块的数据是否处于第五高使用状态。当写入到块群组BG4的待擦除块的数据被确定为处于第五高使用状态时,就将所述数据维持于非易失性高速缓冲存储器4中来说,控制单元13可将所述数据写入到块群组BG3的可写入目的地块。在此情况中,处理器2可减小块群组BG1的大小。In this embodiment, the control unit 14 can determine whether the data written to the block to be erased in the block group BG 4 is in the fifth highest usage state. When the data written to the block to be erased of the block group BG 4 is determined to be in the fifth most used state, in terms of maintaining the data in the nonvolatile cache memory 4, the control unit 13 may The data is written to a writable destination block of the block group BG3. In this case, processor 2 may reduce the size of block group BG1.
在本实施例中,基于四个块群组BG1到BG4而管理数据。In the present embodiment, data is managed based on four block groups BG 1 to BG 4 .
举例来说,在块群组BG1中管理由处理器2存取一次的第一数据(经一次存取数据)。For example, first data accessed once by the processor 2 (data accessed once) is managed in the block group BG1.
举例来说,如果块群组BG1中的第二数据由处理器2存取两次或更多次且基于FIFO而被从块群组BG1推出,那么将第二数据从块群组BG1移动到块群组BG3。For example, if the second data in block group BG 1 is accessed by processor 2 two or more times and pushed out from block group BG 1 based on FIFO, then the second data in block group BG 1Move to block group BG 3 .
应注意,在本实施例中,块群组BG1的大小大于块群组BG3的大小。It should be noted that in this embodiment, the size of the block group BG 1 is larger than the size of the block group BG 3 .
举例来说,当块群组BG1中的第三数据在未由处理器2存取的情况下基于FIFO而被从块群组BG1推出时,将第三数据从块群组BG1移动到块群组BG2。For example, when the third data in the block group BG 1 is pushed out from the block group BG 1 based on the FIFO without being accessed by the processor 2, the third data is moved from the block group BG 1 to block group BG 2 .
举例来说,如果块群组BG3中的第四数据在未由处理器2存取的情况下基于FIFO而被从块群组BG3清除,那么将第四数据从块群组BG3移动到块群组BG4。For example, if the fourth data in block group BG 3 is cleared from block group BG 3 based on FIFO without being accessed by processor 2, then the fourth data is moved from block group BG 3 to block group BG 4 .
举例来说,在块群组BG2及BG4中,可高速缓存元数据而非高速缓存数据。元数据包含与数据相关的信息。换句话说,元数据是关于数据的高度抽象且额外的数据且被附加到所述数据。For example, in block groups BG 2 and BG 4 , metadata may be cached rather than data. Metadata contains information related to data. In other words, metadata is highly abstract and additional data about data and is attached to the data.
在本实施例中,举例来说,当第五数据存储于块群组BG1中时,可基于FIFO而推出块群组BG2中的第六数据。In this embodiment, for example, when the fifth data is stored in the block group BG1 , the sixth data in the block group BG2 can be deduced based on FIFO.
举例来说,当块群组BG1中的第七数据被存取且基于FIFO而被从块群组BG1推出时,可将第七数据从块群组BG1移动到块群组BG3,可基于FIFO而将块群组BG3中的第八数据从块群组BG3移动到块群组BG4,且可基于FIFO而从块群组BG4推出块群组BG4中的第九数据。For example, when the seventh data in block group BG 1 is accessed and pushed out from block group BG 1 based on FIFO, the seventh data can be moved from block group BG 1 to block group BG 3 , the eighth data in block group BG 3 can be moved from block group BG 3 to block group BG 4 based on FIFO, and the eighth data in block group BG 4 can be deduced from block group BG 4 based on FIFO Nine data.
举例来说,当存取块群组BG2中的第十数据时,会增加块群组BG1的大小。如果块群组BG1的大小增加,那么基于FIFO而将块群组BG3中的第十一数据移动到块群组BG4。For example, when accessing the tenth data in the block group BG2 , the size of the block group BG1 will be increased. If the size of the block group BG1 increases, the eleventh data in the block group BG3 is moved to the block group BG4 based on FIFO.
举例来说,当块群组BG4中的第十二数据被存取且基于FIFO而被从块群组BG4推出时,将第十二数据移动到块群组BG3,且会减小块群组BG1的大小。For example, when the twelfth data in block group BG 4 is accessed and pushed out from block group BG 4 based on FIFO, the twelfth data is moved to block group BG 3 and will decrease Size of block group BG1.
在上文所述的本实施例中,维持确定对是否将维持块单位的数据进行确定,传送写入将待维持的块数据写入到目的地块,且写入到非易失性高速缓冲存储器4的数据是每块地予以擦除。In the present embodiment described above, the maintenance determination is performed to determine whether to maintain data in block units, the transfer write writes the block data to be maintained to the destination block, and writes to the nonvolatile cache Data in the memory 4 is erased block by block.
在本实施例中,可增加有效高速缓存容量,可提升非易失性高速缓冲存储器4的位速率,且可增加信息处理装置17的速度。In this embodiment, the effective cache capacity can be increased, the bit rate of the nonvolatile cache memory 4 can be increased, and the speed of the information processing device 17 can be increased.
在本实施例中,在不为非易失性高速缓冲存储器4执行无用单元收集的情况下,可避免性能的降低。由于无用单元收集并非是必需的,因此可减少向非易失性高速缓冲存储器4的写入次数且可增加非易失性高速缓冲存储器4的寿命。此外,由于无用单元收集并非是必需的,因此不需要保证有设置区域(provisioning area)。因此,可增加可用作高速缓冲存储器的数据容量,且可提高使用效率。In this embodiment, without performing garbage collection for the nonvolatile cache memory 4, performance degradation can be avoided. Since garbage collection is not necessary, the number of writes to the non-volatile cache memory 4 can be reduced and the lifetime of the non-volatile cache memory 4 can be increased. Also, since garbage collection is not required, there is no need to guarantee a provisioning area. Therefore, the data capacity usable as a cache memory can be increased, and use efficiency can be improved.
举例来说,当使用非易失性存储器作为高速缓冲存储器且无论块的边界如何都丢弃数据时,可频繁地执行无用单元收集以将非易失性存储器的块中的有效数据移动到另一块。在本实施例中,不需要在非易失性高速缓冲存储器4中执行无用单元收集。因此,如上文所描述,在本实施例中,可增加非易失性高速缓冲存储器4的寿命。For example, when using nonvolatile memory as a cache memory and discarding data regardless of block boundaries, garbage collection may be frequently performed to move valid data in a block of nonvolatile memory to another block . In this embodiment, there is no need to perform garbage collection in the nonvolatile cache memory 4 . Therefore, as described above, in the present embodiment, the lifetime of the nonvolatile cache memory 4 can be increased.
[第三实施例][Third embodiment]
在本实施例中,进一步详细地解释包含第一实施例及第二实施例中所解释的信息处理系统17及SSD 5的信息处理系统35。In this embodiment, the information processing system 35 including the information processing system 17 and the SSD 5 explained in the first and second embodiments is explained in further detail.
图8是展示根据本实施例的信息处理系统35的详细结构的实例的框图。FIG. 8 is a block diagram showing an example of the detailed structure of the information processing system 35 according to the present embodiment.
信息处理系统35包含信息处理装置17及存储器系统37。The information processing system 35 includes an information processing device 17 and a memory system 37 .
根据第一实施例及第二实施例的SSD 5对应于存储器系统37。The SSD 5 according to the first and second embodiments corresponds to the memory system 37 .
SSD 5的处理器22对应于CPU 43B。The processor 22 of the SSD 5 corresponds to the CPU 43B.
地址转换信息32对应于LUT(查找表)45。The address translation information 32 corresponds to a LUT (Look Up Table) 45 .
存储器23对应于DRAM 47。The memory 23 corresponds to the DRAM 47 .
信息处理装置17充当主机装置。The information processing device 17 functions as a host device.
存储器系统37的控制器36包含前端4F及后端4B。The controller 36 of the memory system 37 includes a front end 4F and a back end 4B.
前端(主机通信单元)4F包含主机接口41、主机接口控制器42、编码/解码单元(高级加密标准(AES))44及CPU 43F。The front end (host communication unit) 4F includes a host interface 41, a host interface controller 42, an encoding/decoding unit (Advanced Encryption Standard (AES)) 44, and a CPU 43F.
主机接口41与信息处理装置17通信以交换请求(写入命令、读取命令、擦除命令)、LBA及数据。The host interface 41 communicates with the information processing device 17 to exchange requests (write command, read command, erase command), LBA, and data.
主机接口控制器(控制单元)42基于CPU 43F的控制而控制主机接口41的通信。A host interface controller (control unit) 42 controls communication of the host interface 41 based on the control of the CPU 43F.
编码/解码单元44对在数据写入操作中从主机接口控制器42发射的写入数据(明文)进行编码。编码/解码单元44对在数据读取操作中从后端4B的读取缓冲器RB发射的经编码读取数据进行解码。应注意,可按照临时命令而在不使用编码/解码单元44的情况下执行写入数据及读取数据的发射。The encoding/decoding unit 44 encodes write data (plaintext) transmitted from the host interface controller 42 in a data writing operation. The encoding/decoding unit 44 decodes the encoded read data transmitted from the read buffer RB of the back end 4B in a data read operation. It should be noted that the transmission of write data and read data may be performed without using the encoding/decoding unit 44 in accordance with temporary commands.
CPU 43F控制前端4F的以上组件41、42及44,以控制前端4F的整个功能。The CPU 43F controls the above components 41, 42, and 44 of the front end 4F to control the entire functions of the front end 4F.
后端(存储器通信单元)4B包含写入缓冲器WB、读取缓冲器RB、LUT 45、DDRC 46、DRAM 47、DMAC 48、ECC 49、随机函数发生器RZ、NANDC 50及CPU 43B。The backend (memory communication unit) 4B includes a write buffer WB, read buffer RB, LUT 45, DDRC 46, DRAM 47, DMAC 48, ECC 49, random function generator RZ, NANDC 50, and CPU 43B.
写入缓冲器(写入数据传送单元)WB暂时地存储从信息处理装置17发射的写入数据。具体来说,写入缓冲器WB暂时地存储所述数据直到其达到适合于非易失性存储器24的预定数据大小为止。The write buffer (write data transfer unit) WB temporarily stores write data transmitted from the information processing device 17 . Specifically, the write buffer WB temporarily stores the data until it reaches a predetermined data size suitable for the nonvolatile memory 24 .
读取缓冲器(读取数据传送单元)RB暂时地存储从非易失性存储器24读取的读取数据。具体来说,读取缓冲器RB将读取数据重新布置为适合于信息处理装置17的次序(由信息处理装置17指定的逻辑地址LBA的次序)。The read buffer (read data transfer unit) RB temporarily stores read data read from the nonvolatile memory 24 . Specifically, the read buffer RB rearranges read data into an order suitable for the information processing device 17 (order of logical addresses LBA specified by the information processing device 17 ).
LUT 45是用以将逻辑地址LBA转换成物理地址PBA(物理块寻址)的数据。The LUT 45 is data to convert a logical address LBA into a physical address PBA (Physical Block Addressing).
DDRC 46控制DRAM 47中的双倍数据速率(DDR)。DDRC 46 controls double data rate (DDR) in DRAM 47 .
DRAM 47是存储例如LUT 45的非易失性存储器。The DRAM 47 is a nonvolatile memory that stores, for example, the LUT 45 .
直接存储器存取控制器(DMAC)48经由内部总线IB传送写入数据及读取数据。在图8中,展示了仅单个DMAC 48;然而,控制器36可包含两个或两个以上DMAC 48。DMAC 48可设定于控制器36内部的各种位置中。A direct memory access controller (DMAC) 48 transfers write data and read data via an internal bus IB. In FIG. 8 , only a single DMAC 48 is shown; however, the controller 36 may include two or more DMACs 48 . DMAC 48 may be located in various locations within controller 36 .
ECC(错误校正单元)49给从写入缓冲器WB发射的写入数据添加错误校正码(ECC)。当将读取数据发射到读取缓冲器RB时,如必要,则ECC 49使用所添加ECC来校正从非易失性存储器24读取的读取数据。An ECC (Error Correction Unit) 49 adds an error correction code (ECC) to the write data transmitted from the write buffer WB. When the read data is transmitted to the read buffer RB, the ECC 49 corrects the read data read from the nonvolatile memory 24 using the added ECC, if necessary.
在数据写入操作中,随机函数发生器RZ(或置乱器)以一方式散布写入数据,使得所述写入数据不被偏置于某一页中或不被偏置于非易失性存储器24的字线方向上。通过以此方式散布写入数据,可使写入次数标准化且可延长非易失性存储器24的存储器单元MC的单元寿命。因此,可提高非易失性存储器24的可靠性。此外,在数据读取操作中,从非易失性存储器24读取的读取数据会通过随机函数发生器RZ。In a data write operation, the randomizer RZ (or scrambler) spreads the write data in such a way that the write data is not biased into a certain page or is not biased into a non-volatile In the word line direction of the non-volatile memory 24. By spreading the write data in this way, the number of times of writing can be normalized and the cell life of the memory cells MC of the nonvolatile memory 24 can be extended. Therefore, the reliability of the nonvolatile memory 24 can be improved. In addition, in the data read operation, the read data read from the non-volatile memory 24 passes through the random function generator RZ.
NAND控制器(NANDC)50使用多个通道(图中展示了四个通道CH0到CH3)来并行地存取非易失性存储器24以满足对某一速度的需求。A NAND controller (NANDC) 50 uses multiple channels (four channels CH0 to CH3 are shown in the figure) to access the non-volatile memory 24 in parallel to meet the demand for a certain speed.
CPU 43B控制后端4B的以上每一组件(45到50及RZ),以控制后端4B的整个功能。The CPU 43B controls each of the above components (45 to 50 and RZ) of the backend 4B to control the entire function of the backend 4B.
应注意,控制器36的结构仅为实例且并不打算由其进行限制。It should be noted that the configuration of controller 36 is merely an example and is not intended to be limiting thereby.
图9是展示根据本实施例的存储系统的实例的透视图。FIG. 9 is a perspective view showing an example of a storage system according to the present embodiment.
存储系统100包含存储器系统37来作为SSD。Storage system 100 includes memory system 37 as an SSD.
举例来说,存储器系统37是外部大小将为大约20mm×30mm的相对小的模块。应注意,存储器系统37的大小及尺度并不限于此且可任意地改变成各种大小。For example, memory system 37 is a relatively small module whose external dimensions will be approximately 20mm x 30mm. It should be noted that the size and dimensions of the memory system 37 are not limited thereto and can be arbitrarily changed into various sizes.
此外,存储器系统37可适用于信息处理装置17,以作为用于在公司(企业)等中所采用的数据中心或云计算系统中的服务器。因此,存储器系统37可为企业SSD(eSSD)。Furthermore, the memory system 37 is applicable to the information processing device 17 as a server used in a data center or cloud computing system employed in a company (enterprise) or the like. Thus, memory system 37 may be an enterprise SSD (eSSD).
举例来说,存储器系统37包含向上开口的多个连接器(举例来说,插槽)38。每一连接器38均为串行附接SCSI(SAS)连接器等。借助SAS连接器,可经由6Gbps的双端口在信息处理装置17与每一存储器系统37之间建立高速相互通信。应注意,连接器38可为快速PCI(PCIe)或快速NVM(NVMe)。For example, memory system 37 includes a plurality of connectors (eg, sockets) 38 that open upwardly. Each connector 38 is a Serial Attached SCSI (SAS) connector or the like. By means of the SAS connector, high-speed mutual communication can be established between the information processing device 17 and each memory system 37 via a dual port of 6Gbps. It should be noted that connector 38 may be PCI Express (PCIe) or NVM Express (NVMe).
多个存储器系统37个别地附接到信息处理装置17的连接器38且被以一种布置形式支撑使得其沿大致垂直方向站立。使用此结构,多个存储器系统37可被共同地安装成紧凑大小,且可使存储器系统37小型化。此外,本实施例的每一存储器系统37的形状为2.5英寸的小形状因子(SFF)。由于此形状,存储器系统37可与企业HDD(eHDD)兼容且可实现与eHDD的简单系统兼容性。A plurality of memory systems 37 are individually attached to connectors 38 of the information processing device 17 and are supported in an arrangement such that they stand in a substantially vertical direction. With this structure, a plurality of memory systems 37 can be commonly mounted in a compact size, and the memory system 37 can be miniaturized. Furthermore, each memory system 37 of the present embodiment is shaped as a 2.5-inch small form factor (SFF). Because of this shape, memory system 37 is compatible with enterprise HDDs (eHDDs) and simple system compatibility with eHDDs can be achieved.
应注意,存储器系统37并不限于在企业HDD中使用。举例来说,存储器系统37可用作消费型电子装置(例如笔记型便携式计算机或平板计算机终端)的存储器媒体。It should be noted that memory system 37 is not limited to use in enterprise HDDs. For example, the memory system 37 can be used as a memory medium for consumer electronic devices such as notebook or tablet terminals.
如从上文可理解,具有本实施例的结构的信息处理系统35及存储系统100可在具有第二实施例的相同优点的情况下实现大容量存储优点。As can be understood from the above, the information processing system 35 and the storage system 100 having the structure of the present embodiment can realize the advantages of large-capacity storage with the same advantages of the second embodiment.
根据本实施例的存储器系统37的结构可应用于根据第一实施例的信息处理装置17。举例来说,根据第一实施例的处理器2可对应于CPU 43B。地址转换信息7可对应于LUT 45。存储器3对应于DRAM 47。非易失性高速缓冲存储器4可对应于非易失性存储器24。The structure of the memory system 37 according to the present embodiment is applicable to the information processing device 17 according to the first embodiment. For example, the processor 2 according to the first embodiment may correspond to the CPU 43B. The address conversion information 7 may correspond to the LUT 45 . The memory 3 corresponds to the DRAM 47 . The nonvolatile cache memory 4 may correspond to the nonvolatile memory 24 .
尽管已描述了某些实施例,但这些实施例是仅以实例方式呈现的且并不打算限制本发明的范围。实际上,本文中所描述的新颖实施例可以多种其它形式来体现;此外,可在不背离本发明的精神的情况下对本文中所描述的实施例的形式做出各种省略、替代及改变。打算使所附权利要求书及其等效内容涵盖此类将归属于本发明范围及精神内的形式或修改。While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in many other forms; furthermore, various omissions, substitutions and substitutions in the form of the embodiments described herein may be made without departing from the spirit of the invention. Change. It is intended that the appended claims and their equivalents cover such forms or modifications as would fall within the scope and spirit of the invention.
Claims (9)
Applications Claiming Priority (6)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US201462097538P | 2014-12-29 | 2014-12-29 | |
| US62/097,538 | 2014-12-29 | ||
| JP2015038999A JP6378111B2 (en) | 2014-12-29 | 2015-02-27 | Information processing apparatus and program |
| JP2015-038999 | 2015-02-27 | ||
| US14/656,524 US10331551B2 (en) | 2014-12-29 | 2015-03-12 | Information processing device and non-transitory computer readable recording medium for excluding data from garbage collection |
| US14/656,524 | 2015-03-12 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106201326A true CN106201326A (en) | 2016-12-07 |
| CN106201326B CN106201326B (en) | 2019-12-10 |
Family
ID=56359601
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510239405.5A Active CN106201326B (en) | 2014-12-29 | 2015-05-12 | Information processing apparatus |
Country Status (3)
| Country | Link |
|---|---|
| JP (2) | JP6378111B2 (en) |
| CN (1) | CN106201326B (en) |
| TW (1) | TW201624491A (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI639918B (en) | 2017-05-11 | 2018-11-01 | 慧榮科技股份有限公司 | Data storage device and operating method therefor |
| TWI649652B (en) * | 2017-12-29 | 2019-02-01 | 國科美國研究實驗室 | Fast and safe data storage device and method |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102163458A (en) * | 2010-02-12 | 2011-08-24 | 株式会社东芝 | Semiconductor memory device |
| US20120144097A1 (en) * | 2010-12-07 | 2012-06-07 | Kabushiki Kaisha Toshiba | Memory system and data deleting method |
| US20130007352A1 (en) * | 2009-03-25 | 2013-01-03 | Ariel Maislos | Host-assisted compaction of memory blocks |
| US20130246688A1 (en) * | 2012-03-15 | 2013-09-19 | Kabushiki Kaisha Toshiba | Semiconductor memory device and computer program product |
| CN103744615A (en) * | 2013-12-17 | 2014-04-23 | 记忆科技(深圳)有限公司 | Dynamic compensation receiver and dynamic compensation receiving method |
| US20140215129A1 (en) * | 2013-01-28 | 2014-07-31 | Radian Memory Systems, LLC | Cooperative flash memory control |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100823171B1 (en) * | 2007-02-01 | 2008-04-18 | 삼성전자주식회사 | Computer system with partitioned flash translation layer and partitioning method of flash translation layer |
| JP5976939B2 (en) * | 2012-08-23 | 2016-08-24 | アップル インコーポレイテッド | Host assisted memory block compaction |
| KR20140128824A (en) * | 2013-04-29 | 2014-11-06 | 삼성전자주식회사 | Method for managing data using attribute data |
-
2015
- 2015-02-27 JP JP2015038999A patent/JP6378111B2/en active Active
- 2015-05-11 TW TW104114945A patent/TW201624491A/en unknown
- 2015-05-12 CN CN201510239405.5A patent/CN106201326B/en active Active
-
2018
- 2018-07-24 JP JP2018138737A patent/JP6689325B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130007352A1 (en) * | 2009-03-25 | 2013-01-03 | Ariel Maislos | Host-assisted compaction of memory blocks |
| CN102163458A (en) * | 2010-02-12 | 2011-08-24 | 株式会社东芝 | Semiconductor memory device |
| US20120144097A1 (en) * | 2010-12-07 | 2012-06-07 | Kabushiki Kaisha Toshiba | Memory system and data deleting method |
| US20130246688A1 (en) * | 2012-03-15 | 2013-09-19 | Kabushiki Kaisha Toshiba | Semiconductor memory device and computer program product |
| US20140215129A1 (en) * | 2013-01-28 | 2014-07-31 | Radian Memory Systems, LLC | Cooperative flash memory control |
| CN103744615A (en) * | 2013-12-17 | 2014-04-23 | 记忆科技(深圳)有限公司 | Dynamic compensation receiver and dynamic compensation receiving method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP6689325B2 (en) | 2020-04-28 |
| JP6378111B2 (en) | 2018-08-22 |
| CN106201326B (en) | 2019-12-10 |
| TW201624491A (en) | 2016-07-01 |
| JP2016126739A (en) | 2016-07-11 |
| JP2018195333A (en) | 2018-12-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11726906B2 (en) | Memory device and non-transitory computer readable recording medium | |
| US10761977B2 (en) | Memory system and non-transitory computer readable recording medium | |
| US12111760B2 (en) | Memory device and non-transitory computer readable recording medium | |
| US11422930B2 (en) | Controller, memory system and data processing system | |
| US12072797B2 (en) | Memory system and non-transitory computer readable recording medium | |
| CN106205708B (en) | Cache memory device | |
| US11941246B2 (en) | Memory system, data processing system including the same, and operating method thereof | |
| CN106201326B (en) | Information processing apparatus | |
| US11657000B2 (en) | Controller and memory system including the same | |
| US10331551B2 (en) | Information processing device and non-transitory computer readable recording medium for excluding data from garbage collection | |
| US10474569B2 (en) | Information processing device including nonvolatile cache memory and processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| TA01 | Transfer of patent application right | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20170807 Address after: Tokyo, Japan Applicant after: TOSHIBA MEMORY Corp. Address before: Tokyo, Japan Applicant before: Toshiba Corp. |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP01 | Change in the name or title of a patent holder | ||
| CP01 | Change in the name or title of a patent holder |
Address after: Tokyo Patentee after: Kaixia Co.,Ltd. Address before: Tokyo Patentee before: TOSHIBA MEMORY Corp. Address after: Tokyo Patentee after: TOSHIBA MEMORY Corp. Address before: Tokyo Patentee before: Pangea Co.,Ltd. |
|
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20220303 Address after: Tokyo Patentee after: Pangea Co.,Ltd. Address before: Tokyo Patentee before: TOSHIBA MEMORY Corp. |