WO2011010348A1 - フラッシュメモリ装置 - Google Patents

フラッシュメモリ装置 Download PDF

Info

Publication number
WO2011010348A1
WO2011010348A1 PCT/JP2009/003470 JP2009003470W WO2011010348A1 WO 2011010348 A1 WO2011010348 A1 WO 2011010348A1 JP 2009003470 W JP2009003470 W JP 2009003470W WO 2011010348 A1 WO2011010348 A1 WO 2011010348A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
physical
erase
logical
flash memory
Prior art date
Application number
PCT/JP2009/003470
Other languages
English (en)
French (fr)
Inventor
亮彦 荒木
定広 杉本
政行 山本
彰 山本
Original Assignee
株式会社日立製作所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2009/003470 priority Critical patent/WO2011010348A1/ja
Priority to US12/668,755 priority patent/US8447915B2/en
Publication of WO2011010348A1 publication Critical patent/WO2011010348A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7211Wear leveling

Definitions

  • the present invention relates to a storage device having a plurality of flash memory chips.
  • flash memory Due to the characteristics of flash memory, when data is to be rewritten, it is impossible to directly overwrite the data on the physical area where the data was originally stored. When rewriting data, it is necessary to rewrite the data after executing the data erasing process in a unit called “block” which is an erasing unit of the flash memory. There is an upper limit to the number of times the erase process is executed for this block due to physical restrictions. A flash memory block has the property that if the number of erases exceeds this upper limit, data cannot be stored in that block.
  • wear leveling As a technique for avoiding such a phenomenon, a technique called wear leveling as disclosed in Patent Document 1 is disclosed. According to the basic concept of wear leveling, in addition to the physical address indicating the address of the physical block (physical block), a logical address indicating the address of the logical block (logical block) is prepared. The associated logical address is changed as appropriate.
  • Patent Document 2 a technique is known in which one physical block area is divided into two, and one of the divided areas is used as an area for storing update data.
  • the data to be overwritten (Update data) is added to the second area.
  • the second area is full and additional writing is not possible, the physical block is erased. Therefore, the physical block is not necessarily erased because the physical block is overwritten (updated write). Is not necessary. Therefore, it is possible to suppress the number of erasing processes (physical block erasing times) for the physical block.
  • Patent Document 1 uses the number of physical block erasures and the logical block write frequency as information for determining the correspondence between physical blocks and logical blocks. According to Patent Document 1, a logical block with a high write frequency is assigned to a physical block with a low number of erases, and a logical block with a low write frequency is assigned to a physical block with a high number of erases.
  • flash memory in which data can be written a plurality of times in one or more physical blocks without erasing the one or more physical blocks assigned to the logical block.
  • this type of flash memory for example, there is a flash memory in which a data read / write unit is smaller than an erase unit, specifically, for example, a NAND flash memory.
  • a flash memory in which a technique as shown in Patent Document 2 is adopted.
  • This type of flash memory has a bias in the write frequency until block erase is performed.
  • a single block erase may be performed by a plurality of writes, or a single block erase may be performed by a single write.
  • Patent Document 1 Even if the technique of Patent Document 1 is simply applied to this type of flash memory, it is difficult to eliminate the unevenness of the number of block erases.
  • an object of the present invention is to provide a block in a flash memory device that can write data to one or more physical blocks a plurality of times without performing erasure processing on one or more physical blocks assigned to a logical block.
  • the purpose is to eliminate the uneven number of erasures.
  • the controller of the flash memory device manages the number of erases for each physical block and manages the erase frequency for each logical block.
  • the controller assigns a logical block with a high erase frequency to one or more physical blocks with a small number of erases (a logical block with a low erase frequency can also be assigned to one or more physical blocks with a high number of erases).
  • the controller classifies physical blocks according to whether the number of times of erasing is large or small, and classifies logical blocks according to whether the erasing frequency is high or low.
  • the controller assigns a first logical block with a high erase frequency to the first physical block with a high erase frequency, and a second logical block with a low erase frequency in the second physical block with a low erase frequency.
  • swap the assignment destinations of the first and second logical blocks That is, the controller assigns the second logical block to the first physical block and assigns the first logical block to the second physical block.
  • the flash memory device may be a flash memory drive (for example, USB (Universal Serial Bus) flash memory), a storage system having a plurality of flash memory drives, or a computer.
  • the controller of the flash memory device may be a controller in the flash memory drive or a storage controller in the storage system that accesses the flash memory drive in response to an access request from the host.
  • it may be a processor in a computer.
  • the number of block erases in a flash memory device that can write data to one or more physical blocks multiple times without performing erase processing on one or more physical blocks assigned to the logical block Can be eliminated.
  • FIG. 1 is a block diagram showing an example of a flash memory device according to the first embodiment.
  • FIG. 2 is a diagram illustrating an example of a method for using an area in the physical block 110.
  • FIG. 3 is a diagram illustrating an example of a concept of correspondence between logical blocks and physical blocks.
  • FIG. 4 is a diagram illustrating an example of a group of physical blocks.
  • FIG. 5 is a diagram illustrating an example of a group of logical blocks.
  • FIG. 6 is a diagram illustrating an example of the mapping table 140.
  • FIG. 7 is a diagram illustrating an example of the physical block management information 150.
  • FIG. 8 is a diagram illustrating an example of logical block management information.
  • FIG. 9 is a diagram illustrating an example of the empty block table 170.
  • FIG. 1 is a block diagram showing an example of a flash memory device according to the first embodiment.
  • FIG. 2 is a diagram illustrating an example of a method for using an area in the physical block 110.
  • FIG. 10 is a diagram illustrating an example of a Hot block group table.
  • FIG. 11 is a diagram illustrating an example of a Cold block group table.
  • FIG. 12 is a diagram illustrating an example of an empty block group table.
  • FIG. 13 is an example of a flowchart showing the flow of read processing.
  • FIG. 14 is an example of a flowchart showing the flow of write processing.
  • FIG. 15 is a flowchart illustrating an example of the flow of reclamation processing.
  • FIG. 16 is a flowchart illustrating an example of the flow of logical block group adjustment processing in the first embodiment.
  • FIG. 17 is a flowchart illustrating an example of the flow of physical block group adjustment processing.
  • FIG. 18 is a flowchart illustrating an example of the flow of logical block exchange processing.
  • FIG. 19 is a diagram illustrating an example of physical block management information in the second embodiment.
  • FIG. 20 is a flowchart illustrating an example of the flow of logical block group adjustment processing in the second embodiment.
  • FIG. 21 is a block diagram showing an example of a flash memory device according to the third embodiment.
  • FIG. 22 is a block diagram illustrating a configuration example of the storage drive 505 in the third embodiment.
  • FIG. 23 is a block diagram illustrating a configuration example of the host 700 in the fourth embodiment.
  • Block is an erase unit of flash memory.
  • a “page” is a unit for reading and writing data in the flash memory.
  • One block is composed of a plurality of pages.
  • physical blocks are classified according to the number of erasures.
  • the physical block is classified into two types, that is, the number of physical block erasures is large / small.
  • a large number of erases is called “Old”, and a small number of erases is called “Young”.
  • a physical block with a large number of erases may be referred to as an “Old block”, and a physical block with a small number of erases may be referred to as a “Young block”.
  • the logical blocks are classified according to the erase frequency.
  • the logical block is classified into two types according to whether the logical block erase frequency is high or low.
  • a high erase frequency is called “Hot”
  • a low erase frequency is called “Cold”.
  • a logical block with a high erasure frequency may be called a “Hot block”
  • a logical block with a low erasure frequency may be called a “Cold block”.
  • FIG. 1 is a block diagram showing an example of a flash memory device according to the first embodiment.
  • the flash memory device 100 is, for example, a storage drive (flash drive) having a plurality of flash memory chips.
  • the flash memory device 100 may be an SSD (Solid State Drive).
  • the flash memory device 100 includes one or more host interface ports 101 that transmit / receive data to / from a host computer (hereinafter referred to as a host) 10, one or more controllers 102 that control the flash memory device 100, and a plurality of data that stores data. Flash memory chips (hereinafter referred to as flash chips) 103 and one or more main memories 104.
  • the flash chip 103 has a plurality of physical blocks.
  • the main memory 104 stores flash memory management information 105 and includes a data buffer 106.
  • the flash memory management information 105 includes a control program including a wear leveling program, a mapping table 140 (see FIG. 6) described later, physical block management information 150 (see FIG. 7), logical block management information (see FIG. 8), and free blocks.
  • a table 170 (see FIG. 9), a Hot block group table (see FIG. 10), a Cold block group table (see FIG. 11), and an empty block group table (see FIG. 12) are included.
  • the controller 102 executes various processes described later while referring to the flash memory management information 105 as appropriate.
  • FIG. 2 is a diagram illustrating an example of a method of using an area in the physical block 110.
  • the erase unit of the flash memory is a block
  • the read / write unit of the flash memory is a page smaller than the block. Therefore, one physical block 110 is composed of a plurality of pages 113.
  • the area of the physical block 110 is divided into, for example, two.
  • the first area is used as a data area 111 for storing data
  • the second area is used as an update area 112 for storing update data of data existing in the data area 111.
  • the area in the physical block may be divided into three or more.
  • a plurality of area sets of data areas and update areas may exist in one physical block, and in this case, a plurality of logical blocks may be allocated to a plurality of area sets in one physical block.
  • One physical block may not be divided into a plurality of areas. For example, there may be a physical block having only a data area and a physical block having only an update area.
  • FIG. 3 is a diagram showing an example of a concept of correspondence between logical blocks and physical blocks.
  • the logical block space 120 is a space that can be seen from the host 10 and is composed of a plurality of logical blocks 121. That is, the logical block space 120 is a set of logical blocks.
  • the logical block space 120 is a concept representing all the logical blocks 121 in the flash memory device.
  • the physical block space 122 is a concept representing all physical blocks in the flash memory device. Each physical block constituting the physical block space 122 is, for example, one of an allocated block 123, a free block 124, and a defective block 125.
  • the allocated block 123 is a physical block to which the logical block 121 is allocated.
  • the empty block 124 is a physical block that is not assigned to a logical block and that can be assigned a logical block.
  • the defective block 125 is a physical block that has reached the upper limit of the number of times of erasure or a physical block that cannot store data due to a failure or the like. Therefore, no logical block is assigned to the bad block 125, and no logical block is assigned.
  • FIG. 4 is a diagram illustrating an example of a group of physical blocks.
  • a threshold for the number of erasures (hereinafter, physical block classification threshold) is provided. Therefore, each physical block is classified into either a group A130 of physical blocks with the number of erases less than the physical block classification threshold or a group B131 of physical blocks with the number of erases greater than the physical block classification threshold.
  • the physical block classification threshold is, for example, a value (for example, an average value) based on the statistics of the number of erases of all physical blocks.
  • a value for example, an average value
  • the present invention is not limited to this, and other types of values may be adopted.
  • the number of physical block groups is not limited to two. If there are more than two groups, an improvement in classification accuracy based on the number of erasures can be expected.
  • FIG. 5 is a diagram illustrating an example of a group of logical blocks.
  • An erasure frequency threshold (hereinafter referred to as a logical block classification threshold) is provided to classify all logical blocks. Therefore, each logical block is classified into either a logical block group A132 having an erase frequency lower than the logical block classification threshold or a logical block group B133 having an erase frequency higher than the logical block classification threshold.
  • the logical block classification threshold is, for example, a value (for example, an average value) based on the erasure frequency statistics of all logical blocks.
  • the present invention is not limited to this, and other types of values may be adopted.
  • the number of logical block groups is not limited to two. If there are more than two groups, an improvement in classification accuracy based on the erase frequency can be expected.
  • FIG. 6 is a diagram illustrating an example of the mapping table 140.
  • the mapping table 140 is a table representing the correspondence between addresses in the physical block space 122 and addresses in the logical block space 120.
  • the mapping table 140 is an array having a logical block address as an index and a physical block address as an element. A maximum of one physical block address is associated with one logical block address. When a physical block is not associated with a certain logical block, a NULL value is stored in the physical block address of the mapping table 140.
  • the “physical block address” is composed of the number 141 of the flash chip 103 in the flash memory device 100 and the number 142 of the physical block in the flash chip 103.
  • FIG. 7 is a diagram illustrating an example of the physical block management information 150.
  • the physical block management information 150 is information for managing physical blocks.
  • the physical block management information 150 includes a physical block table 151, a physical block classification threshold counter 156, a page mapping table 157, and a total erase count counter 158.
  • the physical block table 151 is a table having information such as the state of each physical block and the number of erasures.
  • This table 151 includes a chip number 141, a physical block number 142, an empty flag 152, an erase count counter 153, a forward pointer 154, and a backward pointer 155 for each physical block.
  • each element will be described by taking one physical block (referred to as “target physical block” in the description of FIG. 7) as an example.
  • Chip number 141 is the number of the flash chip including the target physical block.
  • the physical block number 142 is the number of the target physical block.
  • the empty flag 152 is information indicating whether or not the target physical block is an empty block. For example, the empty flag 152 has a value of “1” if the target physical block is an empty block, and a value of “0” if the target physical block is not an empty block.
  • the erase count counter 153 indicates the cumulative erase count of the target physical block. When the erase count counter 153 reaches the upper limit of the erase count of the flash memory, the target physical block is managed as a defective block.
  • the forward pointer 154 and the backward pointer 155 are pointers that connect a plurality of physical blocks classified by the number of erasures.
  • the physical block classification threshold counter 156 is a threshold indicating the boundary of physical block classification. A physical block having an erase count smaller than the physical block classification threshold counter 156 is classified into the physical block group A 130, and a physical block having an erase count greater than the physical block classification threshold counter 156 is classified into the physical block group B 131.
  • the physical block classification threshold counter 156 is, for example, an average value of the erase count counter 153 of all physical blocks.
  • the page mapping table 157 is a table indicating which page of the data area stores each page of the update area of the physical block.
  • the index indicates the page number in the update area
  • the element indicates the page number in the data area. If update data is added to the page mapping table 157 in the order of page numbers in the update area, the latest data is stored in a later page.
  • the indexes 0 and 2 store update data for page 10 in the data area in the same physical block. In this case, it can be seen that the latest data of page number 10 in the data area is stored in the page of index 2 which is behind index 0.
  • the total erase count counter 158 is the sum of the erase counts 753 of all physical blocks in the flash memory device 100. Each time a physical block is erased, the total erase counter 158 is incremented by one.
  • the physical block table 151 information indicating whether the physical block is classified as Young or Old may be registered for each physical block.
  • FIG. 8 is a diagram showing an example of logical block management information.
  • the logical block management information 160 is information for managing logical blocks.
  • the logical block management information 160 includes a logical block table 161 and a logical block classification threshold counter 166.
  • the logical block table 161 includes a logical block address 162, an erase frequency 163, a logical block classification flag 164, an allocation time 165, a forward pointer 154, and a backward pointer 155 for each logical block.
  • a logical block address 162 an erase frequency 163
  • a logical block classification flag 164 an allocation time 165
  • a forward pointer 154 an allocation time 165
  • a backward pointer 155 for each logical block.
  • each element will be described by taking one logical block (referred to as “target logical block” in the description of FIG. 8) as an example.
  • the logical block address 162 is an address of the target logical block that can be seen from the host 10.
  • Erase frequency 163 indicates the erase frequency of the target logical block.
  • the erase frequency 163 is the number of erases per unit time (for example, the number of erases per day or month).
  • the erasure frequency is not limited to this, and other types of values, for example, the length of the period until a predetermined number of erasures is reached (for example, how long it took to reach the number of erasures 1000 times) May be adopted.
  • the logical block classification flag 164 is information indicating whether the target logical block belongs to the logical block group A132 or the logical block group B133. In this embodiment, since each logical block is classified as either one of high / low erase frequency, the logical block classification flag 164 may be binary information. However, when there are more than two types of logical block classifications, the range of values that the logical block classification flag 164 can take may be a width according to the number of classifications.
  • Allocation time 165 indicates the time when the target logical block is first allocated to the physical block.
  • the allocation time 165 is not limited to time information as long as it is information for calculating the erase frequency.
  • the forward pointer 154 and backward pointer 155 in this table 161 are pointers that mutually connect a plurality of logical blocks classified according to the erase frequency.
  • the logical block classification threshold counter 166 is a logical block classification threshold. Logical blocks with an erase frequency lower than the logical block threshold counter 166 are classified into the logical block group A 132, and logical blocks with an erase frequency higher than the logical block classification threshold counter 166 are classified into the logical block group B 133.
  • the logical block classification threshold counter 166 is an average value of the erase frequencies 163 of all logical blocks in the flash memory device 100, for example.
  • FIG. 9 is a diagram illustrating an example of the empty block table 170.
  • the empty block table 170 is information for managing empty blocks in the flash memory device 100.
  • the empty block table 170 connects, for each empty block, the chip number 141 and the physical block number 142 indicating the address of the empty block, the erase count counter 153 indicating the total number of erased empty blocks, and the empty blocks. Forward pointer 154 and backward pointer 155.
  • FIG. 10 is a diagram showing an example of a Hot block group table.
  • the Hot block group table is a list for classifying the physical blocks to which the Hot block is allocated according to the number of erasures.
  • the Hot block group has a plurality of erase count level numbers 180.
  • Each level number 180 is linked by pointers 154 and 155 to physical blocks corresponding to the erase count level indicated by the number. Further, physical blocks belonging to the same level number 180 are also connected by pointers 154 and 155.
  • the erase count level number 180 is a number for identifying the erase count level. For example, if there are different levels for every 100 erasures, physical blocks with erasure times of 0 to 99 belong to level number 0.
  • the erase count level may be the erase count itself.
  • the logical block may have a concept of erasure frequency level.
  • each erase frequency level may be the erase frequency itself or may be defined by the width of the erase frequency (for example, erase frequencies 0 to 50 may belong to the erase frequency level 0). Therefore, for example, the erase count level to which the physical block classification threshold belongs may be the same as the physical block classification threshold, or the erase frequency threshold level to which the logical block classification threshold belongs may be the same as the logical block classification threshold. is there.
  • the physical block belonging to the erase count level equal to or higher than the erase count level to which the physical block classification threshold belongs is an Old block, and the erase count level lower than the erase count level to which the physical block classification threshold belongs.
  • a physical block belonging to is a Young block.
  • each physical block is divided into either a Young block or an Old block, but there may be three or more types of physical block groups according to the number of erasures. Further, according to the example of FIG. 10, there are a plurality of erase count levels for each of Young and Old, but the number of erase count levels belonging to each physical block group according to the erase count may be only one. There is no restriction on the number of stages of grouping.
  • the physical blocks linked to the erase count level number are linked by the forward pointer 154 and the backward pointer 155 stored in the physical block table 151 to form a bidirectionally searchable list structure. Further, each physical block may include a chip number 141, a physical block number 142, an erase count counter 153, and a logical block number 162 (the number of the logical block assigned to the physical block).
  • FIG. 11 is a diagram showing an example of a Cold block group table.
  • This table is a table for managing Cold blocks.
  • the Cold block group table is a list for classifying physical blocks to which Cold blocks are assigned according to the number of erasures. Specifically, for example, the configuration of the Cold block group is almost the same as the configuration of the Hot block group table described above.
  • the physical block when a physical block is erased (specifically, when an erase process is performed on a physical block), the physical block is an empty block. Therefore, the physical block needs to be registered in an empty block group table (see FIG. 12) described later. For this reason, the erased physical block is deleted from the Hot block group table or the Cold block group table. Conversely, when a logical block is assigned to an empty block, the empty block (physical block) is classified into a Hot block group table or a Cold block group table according to the erase frequency of the assigned logical block, and These are linked to the erase count level number 180 corresponding to the erase count of the physical block.
  • FIG. 12 is a diagram showing an example of an empty block group table.
  • This table is a table for managing free block groups.
  • the empty block group table is a list for classifying empty blocks according to the number of erasures. Specifically, for example, the configuration of the empty block group is almost the same as the configuration of the Hot block group table described above. Further, the width of the erase count level 180 may be the same or different in the Hot block group table, the Cold block group table, and the empty block group, for example.
  • FIG. 13 is an example of a flowchart showing the flow of read processing.
  • the controller 102 receives a read command from the host 10 (step 201).
  • a read command from the host 10 designates a logical block address. Therefore, it is necessary to convert the logical block address into a physical block address in the flash memory device 100.
  • the controller 102 reads the number of the physical block to be read (that is, the number of the physical block to which the logical block having the designated logical block address is assigned) from the mapping table 140 (step 202). ).
  • the controller 102 refers to the page mapping table 157 of the physical block indicated by the read physical block number (step 203), reads the latest data, and stores it in the buffer 106 (step 204).
  • controller 102 transfers data from the buffer 106 to the host 10 (step 205).
  • FIG. 14 is an example of a flowchart showing the flow of write processing.
  • the controller 102 receives a write command from the host 10 and determines whether or not a logical block having a logical block address specified by the write command (hereinafter referred to as a write destination logical block) is allocated to a physical block. (Step 206). For example, the controller 102 can refer to the mapping table 140 and determine that the write destination logical block is allocated to the physical block if the physical block address corresponding to the write destination logical block is not NULL.
  • step 206 If the result of the determination in step 206 is negative (when it is determined that the write destination logical block is not stored in the physical block) (step 206: NO), it is necessary to allocate the write destination logical block to an empty block. Therefore, the controller 102 selects an empty block from the empty block table 170 (step 207). When there are a plurality of empty blocks, an empty block may be selected at random, or an empty block with the smallest number of erasures may be selected. After the empty block is selected, the controller 102 writes the write data (data to be written) to the data area 111 in the selected empty block (step 208). Then, the controller 102 updates the page mapping table 157 selected in step 207 (step 209).
  • Step 210 is described as “Process ⁇ A ”in FIG. 14.
  • the controller 102 associates the chip number 141 and the physical block number 142 of the empty block selected in Step 207 with the write destination logical block number.
  • step 209 may be skipped if data is not stored in the update area.
  • step 206 If the result of the determination in step 206 is affirmative (when it is determined that the write destination logical block has already been assigned to the physical block) (step 206: YES), the controller 102 performs the following determination. That is, the controller 102 compares the number of remaining writable pages with the number of write pages, and determines whether or not write data can be written to the update area (that is, whether or not the number of remaining writable pages is equal to or greater than the number of write pages). (Step 211).
  • the “number of remaining writable pages” is the number of pages (writable pages) that remain without being written in the update area 112 in the physical block to which the write destination logical block is allocated.
  • the “number of write pages” is a value obtained by dividing the transfer length specified by the write command by the page size.
  • step 211 If the result of the determination in step 211 is affirmative (if the number of remaining writable pages is equal to or greater than the number of write pages) (step 211: YES), the controller 102 updates the physical block to which the write destination logical block is allocated. Write data is written in the area 112 (step 212). Then, the controller 102 executes step 209 and step 210 and ends the write process. In step 209, the controller 102 uses the data area 111 in the write-destination physical block in the index corresponding to the write-destination page in the update area 112 (index in the page mapping table 157 corresponding to the write-destination physical block). The number of the page (the page storing the data to be updated) is associated.
  • step 211 If the result of the determination in step 211 is negative (if the number of remaining writable pages is less than the number of write pages) (step 211: YES), the controller 102 executes a reclamation process (step 213). Details of the reclamation process will be described later. After the reclamation process ends, the write process ends. Even if step 206 is YES, in the case of writing to an unwritten page in the data area 111, write data may be written to the unwritten page instead of steps 211 and 212.
  • FIG. 15 is a flowchart showing an example of the reclamation process flow.
  • the reclamation process in the present embodiment is a process performed when the size of the write data is larger than the total size of the remaining writable pages in the update area 112 in the physical block.
  • the physical block assigned to the write destination logical block (hereinafter referred to as the original physical block) is erased, and the physical block newly assigned to the write destination logical block (hereinafter referred to as the new physical block).
  • the latest data is written to the logical block group, and the logical block group and the physical block group are reconstructed.
  • the reclamation process will be described.
  • a physical block to which a logical block classified into a Hot block group is assigned and whose erase count level number belongs to Old This is called “Hot / Old block”.
  • a physical block to which a logical block classified into a Cold block group is assigned and whose erase count level number belongs to Young is referred to as “Cold /
  • a “physical block that is classified into an empty block group and whose erase count level number belongs to Young” is referred to as an “Erased / Young block”.
  • the reclamation process is triggered when it is determined that write data cannot be added to the physical block update area 112 in the write process.
  • the reclamation process can be started, for example, by designating a logical block address designated by a write command.
  • a physical block assigned to a write destination logical block that is, an original physical block
  • a target block a physical block assigned to a write destination logical block
  • the controller 102 determines whether or not the target block is a Hot / Old block (step 220). Specifically, for example, the controller 102 refers to the Hot / Cold determination flag 164 of the logical block table 161 and determines whether or not the write destination logical block is Hot. If the write destination logical block is Hot, the controller 102 determines whether or not the target block erase count is larger than the physical block classification threshold counter 156 (that is, whether or not the target block is Old).
  • step 220 When the determination result of step 220 is affirmative (when it is determined that the target block is a Hot / Old block) (step 220: YES), the controller 102 refers to the empty block table 170 and the Erased / Young block is It is determined whether it exists (step 221). If there is an Erased / Young block (step 221: YES), the controller 102 selects one Erased / Young block (step 222) and copies the data in the target block to the selected empty block (step 223). . Next, the controller 102 determines whether or not the target block (strictly speaking, the write destination logical block assigned to the target block) is Hot (step 224).
  • step 224 If the target block is Hot (step 224: YES), the controller 102 registers the physical block that is the copy destination in step 223 in the Hot block group table (see FIG. 10) (step 225). On the other hand, if the target block is not Hot (step 224: NO), the controller 102 registers the physical block that is the copy destination in step 223 in the Cold block group table (see FIG. 11) (step 226). After the registration is completed, the controller 102 updates the logical block table 161, the physical block table 151, and the mapping table 140 to the latest state (step 210, expressed as “Process A”).
  • the controller 102 erases the target block, increments the erase counter (erase counter in the physical block table 151) 153 corresponding to the target block by 1, and corresponds to the write a priori block assigned to the target block.
  • the erase frequency (erase frequency in the logical block table 161) 163 is incremented by 1 (step 227). Since the target block has become an empty block because the target block has been erased, the controller 102 registers the target block in the empty block group table (see FIG. 12) (step 228).
  • the controller 102 updates each table to the latest state by executing Process A again.
  • the controller 102 executes physical block group adjustment processing (step 229), executes logical block group adjustment processing (step 230), and ends the reclamation processing. Details of the physical block group adjustment process and the logical block group adjustment process will be described later.
  • step 220 uses an empty block as a copy destination of the data of the target block as the target block.
  • One empty block belonging to the same erase count level (or an empty block belonging to an erase count level close to the target block) is selected (step 232), and the data in the target block is copied to the selected empty block (step 223).
  • the processing after step 224 is the same.
  • the selection method of the empty block in step 232 may be a selection method other than those described above. For example, an empty block with the smallest number of erases may be selected.
  • the “empty block belonging to the erase count level close to the target block” is an empty block belonging to an erase count level whose difference from the erase count level to which the target block erase count belongs is equal to or less than a predetermined value.
  • the difference is preferably as small as possible.
  • step 300 logical block exchange processing is executed (step 300).
  • the “logical block exchange process” is a process of preparing a Young Erased block as much as possible.
  • the controller 102 selects the Erased block created by the logical block exchange process (Step 231), and copies the data in the target block to the selected Erased block (Step 223).
  • FIG. 16 is a flowchart showing an example of the flow of logical block group adjustment processing.
  • the logical block group adjustment process is executed in the reclamation process as described above.
  • the controller 102 obtains an average value of the erase frequencies of all the logical blocks in the flash memory device 100 (step 240).
  • the average value of the erase frequency is expressed as “AVE_EF” (Average (Erase Frequency).
  • the value of the logical block classification threshold counter 166 is updated to AVE_EF.
  • controller 102 refers to the logical block table 161 and selects the first logical block (step 241).
  • the controller 102 determines whether or not the erase frequency 163 of the selected logical block is lower than AVE_EF (step 242).
  • step 242 If the determination result in step 242 is affirmative (when it is determined that the erase frequency 163 is lower than AVE_EF) (step 242: YES), the controller 102 is assigned the logical block selected in step 241. The physical block is registered in the Cold block group table (step 243).
  • step 242 determines whether the erasure frequency 163 is equal to or greater than AVE_EF. If the result of the determination in step 242 is negative (when it is determined that the erasure frequency 163 is equal to or greater than AVE_EF) (step 242: NO), the controller 102 is physically assigned with the logical block selected in step 241. The block is registered in the Hot block group table (step 244).
  • step 243 or 244 the controller 102 updates the logical block table 161, the physical block table 151, and the mapping table 140 to the latest state (step 210, expressed as Process A).
  • Step 245 the controller 102 resets the allocation time information 165 of the logical block selected in Step 241 (Step 245).
  • the controller 102 determines whether or not the above processing has been performed for all the logical blocks (step 246). If there is an unexecuted logical block (step 246: NO), the controller 102 selects the next logical block on the logical block table 161 (step 247), and the processing from step 242 is performed on the selected logical block. We carry out about. When the process is performed for all the logical blocks (step 246: YES), the logical block group adjustment process ends.
  • the logical block group adjustment process is a process with a large amount of calculation because processes such as comparison and classification are performed on all logical blocks. For this reason, this process does not necessarily need to be performed every time the reclamation process is performed. For example, in the reclamation process, before step 229 (logical block group adjustment process), it is determined whether or not the process of step 229 is necessary. If it is determined that the process is necessary, step 229 may be performed. As a case where it is determined that step 229 is necessary, for example, a case where it is determined that the value of the logical block classification threshold counter 166 needs to be changed can be considered.
  • a case where it is determined that the value of the logical block classification threshold counter 166 needs to be changed for example, a case where the ratio of various logical blocks in all logical blocks falls or exceeds a predetermined threshold is considered. Specifically, for example, when the ratio of the Hot block (or Cold block) to all logical blocks is lower than the first threshold (or exceeds the second threshold that is a threshold equal to or higher than the first threshold). Then, logical block group adjustment processing is executed.
  • the logical block group adjustment process may be performed periodically, such as once a day.
  • all logical blocks are managed as cold blocks (or all hot blocks), and whether each logical block is cold or hot according to an increase in the erase frequency. It may be modified as appropriate.
  • FIG. 17 is a flowchart showing an example of the flow of physical block group adjustment processing.
  • the physical block group adjustment process is executed in the reclamation process as described above.
  • the controller 102 calculates the average value of the number of erasures of all physical blocks in the flash memory device 100 (step 250). This is calculated by dividing the total number of erasures 158 in the physical block management information 150 by the total number of physical blocks. The average value of the number of erase times calculated here is expressed as “AVE_EC” (Average (Erase Cycle).
  • the controller 102 determines whether or not the value of the physical block classification threshold counter 156 is larger than AVE_EC (step 251).
  • step 251 If the result of the determination in step 251 is affirmative (step 251: YES), the controller 102 ends the physical block group adjustment process.
  • step 251 when the result of the determination in step 251 is negative (when the value of the physical block classification threshold counter 156 is equal to or smaller than AVE_EC) (step 251: NO), the controller 102 increases the value of the physical block classification threshold counter 156. (Step 252). Specifically, for example, a value corresponding to an increase in the average number of times of erasing physical blocks is added to the physical block classification threshold counter 156. This is to correctly classify Old and Young. More specifically, for example, if AVE_EC is N, the value of the updated physical block classification threshold counter 156 may be N.
  • FIG. 18 is a flowchart showing an example of the flow of logical block exchange processing.
  • the logical block exchange process is also executed in the reclamation process as described above.
  • the purpose of this process is to create a Young Erased block as much as possible.
  • the controller 102 searches for a physical block belonging to the lowest erasure count level 180 among physical blocks belonging to the Cold block group table. If there is no Cold block belonging to the lowest erase count level, the controller 102 searches for a physical block belonging to the next lowest erase count level. This is repeated until a physical block is found.
  • the found physical block is denoted as “block A” (step 301). Since physical blocks are classified by the number of erasures with a certain width, block A does not necessarily have the smallest number of erasures, but a physical block with a relatively small number of erasures has a small search processing. Can be found at.
  • the structure of the Cold block group table may be a structure other than the list format.
  • controller 102 selects one free block belonging to the highest erase count level 180 among the physical blocks belonging to the free block group table.
  • the empty block selected here is expressed as “block B” (step 302).
  • controller 102 copies the data in the block A to the block B (step 303).
  • the controller 102 updates the logical block table 161, the physical block table 151, and the mapping table 140 to the latest state (step 210, expressed as Process A).
  • controller 102 erases the block A and increments the erase count counter 153 of the block A by 1 (step 304).
  • controller 102 registers the block A in the empty block group table (step 305).
  • controller 102 executes Process A again (step 210), and executes physical block group adjustment processing (see FIG. 16) (step 229).
  • the physical block management information and the logical block classification method are different from those in the first embodiment. Specifically, in the second embodiment, in addition to the physical block management information used in the first embodiment, information indicating the guarantee period of the flash memory device is required.
  • the logical blocks are classified into the Hot block group and the Cold block group according to the average value of the erase frequency.
  • the erase frequency of the logical block is set in advance. It is classified according to whether or not it is equal to or higher than the permitted erasure frequency.
  • the “allowable erasing frequency” is a kind of threshold value of the erasing frequency, and is a numerical value calculated by, for example, dividing the physical block erasable number (upper limit) by the guarantee period of the flash memory device. .
  • FIG. 19 is a diagram showing an example of physical block management information in the second embodiment.
  • the physical block management information 600 includes a guarantee period 601 of the flash memory device.
  • the guarantee period 601 indicates the remaining guarantee period of the flash memory device from the present time. For this reason, the warranty period 601 is appropriately updated as time progresses.
  • the warranty period 601 is the remaining years, but any information may be used as long as the information indicates the period.
  • the warranty period 601 may be information indicating the date and time at the end of the warranty period.
  • FIG. 20 is a flowchart showing an example of the flow of logical block group adjustment processing in the second embodiment.
  • the controller 102 calculates the allowable erasure frequency based on the guarantee period 601 of the flash memory device and the erasable number of physical blocks (step 401).
  • controller 102 refers to the logical block table 161 and selects the first block (step 402).
  • Step 403 the controller 102 determines whether or not the erase frequency 163 of the logical block selected in Step 402 is lower than AEF (Step 403).
  • step 402 If the determination result in step 402 is affirmative (when it is determined that the erase frequency 163 is lower than AEF), the controller 102 assigns the physical block assigned to the logical block selected in step 402 to the Cold block group. Register in the table (step 404).
  • step 402 determines whether the physical block assigned to the logical block selected in step 402 is AEF or higher. If the erasure frequency 163 is determined to be AEF or higher, the controller 102 assigns the physical block assigned to the logical block selected in step 402 to the Hot block group. Register in the table (step 405).
  • step 404 or 405 the controller 102 updates the logical block table 161, the physical block table 151, and the mapping table 140 to the latest state (step 210, expressed as Process A).
  • Step 406 the controller 102 resets the allocation time information 165 of the logical block selected in Step 402 (Step 406).
  • the controller 102 determines whether or not the above processing has been performed for all the logical blocks (step 407). If there is an unexecuted logical block (step 407: NO), the controller 102 selects the next logical block on the logical block table 161 (step 408), and the processing from step 403 is performed on the selected logical block. We carry out about. When the process is executed for all the logical blocks (step 407: YES), the logical block group adjustment process ends.
  • FIG. 21 is a block diagram showing an example of a flash memory device according to the third embodiment.
  • the flash memory device 501 is a storage system including a plurality of storage drives (flash drives) 505.
  • the storage system controller (storage controller) 504 implements wear leveling. Specifically, for example, the storage controller 504 can execute the processes of FIGS.
  • the storage controller 504 may execute the process of FIG. 20 instead of the process of FIG.
  • RAID Redundant Array of Independent (or Inexpensive) Disks
  • the storage controller 504 manages logical units provided to the host 10. In response to a write / read request from the host 10, the storage controller 504 specifies a storage area to be accessed and uses a write / read command specifying the address of the specified storage area as the basis of the specified storage area. The data is transmitted to each storage drive 505 belonging to the RAID group.
  • the logical unit may be a logical unit according to the Thin Provisioning technology. In this case, the logical unit is composed of a plurality of virtual chunks, and the storage controller 504 manages the plurality of real chunks.
  • the actual chunk is based on a plurality of storage drives 505 that constitute a RAID group.
  • the storage controller 504 (1) In response to a write request from the host 10, it is determined whether or not a real chunk is allocated to the write-destination virtual chunk. (2) If the result of the determination in (1) is negative, an unallocated real chunk is allocated to the write destination virtual chunk. (3) Write the write target data to the actual chunk allocated in (2). I do. In (3), the storage controller 504 transmits a data write command to each storage drive 505 based on the write-destination actual chunk.
  • the storage system 501 is connected to a host 10 that is a kind of host device and issues an I / O (Input / Output) request, and a management server 503 that is a computer that manages the storage system 501.
  • the storage controller 504 includes one or more host adapters 509 that exchange data with the host 10, one or more management ports 510 that communicate with the management server 503, and one or more microprocessors that control the storage system 501 (Hereinafter referred to as MP) 506, a control memory 507 for holding data and programs for performing control, and a cache memory 508 which is a memory for caching data.
  • MP microprocessors
  • the storage controller 504 also has an internal network 511 that interconnects the storage drive 505, cache memory 508, host adapter 509, MP 506, and the like.
  • the control memory 507 and the cache memory 508 may be the same memory.
  • One or more hard disk drives (HDD) 514 may be connected to the internal network 511. That is, the storage system 501 may include both flash drives and HDDs.
  • the flash drive may be SSD (Solid State Drive). There may be no HDD.
  • the control memory 507 stores, for example, logical unit management information 512 for managing each logical unit and the flash memory management information 105 already described.
  • the flash memory management information 105 may have the same number as the storage drives 505 in the storage system 501.
  • FIG. 22 is a block diagram showing a configuration example of the storage drive 505 in the third embodiment.
  • the storage drive 505 does not have the flash memory management information 105. For this reason, the controller 2202 does not perform wear leveling, but performs write processing / read processing in response to a write / read command from the storage controller 504.
  • the part that performs the wear leveling process is the storage controller 504, and the target of the wear leveling process is a block in each storage drive 505. That is, the storage controller 504 needs to grasp information related to blocks in the storage drive 505. Therefore, the storage drive 505 does not have to have the flash memory management information 105, and the storage controller 504 has the flash memory management information 105 for each storage drive 505.
  • the fourth embodiment is different from the first embodiment in that a flash memory device having a flash chip is incorporated as a storage device inside the host 10.
  • the fourth embodiment will be described below with reference to FIG.
  • FIG. 23 is a block diagram showing a configuration example of the host 700 in the fourth embodiment.
  • the host 700 includes a CPU 701 that controls the host 700, a main memory 702 that stores data for performing control and a program such as an OS, and a chipset 703 that connects internal components constituting the host 10 computer 700.
  • the host 700 also includes a graphic controller 704 that performs graphic control, an HDD 514 that stores data, and a human interface device 706 that controls input / output using a mouse, a keyboard, a display, and the like.
  • the host 700 further includes a LAN controller 707 for controlling the network connection, a storage drive 708 using a flash memory and having a disk interface such as ATA and SAS, and a storage using a flash memory and having a PCI interface. Drive 709. It is assumed that the chip set 703 is equipped with ports and connectors for realizing various interface connections such as a PCI interface, a USB interface, and a network interface.
  • the storage drive 708 may be the same as the storage drive in any of the first to third embodiments.
  • the storage drive 709 has a PCI interface unlike the interface that the storage drive 708 has, but the other points may be the same.
  • the controller in the storage drive 708 or storage drive 709 may perform wear leveling.
  • the main memory 702 stores the flash memory management information 105, and the CPU 701 performs wear leveling. Should be implemented.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

 フラッシュメモリ装置のコントローラが、各物理ブロックについては消去回数を管理し、各論理ブロックについて消去頻度を管理する。コントローラは、消去頻度の高い論理ブロックを、消去回数の少ない一以上の物理ブロックに割り当てる。

Description

フラッシュメモリ装置
 本発明は、複数のフラッシュメモリチップを有する記憶装置に関する。
 フラッシュメモリは、その特性上、データを書き換えようとした時、そのデータが元々格納されていた物理領域上に、そのデータを直接上書きすることは不可能である。データの書換えを行う際には、フラッシュメモリの消去単位である「ブロック」と呼ばれる単位で、データの消去処理を実行した後、データを書き換える必要がある。このブロックに対する消去処理の実行回数には、物理的な制約から上限がある。フラッシュメモリのブロックは、消去回数がこの上限を超えると、そのブロックにはデータを格納できなくなってしまうという性質をもっている。
 このため、フラッシュメモリのブロック毎にデータを格納するアドレスを固定的に割り当てる方式をとると、頻繁に消去される一部のデータが格納されたブロックの消去回数が増加してしまい、いずれそのブロックは使用不可能になってしまう。
 このような現象を回避する技術として、特許文献1に示すような、ウェアレベリングと呼ばれる技術が公開されている。ウェアレベリングの基本的な考え方によれば、物理的なブロック(物理ブロック)のアドレスを示す物理アドレスの他に、論理的なブロック(論理ブロック)のアドレスを示す論理アドレスが用意され、物理アドレスに対応付ける論理アドレスが適宜に変更されていく。
 また、特許文献2に示すような、1つの物理ブロックの領域を2分割し、分割した片方の領域は更新用データを格納する領域として使い分ける技術も知られている。特許文献2によれば、データが、1つのブロックに設けられた2つの領域のうちの第一の領域に書き込まれ、第一の領域に格納されたデータが上書きされる場合、上書きされるデータ(更新データ)が第二の領域に追記される。第二の領域が一杯になり、追記不可となった時点で物理ブロックに対する消去処理が発生するため、物理ブロックに対する上書き(更新ライト)が発生したからといって必ずしもその物理ブロックに対して消去処理が必要になるわけではない。それ故、物理ブロックに対する消去処理の回数(物理ブロックの消去回数)を抑えることができる。
日本国特許3507132号公報 特開2009-64251号公報
 特許文献1に示す技術は、物理ブロックと論理ブロックの対応関係を決めるための情報として、物理ブロックの消去回数と論理ブロックのライト頻度とを用いる。特許文献1によれば、ライト頻度の高い論理ブロックが、消去回数の少ない物理ブロックに割り当てられ、ライト頻度の低い論理ブロックが、消去回数の多い物理ブロックに割り当てられる。
 ところで、論理ブロックに割り当てられている一以上の物理ブロックに対して消去処理を行うことなくその一以上の物理ブロックにデータを複数回書き込むことが可能なフラッシュメモリがある。この種のフラッシュメモリとして、例えば、消去単位よりもデータの読み書きの単位の方が小さいフラッシュメモリ、具体的には、例えば、NAND型のフラッシュメモリがある。また、特許文献2に示すような技術が採用されたフラッシュメモリもある。
 この種のフラッシュメモリでは、ブロック消去が行われるまでのライト頻度に偏りが生じる。例えば、複数回のライトによって1回のブロック消去が行われることもあれば、1回のライトによって1回のブロック消去が行われることもある。
 このため、この種のフラッシュメモリに特許文献1の技術を単純に適用しても、ブロック消去回数の偏りを解消することは難しい。
 そこで、本発明の目的は、論理ブロックに割り当てられている一以上の物理ブロックに対して消去処理を行うことなくその一以上の物理ブロックにデータを複数回書き込むことが可能なフラッシュメモリ装置におけるブロック消去回数の偏りを解消することにある。
 フラッシュメモリ装置のコントローラが、各物理ブロックについては消去回数を管理し、各論理ブロックについて消去頻度を管理する。コントローラは、消去頻度の高い論理ブロックを消去回数の少ない一以上の物理ブロックに割り当てる(消去頻度の低い論理ブロックを消去回数の多い一以上の物理ブロックに割り当てることもできる)。具体的には、例えば、コントローラは、消去回数の多い/少ないに応じて物理ブロックを分類し、論理ブロックを、消去頻度の高い/低いに応じて分類する。コントローラは、消去回数の多い第一の物理ブロックに消去頻度の高い第一の論理ブロックが割り当てられていて、且つ、消去回数の少ない第二の物理ブロックに消去頻度の低い第二の論理ブロックが割り当てられているとき、第一及び第二の論理ブロックの割当て先を交換する。つまり、コントローラは、第一の物理ブロックに第二の論理ブロックを割り当て、第二の物理ブロックに第一の論理ブロックを割り当てる。
 フラッシュメモリ装置は、フラッシュメモリドライブ(例えばUSB(Universal Serial Bus)フラッシュメモリ)であっても良いし、複数のフラッシュメモリドライブを有するストレージシステムであっても良いし、計算機であっても良い。このため、フラッシュメモリ装置のコントローラは、フラッシュメモリドライブ内のコントローラであっても良いし、ホストからのアクセス要求に応答してフラッシュメモリドライブにアクセスする、ストレージシステム内のストレージコントローラであっても良いし、計算機内のプロセッサであっても良い。
 本発明によれば、論理ブロックに割り当てられている一以上の物理ブロックに対して消去処理を行うことなくその一以上の物理ブロックにデータを複数回書き込むことが可能なフラッシュメモリ装置におけるブロック消去回数の偏りを解消することができる。
図1は、第1の実施例に係るフラッシュメモリ装置の一例を示すブロック図である。 図2は、物理ブロック110内の領域の利用方法の一例を示す図である。 図3は、論理ブロックと物理ブロックの対応関係の概念の一例を示す図である。 図4は、物理ブロックのグループの一例を示す図である。 図5は、論理ブロックのグループの一例を示す図である。 図6は、マッピングテーブル140の一例を示す図である。 図7は、物理ブロック管理情報150の一例を示す図である。 図8は、論理ブロック管理情報の一例を示す図である。 図9は、空きブロックテーブル170の一例を示す図である。 図10は、Hotブロックグループテーブルの一例を示す図である。 図11は、Coldブロックグループテーブルの一例を示す図である。 図12は、空きブロックグループテーブルの一例を示す図である。 図13は、リード処理の流れを示すフローチャートの一例である。 図14は、ライト処理の流れを示すフローチャートの一例である。 図15は、リクラメーション処理の流れの一例を示すフローチャートである。 図16は、第1の実施例における論理ブロックグループ調整処理の流れ一例を示すフローチャートである。 図17は、物理ブロックグループ調整処理の流れの一例を示すフローチャートである。 図18は、論理ブロック交換処理の流れの一例を示すフローチャートである。 図19は、第2の実施例における物理ブロック管理情報の一例を示す図である。 図20は、第2の実施例における論理ブロックグループ調整処理の流れの一例を示すフローチャートである。 図21は、第3の実施例に係るフラッシュメモリ装置の一例を示すブロック図である。 図22は、第3の実施例におけるストレージドライブ505の構成例を示すブロック図である。 図23は、第4の実施例におけるホスト700の構成例を示すブロック図である。
 本発明の幾つかの実施例を説明する前に、用語を説明する。
 「ブロック」は、フラッシュメモリの消去単位である。「ページ」は、フラッシュメモリのデータの読み書きの単位である。一つのブロックが複数のページで構成されている。
 また、本実施形態では、消去回数によって物理ブロックが分類されるが、以下、説明を簡単にするため、物理ブロックの分類は、物理ブロックの消去回数が多い/少ないの2つである。消去回数が多いことを「Old」と呼び、消去回数が小さいことを「Young」と呼ぶ。また、消去回数が多い物理ブロックを「Oldブロック」と呼び、消去回数が小さい物理ブロックを「Youngブロック」と呼ぶことがある。
 さらに、本実施形態では、消去頻度によって論理ブロックが分類されるが、以下、説明を簡単にするため、論理ブロックの分類は、論理ブロックの消去頻度が高い/低いの2つである。消去頻度が高いことを「Hot」と呼び、消去頻度が低いことを「Cold」と呼ぶ。また、消去頻度が高い論理ブロックを「Hotブロック」と呼び、消去頻度が低い論理ブロックを「Coldブロック」と呼ぶことがある。
 以下、各図を参照しながら、本発明の幾つかの実施例を説明する。なお、以下の説明において、同一の構造部を持ち、同一の符号を付した部分は、原則として同一の動作を行うため、重複する説明を省略した。
 以下、第1の実施例について図1乃至図18を用いて説明する。
 図1は、第1の実施例に係るフラッシュメモリ装置の一例を示すブロック図である。
 フラッシュメモリ装置100は、例えば、複数のフラッシュメモリチップを有するストレージドライブ(フラッシュドライブ)である。フラッシュメモリ装置100は、SSD(Solid State Drive)であっても良い。
 フラッシュメモリ装置100は、ホストコンピュータ(以下、ホスト)10とデータの送受信を行う1つ以上のホストインタフェースポート101と、フラッシュメモリ装置100を制御する1つ以上のコントローラ102と、データを格納する複数のフラッシュメモリチップ(以下、フラッシュチップ)103と、1つ以上のメインメモリ104とを有する。フラッシュチップ103は、複数の物理ブロックを有する。
 メインメモリ104は、フラッシュメモリ管理情報105を記憶し、且つ、データのバッファ106を含む。フラッシュメモリ管理情報105は、ウェアレベリングプログラムを含む制御プログラムと、後述するマッピングテーブル140(図6参照)、物理ブロック管理情報150(図7参照)、論理ブロック管理情報(図8参照)、空きブロックテーブル170(図9参照)、Hotブロックグループテーブル(図10参照)、Coldブロックグループテーブル(図11参照)及び空きブロックグループテーブル(図12参照)とを含む。なお、本実施例では、コントローラ102が、適宜フラッシュメモリ管理情報105を参照しながら、後述する各種処理を実行するものとする。
 図2は、物理ブロック110内の領域の利用方法の一例を示す図である。
 本実施例においては、前述したように、フラッシュメモリの消去単位はブロックであり、フラッシュメモリの読み書きの単位は、ブロックよりも小さいページである。従って、1つの物理ブロック110は、複数のページ113から構成される。
 物理ブロック110の領域は、例えば2つに分割されている。第一の領域が、データを格納するデータ領域111として利用され、第二の領域は、データ領域111に存在するデータの更新データを格納する更新領域112として利用される。物理ブロック内の領域は、3以上に分割されてもよい。例えば、1つの物理ブロックに、データ領域と更新領域の領域セットが複数存在しても良く、その場合、1つの物理ブロック内の複数の領域セットに複数の論理ブロックが割り当てられても良い。また、1つの物理ブロックが複数の領域に分割されていなくてもよい。例えば、データ領域のみの物理ブロックと、更新領域のみの物理ブロックとがあっても良い。
 図3は、論理ブロックと物理ブロックの対応関係の概念の一例を示す図である。
 論理ブロック空間120は、ホスト10から見える空間であり、複数の論理ブロック121で構成されている。つまり、論理ブロック空間120は、論理ブロックの集合である。論理ブロック空間120は、フラッシュメモリ装置における全ての論理ブロック121を表す概念のことである。
 物理ブロック空間122は、フラッシュメモリ装置における全ての物理ブロックを表す概念のことである。物理ブロック空間122を構成する各物理ブロックは、例えば、割当て済みブロック123と、空きブロック124と、不良ブロック125とのいずれかである。
 割当て済みブロック123とは、論理ブロック121が割り当てられている物理ブロックである。
 空きブロック124とは、論理ブロックに割り当てられておらず、且つ、論理ブロックが割り当てられ得る物理ブロックである。
 不良ブロック125とは、消去回数の上限に達した物理ブロック、又は、故障などでデータを格納することのできない物理ブロックである。従って、不良ブロック125には、論理ブロックが割り当てられておらず、また、論理ブロックが割り当てられることがない。
 図4は、物理ブロックのグループの一例を示す図である。
 全ての物理ブロックを分類するため、消去回数の閾値(以下、物理ブロック分類閾値)が設けられている。そのため、各物理ブロックは、物理ブロック分類閾値より少ない消去回数の物理ブロックのグループA130と、物理ブロック分類閾値以上に多い消去回数の物理ブロックのグループB131とのいずれかに分類される。
 なお、物理ブロック分類閾値は、例えば、全ての物理ブロックの消去回数の統計に基づく値(例えば平均値)である。しかし、それに限らず、他種の値が採用されても良い。
 また、物理ブロックのグループは2つに限らない。2つより多くのグループがあれば、消去回数による分類の精度の向上が期待できる。
 図5は、論理ブロックのグループの一例を示す図である。
 全ての論理ブロックを分類するため、消去頻度の閾値(以下、論理ブロック分類閾値)が設けられている。そのため、各論理ブロックは、論理ブロック分類閾値より低い消去頻度の論理ブロックのグループA132と、論理ブロック分類閾値以上に高い消去頻度の論理ブロックのグループB133とのいずれかに分類される。
 なお、論理ブロック分類閾値は、例えば、全ての論理ブロックの消去頻度の統計に基づく値(例えば平均値)である。しかし、それに限らず、他種の値が採用されても良い。
 また、論理ブロックのグループは2つに限らない。2つより多くのグループがあれば、消去頻度による分類の精度の向上が期待できる。
 図6は、マッピングテーブル140の一例を示す図である。
 マッピングテーブル140は、物理ブロック空間122におけるアドレスと論理ブロック空間120におけるアドレスとの対応関係を表すテーブルである。マッピングテーブル140は、論理ブロックアドレスをインデックスとし、要素に物理ブロックアドレスを持つ配列である。1つの論理ブロックアドレスには、最大1つの物理ブロックアドレスが対応付けられる。或る論理ブロックに物理ブロックが対応付けられていない場合は、マッピングテーブル140の物理ブロックアドレスにNULL値が格納される。ここで、「物理ブロックアドレス」とは、フラッシュメモリ装置100内のフラッシュチップ103の番号141と、フラッシュチップ103内の物理ブロックの番号142とで構成されている。
 図7は、物理ブロック管理情報150の一例を示す図である。
 物理ブロック管理情報150は、物理ブロックを管理するための情報である。物理ブロック管理情報150は、物理ブロックテーブル151、物理ブロック分類閾値カウンタ156、ページマッピングテーブル157及び総消去回数カウンタ158を含む。
 物理ブロックテーブル151は、物理ブロック毎の状態や消去回数といった情報を持つテーブルである。このテーブル151は、物理ブロック毎に、チップ番号141、物理ブロック番号142、空きフラグ152、消去回数カウンタ153、前方ポインタ154及び後方ポインタ155を含む。以下、1つの物理ブロック(図7の説明において「対象物理ブロック」と言う)を例に採り、各要素を説明する。
 チップ番号141は、対象物理ブロックを含むフラッシュチップの番号である。
 物理ブロック番号142は、対象物理ブロックの番号である。
 空きフラグ152は、対象物理ブロックが空きブロックであるか否かを表す情報である。例えば、空きフラグ152は、対象物理ブロックが、空きブロックであれば「1」という値であり、空きブロックでなければ「0」という値である。
 消去回数カウンタ153は、対象物理ブロックの累計の消去回数を示している。消去回数カウンタ153が、フラッシュメモリの消去回数の上限に達した場合、対象物理ブロックは不良ブロックとして管理される。
 前方ポインタ154及び後方ポインタ155は、消去回数によって分類された複数の物理ブロック同士を連結するポインタである。
 物理ブロック分類閾値カウンタ156は、物理ブロックの分類の境界を示す閾値である。物理ブロック分類閾値カウンタ156より少ない消去回数の物理ブロックは物理ブロックグループA130に分類され、物理ブロック分類閾値カウンタ156以上に多い消去回数の物理ブロックは、物理ブロックグループB131に分類される。物理ブロック分類閾値カウンタ156は、例えば、全ての物理ブロックの消去回数カウンタ153の平均値である。
 ページマッピングテーブル157は、物理ブロックの更新領域の各ページが、データ領域のどのページのデータを格納しているかを表すテーブルである。このテーブル157において、インデックスが、更新領域におけるページの番号を示しており、要素が、データ領域におけるページの番号を示している。ページマッピングテーブル157には、更新領域のページ番号順に更新データが追記されていけば、最新のデータはより後方のページに格納されていることになる。例えば、インデックス0番と2番には、同一物理ブロック内のデータ領域におけるページ10番への更新データが格納されている。この場合は、データ領域のページ番号10番の最新のデータは、インデックス0番よりも後方にあるインデックス2番のページに格納されていることがわかる。
 総消去回数カウンタ158は、フラッシュメモリ装置100内の全ての物理ブロックの消去回数753の総和である。物理ブロックが消去されるたびに、総消去回数カウンタ158は1加算される。
 物理ブロックテーブル151には、物理ブロック毎に、物理ブロックがYoungとOldのどちらに分類されているのかを表す情報が登録されても良い。
 図8は、論理ブロック管理情報の一例を示す図である。
 論理ブロック管理情報160は、論理ブロックを管理するための情報である。論理ブロック管理情報160は、論理ブロックテーブル161及び論理ブロック分類閾値カウンタ166を含む。
 論理ブロックテーブル161は、論理ブロック毎に、論理ブロックアドレス162、消去頻度163、論理ブロック分類フラグ164、割当時刻165、前方ポインタ154及び後方ポインタ155を含む。以下、1つの論理ブロック(図8の説明において「対象論理ブロック」と言う)を例に採り、各要素を説明する。
 論理ブロックアドレス162は、ホスト10から見える、対象論理ブロックのアドレスである。
 消去頻度163は、対象論理ブロックの消去頻度を示す。本実施例においては、消去頻度163は、単位時間あたりの消去回数(例えば、1日又は1ヶ月あたりの消去回数)である。しかし、それに限らず、消去頻度としては、他種の値、例えば、予め定めた消去回数に達するまでの期間の長さ(例えば、消去回数1000回に達するまでにどのぐらいの時間がかかったか)が採用されても良い。
 論理ブロック分類フラグ164は、対象論理ブロックが、論理ブロックグループA132と論理ブロックグループB133のどちらに属しているかを示す情報である。本実施例においては、各論理ブロックは消去頻度の高い/低いのいずれかに分類されているため、論理ブロック分類フラグ164は2値の情報でよい。しかし、論理ブロックの分類が2種類より多い場合には、論理ブロック分類フラグ164が取りうる値の幅は、分類数に応じた幅とされてよい。
 割当時刻165は、対象論理ブロックが物理ブロックに最初に割り当てられた時刻を示している。なお、割当時刻165は、消去頻度を算出するための情報であれば時刻情報に限定はしない。
 このテーブル161内の前方ポインタ154及び後方ポインタ155は、消去頻度によって分類された複数の論理ブロック同士を相互に連結するポインタである。
 論理ブロック分類閾値カウンタ166は、論理ブロック分類閾値である。論理ブロック閾値カウンタ166より低い消去頻度の論理ブロックは論理ブロックグループA132に分類され、論理ブロック分類閾値カウンタ166以上に高い消去頻度の論理ブロックは、論理ブロックグループB133に分類される。論理ブロック分類閾値カウンタ166は、例えば、フラッシュメモリ装置100内の全ての論理ブロックの消去頻度163の平均値である。
 図9は、空きブロックテーブル170の一例を示す図である。
 空きブロックテーブル170は、フラッシュメモリ装置100内の空きブロックを管理するための情報である。空きブロックテーブル170は、空きブロック毎に、空きブロックのアドレスを示すチップ番号141及び物理ブロック番号142と、空きブロックの通算の消去回数を示す消去回数カウンタ153と、空きブロック同士を互いに連結するための前方ポインタ154及び後方ポインタ155とを含む。
 図10は、Hotブロックグループテーブルの一例を示す図である。
 このテーブルは、Hotブロックグループを管理するためのテーブルである。Hotブロックグループテーブルは、Hotブロックが割り当てられている物理ブロックを、消去回数によってレベル分けするためのリストである。具体的には、例えば、Hotブロックグループは、複数の消去回数レベル番号180を有する。各レベル番号180には、その番号が表す消去回数レベルに該当する物理ブロックがポインタ154及び155で連結されている。また、同じレベル番号180に属する物理ブロック同士も、ポインタ154及び155で連結されている。
 ここで、消去回数レベル番号180は、消去回数のレベルを識別するための番号である。例えば、消去回数100回毎に異なるレベルがある場合は、消去回数が0回~99回の物理ブロックは、レベル番号0に属することになる。なお、消去回数レベルは消去回数それ自体であっても良い。また、論理ブロックについては消去頻度レベルという概念があっても良い。その場合、各消去頻度レベルは、消去頻度それ自体であっても良いし、消去頻度の幅で定義されても良い(例えば、消去頻度0~50が消去頻度レベル0に属しても良い)。従って、例えば、物理ブロック分類閾値が属する消去回数レベルは、物理ブロック分類閾値と同じであることもあるし、論理ブロック分類閾値が属する消去頻度閾値レベルは、論理ブロック分類閾値と同じであることもある。
 本実施形態では、図10に示すように、物理ブロック分類閾値が属する消去回数レベル以上の消去回数レベルに属する物理ブロックがOldブロックであり、物理ブロック分類閾値が属する消去回数レベルより低い消去回数レベルに属する物理ブロックがYoungブロックである。
 なお、本実施形態では、各物理ブロックは、YoungブロックとOldブロックのどちらかに分けられるが、消去回数に応じた物理ブロックグループは3種類以上あっても良い。また、図10の例によれば、YoungとOldのそれぞれについて複数の消去回数レベルがあるが、消去回数に応じた各物理ブロックグループに属する消去回数レベルの数は1つだけでもかまわない。また、グループ分けの段数についての制限はない。消去回数レベル番号に連結された物理ブロックは、物理ブロックテーブル151に格納された前方ポインタ154及び後方ポインタ155によって連結され、双方向に探索可能なリスト構造を形成する。さらに、物理ブロックは、それぞれ、チップ番号141、物理ブロック番号142、消去回数カウンタ153及び論理ブロック番号162(その物理ブロックに割り当てられている論理ブロックの番号)を含んで良い。
 図11は、Coldブロックグループテーブルの一例を示す図である。
 このテーブルは、Coldブロックを管理するためのテーブルである。Coldブロックグループテーブルは、Coldブロックが割り当てられている物理ブロックを、消去回数によってレベル分けするためのリストである。具体的には、例えば、Coldブロックグループの構成は、前述したHotブロックグループテーブルの構成とほぼ同じである。
 Hotブロックグループテーブル及びColdブロックグループテーブルにおいて、物理ブロックが消去されると(具体的には、物理ブロックに対して消去処理が行われると)、その物理ブロックは空きブロックとされる。このため、その物理ブロックは、後述する空きブロックグループテーブル(図12参照)へ登録する必要がある。このため、消去された物理ブロックは、HotブロックグループテーブルあるいはColdブロックグループテーブルから削除される。反対に、空きブロックに論理ブロックが割り当てられた場合は、割り当てられた論理ブロックの消去頻度に応じて、その空きブロック(物理ブロック)は、HotブロックグループテーブルあるいはColdブロックグループテーブルに分類され、且つ、物理ブロックの消去回数に応じた消去回数レベル番号180に連結される。
 図12は、空きブロックグループテーブルの一例を示す図である。
 このテーブルは、空きブロックグループを管理するためのテーブルである。空きブロックグループテーブルは、空きブロックを消去回数によってレベル分けするためのリストである。具体的には、例えば、空きブロックグループの構成は、前述したHotブロックグループテーブルの構成とほぼ同じである。また、消去回数レベル180の幅は、例えば、Hotブロックグループテーブル、Coldブロックグループテーブル及び空きブロックグループにおいて同じでもよいし、異なってもよい。
 以下、本実施例で行われる処理を説明する。
 図13は、リード処理の流れを示すフローチャートの一例である。
 まず、コントローラ102は、ホスト10からリードコマンドを受領する(ステップ201)。ホスト10からのリードコマンドは、論理ブロックアドレスを指定している。そこで論理ブロックアドレスをフラッシュメモリ装置100内の物理ブロックアドレスに変換する必要がある。
 そこで、コントローラ102は、マッピングテーブル140から、リード対象となっている物理ブロックの番号(すなわち、指定されている論理ブロックアドレスを有する論理ブロックが割り当てられている物理ブロックの番号)を読み取る(ステップ202)。
 次に、コントローラ102は、読み取った物理ブロック番号が示す物理ブロックのページマッピングテーブル157を参照し(ステップ203)、最新のデータを読み込んでバッファ106へ格納する(ステップ204)。
 最後に、コントローラ102は、バッファ106からホスト10へデータを転送する(ステップ205)。
 以上で、リード処理が完了する。次に、図14を参照しながらライト処理を説明する。
 図14は、ライト処理の流れを示すフローチャートの一例である。
 まず、コントローラ102が、ホスト10からライトコマンドを受領し、ライトコマンドで指定されている論理ブロックアドレスを有する論理ブロック(以下、ライト先論理ブロック)が、物理ブロックに割り当てられているか否かを判定する(ステップ206)。コントローラ102は、例えば、マッピングテーブル140を参照し、ライト先論理ブロックに対応する物理ブロックアドレスがNULLでなければ、ライト先論理ブロックは物理ブロックに割り当てられている判断できる。
 ステップ206の判定の結果が否定的の場合(ライト先論理ブロックが物理ブロックに格納されていないと判定された場合)(ステップ206:NO)、空きブロックにライト先論理ブロックを割り当てる必要がある。このため、コントローラ102は、空きブロックテーブル170から空きブロックを選択する(ステップ207)。複数の空きブロックが存在する場合、ランダムに空きブロックが選択されても良いし、消去回数が最小である空きブロックが選択されても良い。空きブロックが選択された後、コントローラ102は、選択された空きブロック内のデータ領域111にライトデータ(ライト対象のデータ)を書き込む(ステップ208)。そして、コントローラ102は、ステップ207で選択されたページマッピングテーブル157を更新する(ステップ209)。最後に、コントローラ102は、論理ブロックテーブル161、物理ブロックテーブル151及びマッピングテーブル140をそれぞれ最新の状態に更新し(ステップ210)、ライト処理を終了する。なお、ステップ210は、図14中では「Process A」と表記している。「Process A」では、例えば、コントローラ102は、マッピングテーブル140において、ライト先論理ブロックの番号に、ステップ207で選択された空きブロックのチップ番号141及び物理ブロック番号142を対応付ける。なお、ステップ206:NOの場合、更新領域にデータが格納されなければ、ステップ209はスキップされても良い。
 ステップ206の判定の結果が肯定的の場合(ライト先論理ブロックが既に物理ブロックに割り当てられていると判定された場合)(ステップ206:YES)、コントローラ102は、次の判定を行う。すなわち、コントローラ102は、残り書き込み可能ページ数とライトページ数とを比較し、ライトデータを更新領域に書き込めるか否か(つまり、残り書き込み可能ページ数がライトページ数以上か否か)を判定する(ステップ211)。ここで、「残り書き込み可能ページ数」とは、ライト先論理ブロックが割り当てられている物理ブロック内の更新領域112においてデータが書き込まれずに残っているページ(書き込み可能なページ)の数である。一方、「ライトページ数」とは、ライトコマンドで指定されている転送長をページのサイズで除算することで求められる値である。
 ステップ211の判定の結果が肯定的の場合(残り書き込み可能ページ数がライトページ数以上の場合)(ステップ211:YES)、コントローラ102は、ライト先論理ブロックが割り当てられている物理ブロック内の更新領域112にライトデータを書き込む(ステップ212)。そして、コントローラ102は、ステップ209及びステップ210を実施し、ライト処理を終了する。なお、ステップ209では、コントローラ102は、更新領域112におけるライト先のページに対応したインデックス(ライト先の物理ブロックに対応したページマッピングテーブル157におけるインデックス)に、ライト先の物理ブロック内のデータ領域111におけるページ(更新されるデータが格納されているページ)の番号を対応付ける。
 ステップ211の判定の結果が否定的の場合(残り書き込み可能ページ数がライトページ数未満の場合)(ステップ211:YES)、コントローラ102は、リクラメーション処理を実行する(ステップ213)。リクラメーション処理の詳細は後述する。リクラメーション処理終了後、ライト処理は終了する。なお、ステップ206:YESであっても、データ領域111における未書込みのページに対するライトの場合には、ステップ211及び212に代えて、その未書込みのページに対してライトデータが書き込まれて良い。
 図15は、リクラメーション処理の流れの一例を示すフローチャートである。
 本実施形態におけるリクラメーション処理は、ライトデータのサイズが物理ブロック内の更新領域112の残り書き込み可能ページのトータルサイズよりも大きいときに行われる処理である。この処理では、ライト先論理ブロックに割り当てられている物理ブロック(以下、元の物理ブロック)に対して消去処理が行われ、ライト先論理ブロックに新たに割り当てられる物理ブロック(以下、新しい物理ブロック)に最新データが書き込まれ、且つ、論理ブロックグループ及び物理ブロックグループが再構築される。以下、このリクラメーション処理を説明する。なお、以下の説明では、「Hotブロックグループに分類されている論理ブロックが割り当てられており、かつ、消去回数レベル番号がOldに属する物理ブロック(つまり、Hotブロックが割り当てられているOldブロック)」のことを、「Hot/Oldブロック」と呼ぶ。また、「Coldブロックグループに分類されている論理ブロックが割り当てられており、かつ、消去回数レベル番号がYoungに属する物理ブロック(つまり、Coldブロックが割り当てられているYoungブロック」のことを「Cold/Youngブロック」と呼ぶ。また、「空きブロックグループに分類されており、かつ、消去回数レベル番号はYoungに属する物理ブロック」のことを「Erased/Youngブロック」と呼ぶ。
 リクラメーション処理の実行契機は、前述したように、ライト処理においてライトデータを物理ブロックの更新領域112に追記できないと判定されたときである。リクラメーション処理は、例えば、ライトコマンドで指定されている論理ブロックアドレスを指定して開始することができる。以下の説明では、ライト先論理ブロックに割り当てられている物理ブロック(つまり元の物理ブロック)を、「ターゲットブロック」と呼ぶことにする。
 まず、コントローラ102は、ターゲットブロックがHot/Oldブロックであるか否かを判定する(ステップ220)。具体的には、例えば、コントローラ102は、論理ブロックテーブル161のHot/Cold判定フラグ164を参照して、ライト先論理ブロックがHotか否かを判断する。ライト先論理ブロックがHotであれば、コントローラ102は、ターゲットブロックの消去回数が物理ブロック分類閾値カウンタ156より多い否か(つまり、ターゲットブロックがOldであるか否か)を判定する。
 ステップ220の判定結果が肯定的の場合(ターゲットブロックがHot/Oldブロックであると判定された場合)(ステップ220:YES)、コントローラ102は、空きブロックテーブル170を参照し、Erased/Youngブロックが存在するか判定する(ステップ221)。Erased/Youngブロックがあれば(ステップ221:YES)、コントローラ102は、Erased/Youngブロックを1個選択し(ステップ222)、ターゲットブロック内のデータを、選択した空きブロックにコピーする(ステップ223)。次に、コントローラ102は、ターゲットブロック(厳密には、ターゲットブロックに割り当てられているライト先論理ブロック)がHotであるか否かを判定する(ステップ224)。ターゲットブロックがHotであった場合は(ステップ224:YES)、コントローラ102は、ステップ223でのコピー先の物理ブロックをHotブロックグループテーブル(図10参照)に登録する(ステップ225)。一方、ターゲットブロックがHotでなかった場合は(ステップ224:NO)、コントローラ102は、ステップ223でのコピー先の物理ブロックをColdブロックグループテーブル(図11参照)に登録する(ステップ226)。登録が完了した後、コントローラ102は、論理ブロックテーブル161、物理ブロックテーブル151及びマッピングテーブル140をそれぞれ最新の状態に更新する(ステップ210、「Process A」と表記)。そして、コントローラ102は、ターゲットブロックを消去してターゲットブロックに対応した消去カウンタ(物理ブロックテーブル151内の消去カウンタ)153を1インクリメントし、かつ、ターゲットブロックに割り当てられているライト先論ブロックに対応した消去頻度(論理ブロックテーブル161内の消去頻度)163を、1インクリメントする(ステップ227)。コントローラ102は、ターゲットブロックは消去されたが故に空きブロックとなったため、ターゲットブロックを空きブロックグループテーブル(図12参照)へ登録する(ステップ228)。コントローラ102は、再度、Process Aを実行することで各テーブルを最新の状態に更新する。そして、コントローラ102は、物理ブロックグループ調整処理を実行し(ステップ229)、論理ブロックグループ調整処理を実行し(ステップ230)、リクラメーション処理を終える。なお、物理ブロックグループ調整処理、及び、論理ブロックグループ調整処理の詳細については後述する。
 ステップ220の判定結果が否定的の場合(ターゲットブロックがHot/Oldブロックでない判定された場合)(ステップ220:NO)、コントローラ102は、ターゲットブロックのデータのコピー先とする空きブロックを、ターゲットブロックと同じ消去回数レベルに属する空きブロック(あるいは、ターゲットブロックと近い消去回数レベルに属する空きブロック)を1個選択し(ステップ232)、ターゲットブロック内のデータを、選択した空きブロックにコピーする(ステップ223)。ステップ224以降の処理は同じである。なお、ステップ232での空きブロックの選択方法は、前述以外の選択方法でもよい。例えば、消去回数最小の空きブロックが選択されてもよい。「ターゲットブロックと近い消去回数レベルに属する空きブロック」とは、ターゲットブロックの消去回数が属する消去回数レベルとの差が所定値以下の消去回数レベルに属する空きブロックである。その差は、なるべく小さいことが好ましい。
 ステップ221でErased/Youngブロックがないと判定された場合(ステップ221:NO)、論理ブロック交換処理を実行する(ステップ300)。論理ブロック交換処理の詳細については後述するが、「論理ブロック交換処理」とは、なるべくYoungなErasedブロックを用意する処理である。コントローラ102は、論理ブロック交換処理によって作られたErasedブロックを選択し(ステップ231)、選択されたErasedブロックに、ターゲットブロック内のデータをコピーする(ステップ223)。
 以上で、リクラメーション処理の説明を終える。
 図16は、論理ブロックグループ調整処理の流れ一例を示すフローチャートである。
 論理ブロックグループ調整処理は、前述したように、リクラメーション処理の中で実行される。
 まず、コントローラ102は、フラッシュメモリ装置100内の全ての論理ブロックの消去頻度の平均値を求める(ステップ240)。ここで、消去頻度の平均値を「AVE_EF」(Average Erase Frequency)と表記する。論理ブロック分類閾値カウンタ166の値が、AVE_EFに更新される。
 次に、コントローラ102は、論理ブロックテーブル161を参照し、最初の論理ブロックを選択する(ステップ241)。
 次に、コントローラ102は、選択した論理ブロックの消去頻度163がAVE_EFよりも低いか否かを判定する(ステップ242)。
 ステップ242の判定の結果が肯定的であれば(消去頻度163がAVE_EFよりも低いと判定された場合)(ステップ242:YES)、コントローラ102は、ステップ241で選択した論理ブロックが割り当てられている物理ブロックをColdブロックグループテーブルに登録する(ステップ243)。
 一方、ステップ242の判定の結果が否定的であれば(消去頻度163がAVE_EF以上と判定された場合)(ステップ242:NO)コントローラ102は、ステップ241で選択した論理ブロックが割り当てられている物理ブロックを、Hotブロックグループテーブルに登録する(ステップ244)。
 ステップ243又は244の後、コントローラ102は、論理ブロックテーブル161、物理ブロックテーブル151及びマッピングテーブル140をそれぞれ最新の状態に更新する(ステップ210、Process Aと表記)。
 次に、コントローラ102は、ステップ241で選択した論理ブロックの割り当て時刻情報165をリセットする(ステップ245)。
 コントローラ102は、以上の処理を全ての論理ブロックに対して実施したか判定する(ステップ246)。未実施の論理ブロックがあれば(ステップ246:NO)、コントローラ102は、論理ブロックテーブル161上の次の論理ブロックを選択し(ステップ247)、ステップ242からの処理を、その選択された論理ブロックについて実施する。全ての論理ブロックに対して実施した場合は(ステップ246:YES)、論理ブロックグループ調整処理が終了する。
 なお、論理ブロックグループ調整処理は、全論理ブロックに対して比較や分類といった処理を実施するため、計算量の多い処理である。このため、本処理は、必ずしもリクラメーション処理の都度に行われなくても良い。例えば、リクラメーション処理において、ステップ229(論理ブロックグループ調整処理)の前に、ステップ229の処理が必要か否か判断され、必要と判断された場合に、ステップ229が行われても良い。ステップ229が必要と判断されるケースとして、例えば、論理ブロック分類閾値カウンタ166の値を変更する必要があると判断されるケースが考えられる。論理ブロック分類閾値カウンタ166の値を変更する必要があると判断されるケースとして、例えば、全論理ブロックにおける各種論理ブロックの比率が所定の閾値を低下又は超えるケースが考えられる。具体的には、例えば、全論理ブロックに対するHotブロック(又はColdブロック)の比率が第1の閾値より低くなった(又は、第1の閾値以上の閾値である第2の閾値を超えた)場合に、論理ブロックグループ調整処理が実行される。
 論理ブロックグループ調整処理は、1日に1回など定期的に実施されてもよい。なお、フラッシュメモリ装置100の初期状態では、論理ブロックは全てColdブロック(あるいは全てHotブロック)として管理しておき、消去頻度の増加に応じて、各論理ブロックがColdであるかHotであるかが適宜修正されても良い。
 図17は、物理ブロックグループ調整処理の流れの一例を示すフローチャートである。
 物理ブロックグループ調整処理は、前述したように、リクラメーション処理の中で実行される。
 まず、コントローラ102は、フラッシュメモリ装置100内の全ての物理ブロックの消去回数の平均値を計算する(ステップ250)。これは、物理ブロック管理情報150内の総消去回数158を、物理ブロックの総数で除算することで、算出される。ここで算出された消去回数の平均値を、「AVE_EC」(Average Erase Cycle)と表記する。
 次に、コントローラ102は、物理ブロック分類閾値カウンタ156の値がAVE_ECよりも大きいか否かを判定する(ステップ251)。
 ステップ251の判定の結果が肯定的の場合(ステップ251:YES)、コントローラ102は、物理ブロックグループ調整処理が終了となる。
 一方、ステップ251の判定の結果が否定的の場合(物理ブロック分類閾値カウンタ156の値がAVE_EC以下の場合)(ステップ251:NO)、コントローラ102は、物理ブロック分類閾値カウンタ156の値を増加させる(ステップ252)。具体的には、例えば、物理ブロック分類閾値カウンタ156に、物理ブロックの平均消去回数の増加分に応じた値が加算される。OldとYoungを正しく分類するためである。より具体的には、例えば、AVE_ECがNだとすれば、更新後の物理ブロック分類閾値カウンタ156の値もNとすればよい。
 図18は、論理ブロック交換処理の流れの一例を示すフローチャートである。
 論理ブロック交換処理も、前述したように、リクラメーション処理の中で実行される。本処理の目的は、なるべくYoungなErasedブロックを作り出すことである。
 まず、コントローラ102は、Coldブロックグループテーブルに属する物理ブロックのうち、最も低い消去回数レベル180に属する物理ブロックを探索する。最も低い消去回数レベルに属するColdブロックが無かった場合、コントローラ102は、次に低い消去回数レベルに属する物理ブロックを探索する。物理ブロックが見つかるまでこれが繰り返えされる。ここで、見つかった物理ブロックを「ブロックA」と表記する(ステップ301)。或る程度の幅を持たせた消去回数で物理ブロックを分類しているため、ブロックAは必ずしも消去回数が最少であるとは限らないが、比較的消去回数の少ない物理ブロックが、少ない探索処理で見つけることが期待できる。なお、前述したように、Coldブロックグループテーブルの構造は、リスト形式以外の構造であっても良い。
 次に、コントローラ102は、空きブロックグループテーブルに属する物理ブロックのうち、最も高い消去回数レベル180に属する空きブロックを1個選択する。ここで選択された空きブロックを「ブロックB」と表記する(ステップ302)。
 次に、コントローラ102は、ブロックA内のデータをブロックBにコピーする(ステップ303)。
 データがコピーされたら、コントローラ102は、論理ブロックテーブル161、物理ブロックテーブル151及びマッピングテーブル140をそれぞれ最新の状態に更新する(ステップ210、Process Aと表記)。
 次に、コントローラ102は、ブロックAを消去し、ブロックAの消去回数カウンタ153を1インクリメントする(ステップ304)。
 次に、コントローラ102は、ブロックAを空きブロックグループテーブルに登録する(ステップ305)。
 次に、コントローラ102は、再度、Process Aを実行し(ステップ210)、物理ブロックグループ調整処理(図16参照)を実行する(ステップ229)。
 以上で、論理ブロック交換処理が終了する。以上の手順に従うことで、なるべくYoungなErasedブロックが用意されると共に、消去頻度の低い論理ブロックが消去回数の多い物理ブロックに割り当てられ、消去回数平準化の一助となる。なお、リクラメーション処理及び論理ブロック交換処理において、物理ブロックグループ調整処理の前に、物理ブロックグループ調整処理を行う必要があるか否かが判断され、必要が有ると判断された場合に、物理ブロックグループ調整処理が行われても良い。
 以下、本発明の第2の実施例を説明する。なお、以下の説明では、第1の実施例との相違点を主に説明し、実施例1との共通点については説明を簡略或いは省略する。
 第2の実施例では、第1の実施例と比べ、物理ブロック管理情報及び論理ブロックの分類方法が異なる。具体的には、第2の実施例では、第1の実施例で用いた物理ブロック管理情報に加えて、フラッシュメモリ装置の保証期間を表す情報が必要になる。また、第1の実施例では、論理ブロックが、消去頻度の平均値に応じてHotブロックグループおよびColdブロックグループに分類されたが、第2の実施例では、論理ブロックは、消去頻度が予め設定された許容消去頻度以上か否かに応じて分類される。ここで、「許容消去頻度」とは、消去頻度の閾値の一種であって、例えば、物理ブロックの消去可能回数(上限)をフラッシュメモリ装置の保証期間で除算することで算出された数値である。
 図19は、第2の実施例における物理ブロック管理情報の一例を示す図である。
 物理ブロック管理情報600には、フラッシュメモリ装置の保証期間601が含まれている。ここで、保証期間601とは、現時点からの、フラッシュメモリ装置の残りの保証期間を示している。このため、時間の進行に伴い、保証期間601は適宜更新される。なお、図19の例によれば、保証期間601は、残りの年数であるが、期間を示す情報であればどのような情報でも良い。例えば、保証期間601は、保証期間の終了時点の日時を表す情報であっても良い。
 図20は、第2の実施例における論理ブロックグループ調整処理の流れの一例を示すフローチャートである。
 まず、コントローラ102は、フラッシュメモリ装置の保証期間601と物理ブロックの消去可能回数とを基に許容消去頻度を計算する(ステップ401)。ここで、許容消去頻度を「AEF」(Allowable Erase Frequency)と表記する。例えば、各物理ブロックの消去可能回数(消去回数の上限)が10000回で、フラッシュメモリ装置の残りの保証期間が5年だとすると、AEFは、10000回/5年=2000回/年となる。
 次に、コントローラ102は、論理ブロックテーブル161を参照し、最初のブロックを選択する(ステップ402)。
 次に、コントローラ102は、ステップ402で選択した論理ブロックの消去頻度163がAEFより低いか否かを判定する(ステップ403)。
 ステップ402の判定の結果が肯定的であれば(消去頻度163がAEFよりも低いと判定された場合)、コントローラ102は、ステップ402で選択した論理ブロックに割り当てられている物理ブロックをColdブロックグループテーブルに登録する(ステップ404)。
 一方、ステップ402の判定の結果が否定的であれば(消去頻度163がAEF以上と判定された場合)、コントローラ102は、ステップ402で選択した論理ブロックに割り当てられている物理ブロックをHotブロックグループテーブルに登録する(ステップ405)。
 ステップ404又は405の後、コントローラ102は、論理ブロックテーブル161、物理ブロックテーブル151及びマッピングテーブル140をそれぞれ最新の状態に更新する(ステップ210、Process Aと表記)。
 次に、コントローラ102は、ステップ402で選択した論理ブロックの割り当て時刻情報165をリセットする(ステップ406)。
 コントローラ102は、以上の処理を全ての論理ブロックに対して実施したか判定する(ステップ407)。未実施の論理ブロックがあれば(ステップ407:NO)、コントローラ102は、論理ブロックテーブル161上の次の論理ブロックを選択し(ステップ408)、ステップ403からの処理を、その選択された論理ブロックについて実施する。全ての論理ブロックに対して実施した場合は(ステップ407:YES)、論理ブロックグループ調整処理が終了する。
 以下、第3の実施例を、図21乃至図22を用いて説明する。
 図21は、第3の実施例に係るフラッシュメモリ装置の一例を示すブロック図である。
 第3の実施例では、フラッシュメモリ装置501は、複数のストレージドライブ(フラッシュドライブ)505を備えたストレージシステムである。第3の実施例では、ストレージシステムのコントローラ(ストレージコントローラ)504が、ウェアレベリングを実施する。具体的には、例えば、ストレージコントローラ504が、図15~図18の処理を実行することができる。ストレージコントローラ504は、図16の処理に代えて、図20の処理を実行しても良い。
 複数のストレージドライブ505を基に一又は複数のRAID(Redundant Array of Independent (or Inexpensive) Disks)グループが構成されている。ストレージコントローラ504は、ホスト10に提供する論理ユニットを管理している。ストレージコントローラ504は、ホスト10からのライト/リード要求に応答して、アクセス先の記憶領域を特定し、特定した記憶領域のアドレスを指定したライト/リードコマンドを、特定した記憶領域の基になっているRAIDグループに属する各ストレージドライブ505に送信する。論理ユニットは、Thin Provisioning技術に従う論理ユニットでも良い。この場合、論理ユニットは、複数の仮想チャンクで構成され、ストレージコントローラ504は、複数の実チャンクを管理する。実チャンクは、RAIDグループを構成する複数のストレージドライブ505に基づいている。ストレージコントローラ504は、
(1)ホスト10からのライト要求に応答して、ライト先の仮想チャンクに実チャンクが割り当てられているか否かを判断する、
(2)(1)の判断の結果が否定的であれば、ライト先の仮想チャンクに未割当ての実チャンクを割り当てる、
(3)(2)で割り当てた実チャンクに、ライト対象のデータを書き込む、
を行う。(3)では、ストレージコントローラ504は、ライト先の実チャンクに基づく各ストレージドライブ505に、データのライトコマンドを送信する。
 ちなみに、ストレージシステム501には、上位装置の一種でありI/O(Input/Output)要求を発行するホスト10や、ストレージシステム501を管理する計算機である管理サーバ503が接続されている。ストレージコントローラ504は、ホスト10からデータを授受する一つ以上のホストアダプタ509と、管理サーバ503と通信する一つ以上の管理ポート510と、ストレージシステム501の制御を行う一つ以上のマイクロプロセッサ(以下、MPと表記)506と、制御を行うためのデータおよびプログラムを保持する制御メモリ507と、データをキャッシュするためのメモリであるキャッシュメモリ508とを有する。また、ストレージコントローラ504は、ストレージドライブ505、キャッシュメモリ508、ホストアダプタ509及びMP506などを相互に接続する内部ネットワーク511を有する。制御メモリ507とキャッシュメモリ508は同一のメモリとしてもよい。内部ネットワーク511には、一つ以上ハードディスクドライブ(HDD)514が接続されてもよい。つまり、ストレージシステム501には、フラッシュドライブとHDDとが混在しても良い。フラッシュドライブはSSD(Solid State Drive)であっても良い。HDDは無くても良い。
 制御メモリ507は、例えば、各論理ユニットを管理する論理ユニット管理情報512と、既に説明したフラッシュメモリ管理情報105とを記憶する。フラッシュメモリ管理情報105は、例えば、ストレージシステム501内のストレージドライブ505と同一数あればよい。
 図22は、第3の実施例におけるストレージドライブ505の構成例を示すブロック図である。
 ストレージドライブ505は、第1の実施例(及び第2の実施例)とは異なり、フラッシュメモリ管理情報105を持たない。このため、コントローラ2202は、ウェアレベリングを行わず、ストレージコントローラ504からのライト/リードコマンドに応答してライト処理/リード処理を行う。
 第3の実施例においてウェアレベリング処理を実施する部位は、ストレージコントローラ504であり、ウェアレベリング処理の対象となるのは、各々のストレージドライブ505内のブロックである。つまり、ストレージコントローラ504は、ストレージドライブ505内のブロックに関する情報を把握する必要がある。そこで、ストレージドライブ505は、フラッシュメモリ管理情報105を持たなくてよく、ストレージコントローラ504が、ストレージドライブ505毎のフラッシュメモリ管理情報105を持つ。
 第4の実施例は、第1の実施例と比べ、フラッシュチップを有するフラッシュメモリ装置はホスト10内部の記憶デバイスとして取り込まれている点が異なる。以下、第4の実施例について、図23を用いて説明する。
 図23は、第4の実施例におけるホスト700の構成例を示すブロック図である。
 ホスト700は、ホスト700の制御を行うCPU701と、制御を行うためのデータ及びOSなどのプログラムが格納されているメインメモリ702と、ホスト10コンピュータ700を構成する内部部品を接続するチップセット703とを有する。また、ホスト700は、グラフィック制御を行うグラフィックコントローラ704と、データを格納するHDD514と、マウスやキーボードやディスプレイなどによる入出力を制御するヒューマンインターフェースデバイス706とを有する。さらに、ホスト700は、ネットワーク接続を制御するためのLANコントローラ707と、フラッシュメモリを利用しATAやSASのようなディスクインターフェースを持ったストレージドライブ708と、フラッシュメモリを利用しPCIインターフェースを持ったストレージドライブ709とを有する。なお、チップセット703は、例えばPCIインターフェース、USBインターフェース、ネットワークインタフェースなどの各種インターフェース接続を実現するためのポートやコネクタを装備しているものとする。
 ここで、ストレージドライブ708は、第1~第3のいずれかの実施例におけるストレージドライブと同じものであって良い。ストレージドライブ709は、ストレージドライブ708が有するインターフェースと異なり、PCIインターフェースを有するが、それ以外の点は同じであってよい。
 第4の実施例において、ストレージドライブ708又は709が、ウェアレベリングに必要なフラッシュメモリ管理情報105を持つ場合は、ストレージドライブ708又はストレージドライブ709内のコントローラが、ウェアレベリングを実施すればよい。
 第4の実施例において、ストレージドライブ708又は709が、ウェアレベリングに必要なフラッシュメモリ管理情報105を持たない場合は、例えば、メインメモリ702がフラッシュメモリ管理情報105を格納し、CPU701が、ウェアレベリングを実施すればよい。
 以上、本発明の幾つかの実施例を説明したが、これらは本発明の説明のための例示であって、本発明の範囲をこれらの実施例にのみ限定する趣旨ではない。本発明は、他の種々の形態でも実施することが可能である。
10:ホストコンピュータ
100:フラッシュメモリ装置
101:ホストインタフェースポート
102:コントローラ
103:フラッシュメモリチップ
104:メインメモリ
105:フラッシュメモリ管理情報
106:バッファ
110:ブロック
111:データ領域
112:更新領域
113:ページ
120:論理ブロック空間
121:論理ブロック
122:物理ブロック空間
123:割り当て済みブロック
124:空きブロック
125:不良ブロック
130:物理ブロックグループA
131:物理ブロックグループB
132:論理ブロックグループA
133:論理ブロックグループB
140:マッピングテーブル
141:チップ番号
142:物理ブロック番号
150:物理ブロック管理情報
151:物理ブロックテーブル
152:空きフラグ
153:消去回数カウンタ
154:前方ポインタ
155:後方ポインタ
156:物理ブロック分類閾値カウンタ
157:ページマッピングテーブル
158:総消去回数カウンタ
160:論理ブロック管理情報
161:論理ブロックテーブル
162:論理ブロック番号
163:消去頻度
164:論理ブロック分類フラグ
165:割当時刻
166:論理ブロック分類閾値カウンタ
170:空きブロックテーブル
180:消去回数レベル番号
600:物理ブロック管理情報
601:保証期間
501:ストレージシステム
503:管理サーバ
504:ストレージコントローラ
505:記憶装置
506:MP(Micro Processor)
507:制御メモリ
508:キャッシュメモリ
509:ホストアダプタ
510:管理ポート
511:内部ネットワーク
512:論理ユニット管理情報
514:HDD(Hard Disk Drive)
701:CPU
702:メインメモリ
703:チップセット
704:グラフィックコントローラ
706:ヒューマンインターフェースデバイス
707:LANコントローラ
708:記憶装置
709:記憶装置
2202:コントローラ

Claims (10)

  1.  論理ブロックに割り当てられている一以上の物理ブロックに対して消去処理を行うことなくその一以上の物理ブロックにデータを複数回書き込むことが可能なフラッシュメモリ装置であって、
     複数の物理ブロックを有する複数のフラッシュメモリチップ(103)と、
     ホスト(10、701)に提供される論理ブロック空間を構成する複数の論理ブロックのうちの或る論理ブロックを前記複数の物理ブロックのうちの或る一以上の物理ブロックに割り当てるコントローラ(102、504、701)と
    を備え、
     前記コントローラが、
    (A)各物理ブロックの消去回数と各論理ブロックの消去頻度とを管理しており、一以上の物理ブロックに対して消去処理を行った場合に、その一以上の物理ブロックの消去回数と、その一以上の物理ブロックに割り当てられていた論理ブロックの消去頻度とを更新し;
    (B)消去頻度閾値以上の消去頻度の論理ブロックを、消去回数閾値より低い一以上の物理ブロックに割り当てる、
    フラッシュメモリ装置。
  2.  請求項1記載のフラッシュメモリ装置において、
     前記コントローラは、一以上のターゲットブロックが有する空き領域のサイズが、そのライトコマンドの対象のデータのサイズよりも小さい場合に、リクラメーション処理を実行し、
     前記一以上のターゲットブロックは、ライト先論理ブロックが割り当てられている一以上の物理ブロックであり、
     前記ライト先論理ブロックは、前記ホストからのライトコマンドで指定されているアドレスを有する論理ブロックであり、
     前記コントローラは、前記リクラメーション処理において、
    (a)前記ライト先論理ブロックの消去頻度が前記消去頻度閾値以上であり、且つ、前記ターゲットブロックの消去回数が前記消去回数閾値以上であるか否かを判断し、
    (b)前記(a)の判断の結果が肯定的であれば、前記ライト先論理ブロックの割当先として、論理ブロックの割当先となり得る状態の物理ブロックである複数の空きブロックのうちの、前記消去回数閾値より低い一以上の空きブロックを選択し、一方、前記(a)の判断の結果が否定的であれば、前記複数の空きブロックのうちの、前記ターゲットブロックの消去回数が属する消去回数レベルと同じかそれになるべく近い消去回数レベルに該当する消去回数の空きブロックを選択し、
    (c)前記ターゲットブロック内の各記憶領域についての最新のデータを、前記(b)で選択した空きブロックにコピーし、そのコピー先の空きブロックに、前記ライト先論理ブロックを割り当て、
    (d)前記ターゲットブロックに対して消去処理を行い、それに伴い、前記ターゲットブロックの消去回数を更新し、且つ、前記ライト先論理ブロックの消去頻度を更新し、
    (e)前記ターゲットブロックを空きブロックとして管理し、
    (f)前記消去回数閾値が前記複数の物理ブロックの消去回数の平均値以下であれば、前記消去回数閾値を増加し、
    (g)前記消去頻度閾値を前記複数の論理ブロックの消去頻度の平均値に更新する、
    フラッシュメモリ装置。
  3.  請求項2記載のフラッシュメモリ装置において、
     前記複数のフラッシュメモリチップが複数のフラッシュドライブに含まれており、
     前記複数のフラッシュドライブに基づいて一以上のRAIDグループが構成されており、
     前記コントローラは、論理ユニットを管理し、前記ホストから、前記論理ユニットを指定したアクセス要求を受け付け、そのアクセス要求で指定されているアドレスを基に、前記論理ユニットに関する記憶領域を特定し、特定した記憶領域の基になっているRAIDグループを構成する各フラッシュドライブに、アクセスコマンドを送信し、
     前記コントローラが、前記複数のフラッシュドライブのそれぞれについて、前記リクラメーション処理を行う、
    フラッシュメモリ装置。
  4.  請求項2又は3記載のフラッシュメモリ装置において、
     前記コントローラは、前記消去頻度閾値未満の消去頻度の論理ブロックに割り当てられている物理ブロックが関連付けられる情報であるコールドブロック管理情報と、前記消去頻度閾値以上の消去頻度の論理ブロックに割り当てられている物理ブロックが関連付けられる情報であるホットブロック管理情報とを記憶しており、
     前記コントローラは、前記(g)の処理の前に、前記ライト先論理ブロックの消去頻度が前記消去頻度閾値以上であれば、前記(c)でのコピー先の物理ブロックを、前記ホットブロック情報に関連付け、前記ライト先論理ブロックの消去頻度が前記消去頻度閾値未満であれば、前記(c)でのコピー先の物理ブロックを、前記コールドブロック情報に関連付け、
     前記コントローラは、前記(g)において、前記更新後の消去頻度閾値未満の消去頻度の各論理ブロックに割り当てられている物理ブロックを、前記コールドブロック情報に関連付け、前記更新後の消去頻度閾値以上の消去頻度の各論理ブロックに割り当てられている物理ブロックを、前記ホットブロック情報に関連付ける、
    フラッシュメモリ装置。
  5.  請求項2乃至4のうちのいずれか1項に記載のフラッシュメモリ装置において、
     前記コントローラは、フラッシュメモリ装置の保証期間を表す情報を管理し、
     前記コントローラは、前記(g)において、前記消去頻度閾値を、前記複数の論理ブロックの消去頻度の平均値に代えて、許容消去頻度に更新し、
     前記許容消去頻度は、物理ブロックの消去回数上限を前記保証期間で除算することで算出された数値である、
    ストレージシステム。
  6.  請求項1記載のフラッシュメモリ装置において、
     前記コントローラは、前記(B)において、
    (B1)一以上のターゲットの物理ブロックに割り当てられているターゲットの論理ブロックの消去頻度が前記消去頻度閾値以上であり、且つ、前記ターゲットの物理ブロックの消去回数が前記消去回数閾値以上であるか否かを判断し、
    (B2)前記(B1)の判断の結果が肯定的であれば、前記ターゲットの論理ブロックの割当先として、論理ブロックの割当先となり得る状態の物理ブロックである複数の空きブロックのうちの、前記消去回数閾値より低い一以上の空きブロックを選択し、一方、前記(B1)の判断の結果が否定的であれば、前記複数の空きブロックのうちの、前記ターゲットブロックの消去回数が属する消去回数レベルと同じかそれになるべく近い消去回数レベルに該当する消去回数の空きブロックを選択し、
    (B3)前記ターゲットの物理ブロック内の各記憶領域についての最新のデータを、前記(B2)で選択した空きブロックにコピーし、そのコピー先の空きブロックに、前記ターゲットの論理ブロックを割り当てる、
    フラッシュメモリ装置。
  7.  請求項6記載のフラッシュメモリ装置において、
     前記コントローラは、一以上のターゲットブロックが有する空き領域のサイズが、そのライトコマンドの対象のデータのサイズよりも小さい場合に、リクラメーション処理を実行し、
     前記一以上のターゲットブロックは、ライト先論理ブロックが割り当てられている一以上の物理ブロックであり、
     前記ライト先論理ブロックは、前記ホストからのライトコマンドで指定されているアドレスを有する論理ブロックであり、
     前記コントローラは、前記リクラメーション処理において、前記(B1)を行う、
    フラッシュメモリ装置。
  8.  請求項1、6又は7記載のフラッシュメモリ装置において、
     前記消去頻度閾値は、前記複数の論理ブロックの消去頻度の統計に基づく値である、
    フラッシュメモリ装置。
  9.  請求項1、6又は7記載のフラッシュメモリ装置において、
     前記消去頻度閾値は、物理ブロックの消去回数上限をフラッシュメモリ装置の保証期間で除算することで算出された数値である、
    フラッシュメモリ装置。
  10.  請求項1、6乃至9のうちのいずれ1項に記載のフラッシュメモリ装置において、
     前記複数のフラッシュメモリチップが複数のフラッシュドライブに含まれており、
     前記複数のフラッシュドライブに基づいて一以上のRAIDグループが構成されており、
     前記コントローラは、論理ユニットを管理し、前記ホストから、前記論理ユニットを指定したアクセス要求を受け付け、そのアクセス要求で指定されているアドレスを基に、前記論理ユニットに関する記憶領域を特定し、特定した記憶領域の基になっているRAIDグループを構成する各フラッシュドライブに、アクセスコマンドを送信する、
    フラッシュメモリ装置。
PCT/JP2009/003470 2009-07-23 2009-07-23 フラッシュメモリ装置 WO2011010348A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2009/003470 WO2011010348A1 (ja) 2009-07-23 2009-07-23 フラッシュメモリ装置
US12/668,755 US8447915B2 (en) 2009-07-23 2009-07-23 Flash memory device for allocating physical blocks to logical blocks based on an erase count

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2009/003470 WO2011010348A1 (ja) 2009-07-23 2009-07-23 フラッシュメモリ装置

Publications (1)

Publication Number Publication Date
WO2011010348A1 true WO2011010348A1 (ja) 2011-01-27

Family

ID=43498838

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/003470 WO2011010348A1 (ja) 2009-07-23 2009-07-23 フラッシュメモリ装置

Country Status (2)

Country Link
US (1) US8447915B2 (ja)
WO (1) WO2011010348A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015069542A (ja) * 2013-09-30 2015-04-13 ラピスセミコンダクタ株式会社 半導体装置及び半導体メモリにおける消去回数の検索方法
JP2016507830A (ja) * 2013-02-22 2016-03-10 ▲ホア▼▲ウェイ▼技術有限公司Huawei Technologies Co.,Ltd. メモリ回収方法および装置
US10528461B2 (en) 2014-08-04 2020-01-07 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Controlling wear among flash memory devices based on remaining warranty

Families Citing this family (45)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI427476B (zh) * 2009-02-24 2014-02-21 Silicon Motion Inc 快閃記憶體的存取方法及快閃記憶體裝置
TWI450271B (zh) * 2009-09-02 2014-08-21 Silicon Motion Inc 用來管理一快閃記憶體的複數個區塊之方法以及相關之記憶裝置及其控制器
US8402217B2 (en) 2009-09-15 2013-03-19 Marvell International Ltd. Implementing RAID in solid state memory
US8988800B1 (en) 2009-09-15 2015-03-24 Marvell International Ltd. Error correction for storage devices
TW201115582A (en) * 2009-10-29 2011-05-01 Acer Inc Method for determining data correlation and data processing method for memory
JP2011203916A (ja) * 2010-03-25 2011-10-13 Toshiba Corp メモリコントローラ、および半導体記憶装置
US9183134B2 (en) * 2010-04-22 2015-11-10 Seagate Technology Llc Data segregation in a storage device
US20120023144A1 (en) * 2010-07-21 2012-01-26 Seagate Technology Llc Managing Wear in Flash Memory
TWI417721B (zh) * 2010-11-26 2013-12-01 Etron Technology Inc 衰減熱資料之方法
JP5609683B2 (ja) * 2011-01-31 2014-10-22 ソニー株式会社 メモリ装置およびメモリシステム
JP2012203443A (ja) * 2011-03-23 2012-10-22 Toshiba Corp メモリシステムおよびメモリシステムの制御方法
US20120303878A1 (en) * 2011-05-26 2012-11-29 International Business Machines Corporation Method and Controller for Identifying a Unit in a Solid State Memory Device for Writing Data to
US9405670B2 (en) * 2011-06-09 2016-08-02 Tsinghua University Wear leveling method and apparatus
KR101832934B1 (ko) 2012-01-27 2018-02-28 삼성전자주식회사 비휘발성 메모리 장치, 그것을 포함하는 메모리 시스템, 그것의 블록 관리 방법, 프로그램 방법 및 소거 방법
EP2811412A4 (en) * 2012-06-25 2016-03-09 Hitachi Ltd COMPUTER SYSTEM AND METHOD FOR MIGRATION OF APPLICATION PROGRAM EXECUTION ENVIRONMENT
KR20140038110A (ko) * 2012-09-20 2014-03-28 한국전자통신연구원 파일 시스템 관리 방법 및 이를 이용하는 장치
US9201786B2 (en) * 2012-12-21 2015-12-01 Kabushiki Kaisha Toshiba Memory controller and memory system
US20140181430A1 (en) * 2012-12-26 2014-06-26 Unisys Corporation Equalizing wear on storage devices through file system controls
KR20140096875A (ko) * 2013-01-29 2014-08-06 삼성전자주식회사 메모리 시스템의 및 그것의 블록 관리 방법
US9747202B1 (en) * 2013-03-14 2017-08-29 Sandisk Technologies Llc Storage module and method for identifying hot and cold data
KR102023351B1 (ko) * 2013-03-19 2019-11-04 삼성전자 주식회사 저장 장치 내 할당 촉진을 위한 데이터 분석 방법 및 장치
US9632926B1 (en) * 2013-05-16 2017-04-25 Western Digital Technologies, Inc. Memory unit assignment and selection for internal memory operations in data storage systems
US20150032956A1 (en) * 2013-07-29 2015-01-29 CNEXLABS, Inc. Method and Apparatus for Enhancing Storage Reliability Using Double Link Redundancy Protection
TWI529719B (zh) * 2013-08-30 2016-04-11 慧榮科技股份有限公司 資料儲存裝置以及快閃記憶體控制方法
TWI517165B (zh) * 2014-03-31 2016-01-11 群聯電子股份有限公司 資料寫入方法、記憶體控制電路單元與記憶體儲存裝置
CN104978149A (zh) * 2014-04-11 2015-10-14 群联电子股份有限公司 数据写入方法、存储器控制电路单元与存储器存储装置
US9431052B2 (en) 2014-06-26 2016-08-30 Marvell World Trade Ltd. Two dimensional magnetic recording systems, devices and methods
CN104156317A (zh) * 2014-08-08 2014-11-19 浪潮(北京)电子信息产业有限公司 一种非易失性闪存的擦写管理方法及系统
US10198318B2 (en) * 2014-10-27 2019-02-05 Hitachi, Ltd. Storage apparatus having nonvolatile memory device, and nonvolatile memory device
CN105980992B (zh) * 2014-12-05 2018-02-13 华为技术有限公司 一种存储系统、识别数据块稳定性的方法以及装置
US10241909B2 (en) 2015-02-27 2019-03-26 Hitachi, Ltd. Non-volatile memory device
JP6414852B2 (ja) * 2015-12-14 2018-10-31 東芝メモリ株式会社 メモリシステムおよび制御方法
CN107301015B (zh) * 2016-04-15 2022-05-13 恩智浦美国有限公司 用于减少存储器设备上的压力的系统和方法
KR102601211B1 (ko) 2016-06-01 2023-11-10 삼성전자주식회사 빠른 재사용 메모리 블록 검출 방법 및 이를 이용한 메모리 블록 관리 방법
CN106201346B (zh) * 2016-06-30 2019-06-25 联想(北京)有限公司 一种数据处理方法及存储设备
US10613988B2 (en) * 2016-09-28 2020-04-07 Micro Focus Llc Purging storage partitions of databases
US10254981B2 (en) * 2016-12-12 2019-04-09 International Business Machines Corporation Adaptive health grading for a non-volatile memory
JP2018142240A (ja) * 2017-02-28 2018-09-13 東芝メモリ株式会社 メモリシステム
EP3588305A4 (en) * 2017-04-07 2020-04-01 Panasonic Intellectual Property Management Co., Ltd. NON-VOLATILE STORAGE WITH INCREASED NUMBER OF USEFUL TIMES
KR20190069806A (ko) * 2017-12-12 2019-06-20 에스케이하이닉스 주식회사 메모리 시스템 및 메모리 시스템의 동작 방법
US11055002B2 (en) * 2018-06-11 2021-07-06 Western Digital Technologies, Inc. Placement of host data based on data characteristics
KR20210039872A (ko) 2019-10-02 2021-04-12 삼성전자주식회사 프리 블록의 할당을 관리하는 호스트 시스템, 이를 포함하는 데이터 처리 시스템 및 호스트 시스템의 동작방법
US11442631B2 (en) * 2019-12-26 2022-09-13 Micron Technology, Inc. Memory operations with consideration for wear leveling
US10978097B1 (en) 2020-01-16 2021-04-13 International Business Machines Corporation Indicating tracks as erased without deleting data for the tracks
JP2023045035A (ja) * 2021-09-21 2023-04-03 キオクシア株式会社 メモリシステム

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0816482A (ja) * 1994-06-29 1996-01-19 Hitachi Ltd フラッシュメモリを用いた記憶装置およびその記憶制御方法
JP2008146254A (ja) * 2006-12-07 2008-06-26 Sony Corp 記憶装置およびコンピュータシステム、並びに記憶装置のデータ処理方法
JP2008204041A (ja) * 2007-02-19 2008-09-04 Hitachi Ltd ストレージ装置及びデータ配置制御方法

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3938208B2 (ja) * 1991-11-28 2007-06-27 株式会社日立製作所 フラッシュメモリを備えた情報機器
DE19540915A1 (de) * 1994-11-10 1996-05-15 Raymond Engineering Redundante Anordnung von Festkörper-Speicherbausteinen
US7035967B2 (en) * 2002-10-28 2006-04-25 Sandisk Corporation Maintaining an average erase count in a non-volatile storage system
JP4863749B2 (ja) * 2006-03-29 2012-01-25 株式会社日立製作所 フラッシュメモリを用いた記憶装置、その消去回数平準化方法、及び消去回数平準化プログラム
DE112006004187B4 (de) * 2006-12-27 2015-09-10 Intel Corporation Verfahren, nicht-flüchtige Speichervorrichtung und Computersystem zum initiativen Abnutzungsausgleich für einen nicht-flüchtigen Speicher
JP2009003880A (ja) * 2007-06-25 2009-01-08 Toshiba Corp 不揮発性メモリの制御装置及びその制御方法及び記憶装置
US7908423B2 (en) * 2007-07-25 2011-03-15 Silicon Motion, Inc. Memory apparatus, and method of averagely using blocks of a flash memory
JP5087347B2 (ja) 2007-09-06 2012-12-05 株式会社日立製作所 半導体記憶装置及び半導体記憶装置の制御方法
WO2009068074A1 (de) * 2007-11-26 2009-06-04 Hyperstone Gmbh VERFAHREN ZUR GLEICHMÄßIGEN NUTZUNG MEHRERER FLASHSPEICHERCHIPS
US8275928B2 (en) * 2008-05-15 2012-09-25 Silicon Motion, Inc. Memory module and method for performing wear-leveling of memory module using remapping, link, and spare area tables
US8065469B2 (en) * 2009-04-20 2011-11-22 Imation Corp. Static wear leveling
US7936610B1 (en) * 2009-08-03 2011-05-03 Micron Technology, Inc. Selective refresh of single bit memory cells

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0816482A (ja) * 1994-06-29 1996-01-19 Hitachi Ltd フラッシュメモリを用いた記憶装置およびその記憶制御方法
JP2008146254A (ja) * 2006-12-07 2008-06-26 Sony Corp 記憶装置およびコンピュータシステム、並びに記憶装置のデータ処理方法
JP2008204041A (ja) * 2007-02-19 2008-09-04 Hitachi Ltd ストレージ装置及びデータ配置制御方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016507830A (ja) * 2013-02-22 2016-03-10 ▲ホア▼▲ウェイ▼技術有限公司Huawei Technologies Co.,Ltd. メモリ回収方法および装置
JP2015069542A (ja) * 2013-09-30 2015-04-13 ラピスセミコンダクタ株式会社 半導体装置及び半導体メモリにおける消去回数の検索方法
US10528461B2 (en) 2014-08-04 2020-01-07 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Controlling wear among flash memory devices based on remaining warranty

Also Published As

Publication number Publication date
US8447915B2 (en) 2013-05-21
US20110191521A1 (en) 2011-08-04

Similar Documents

Publication Publication Date Title
WO2011010348A1 (ja) フラッシュメモリ装置
US11829617B2 (en) Virtual storage system
TWI644211B (zh) Memory system and control method for controlling non-volatile memory
US20180356984A1 (en) Memory system and method of controlling memory system
WO2017000658A1 (zh) 存储系统、存储管理装置、存储器、混合存储装置及存储管理方法
JP5907739B2 (ja) 不揮発性記憶装置
US9116622B2 (en) Storage system having nonvolatile semiconductor storage device with nonvolatile semiconductor memory
US8321639B2 (en) Command tracking for direct access block storage devices
TW201915742A (zh) 記憶體系統及控制非揮發性記憶體之控制方法
US11747989B2 (en) Memory system and method for controlling nonvolatile memory
WO2014102886A1 (en) Information processing apparatus and cache control method
WO2014141411A1 (ja) ストレージシステムおよびストレージシステム制御方法
US10049042B2 (en) Storage device, semiconductor memory device, and method for controlling same
US10120583B2 (en) Performance penalty avoidance for solid state drive
US11645006B2 (en) Read performance of memory devices
CN115458013A (zh) 存储装置及其操作方法
TWI826236B (zh) 記憶體系統及控制方法
WO2018041258A1 (zh) 去分配命令处理的方法与存储设备
WO2019026221A1 (ja) ストレージシステム及びストレージ制御方法
KR20210158043A (ko) 스트림 분류 번호에 따른 데이터 분류 스토리지 장치 및 그 동작 방법
US11068180B2 (en) System including non-volatile memory drive
JP6721765B2 (ja) メモリシステムおよび制御方法
JP6666405B2 (ja) メモリシステムおよび制御方法
WO2020052216A1 (zh) 一种系统垃圾回收方法和固态硬盘中的垃圾回收方法
WO2014141545A1 (ja) ストレージ制御装置、及びストレージ制御システム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 12668755

Country of ref document: US

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

Ref document number: 09847534

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09847534

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP