KR101791855B1 - Storage device and method of reclaiming space of the same - Google Patents
Storage device and method of reclaiming space of the same Download PDFInfo
- Publication number
- KR101791855B1 KR101791855B1 KR1020160035294A KR20160035294A KR101791855B1 KR 101791855 B1 KR101791855 B1 KR 101791855B1 KR 1020160035294 A KR1020160035294 A KR 1020160035294A KR 20160035294 A KR20160035294 A KR 20160035294A KR 101791855 B1 KR101791855 B1 KR 101791855B1
- Authority
- KR
- South Korea
- Prior art keywords
- data
- flash memory
- page
- valid data
- main data
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0253—Garbage collection, i.e. reclamation of unreferenced memory
- G06F12/0269—Incremental or concurrent garbage collection, e.g. in real-time systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1041—Resource optimization
- G06F2212/1044—Space efficiency improvement
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/72—Details relating to flash memory management
- G06F2212/7205—Cleaning, compaction, garbage collection, erase control
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
스토리지 장치의 공간 재수거 방법은, 플래시 메모리를 구비하고, 플래시 변환 레이어를 이용하여 상기 플래시 메모리를 제어하며, 호스트 장치와 인터액션을 수행하는 스토리지 장치에서 수행될 수 있다. 스토리지 장치의 공간 재수거 방법은, 상기 호스트 장치로부터 쓰기 요청을 수신하는 경우, 상기 쓰기 요청과 관련된 메인 데이터를 기록할 상기 플래시 메모리의 대상 페이지에 빈 공간이 존재하는지 여부를 판단하는 단계; 및 상기 대상 페이지에 상기 빈 공간이 존재하는 경우, 재사용 대상 블록에 존재하는 유효 데이터 및 상기 메인 데이터를 상기 대상 페이지에 기록하는 단계를 포함할 수 있다.A method for re-collecting space in a storage apparatus can be performed in a storage apparatus having a flash memory, controlling the flash memory using a flash conversion layer, and performing an interaction with a host apparatus. A method of reallocating space in a storage device includes the steps of: determining whether a blank space is present in a target page of the flash memory to record main data related to the write request, when receiving a write request from the host device; And recording the valid data and the main data existing in the reuse target block in the target page when the empty space exists in the target page.
Description
본 발명은 스토리지 시스템에 관한 것으로, 보다 상세하게는 스토리지 장치 및 이의 공간 재수거 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a storage system, and more particularly, to a storage apparatus and a method for re-collecting space thereof.
낸드 플래시 메모리(NAND flash memory device)는 저전력 및 빠른 접근 시간의 특징을 가지고 있어, 반도체 메모리 장치의 소형화 및 대용량을 위해 널리 사용되고 있다.NAND flash memory devices are widely used for miniaturization and large capacity of semiconductor memory devices because of their low power and fast access time.
한편, 낸드 플래시 메모리는 "덮어쓰기(overwrite)" 동작을 지원하지 않으므로, 낸드 플래시 메모리 장치에서의 데이터 갱신은 데이터 블록과 관련된 로그 블록에 유효 데이터를 프로그램하고, 이를 플래시 변환 레이어(flash translation layer, FTL)가 어드레스 맵핑하는 방식으로 수행된다. 유효 데이터는 여러 블록들에 분산되므로, 낸드 플래시 메모리는 유효 데이터(또는, 유효 데이터가 기록된 유효 페이지)를 병합하여 자유 블록을 확보하고, 낸드 플래시 메모리를 최적화하기 위한 공간 재수거 작업(또는, 가비지 컬렉션(garbage collection, GC) 작업)을 필요로 한다.On the other hand, since the NAND flash memory does not support an "overwrite " operation, updating data in the NAND flash memory device programs the valid data in a log block associated with the data block, FTL) are address-mapped. Since the valid data is distributed over a plurality of blocks, the NAND flash memory merges the valid data (or the valid page on which the valid data is written) to obtain a free block, and performs a space re-collection operation for optimizing the NAND flash memory Garbage collection (GC) operations).
다만, 낸드 플래시 메모리에 대한 공간 재수거 작업이 수행됨에 따른 시간 지연, 추가적인 데이터 전송 등으로 인하여, 낸드 플래시 메모리의 성능 및 수명이 저하될 수 있다.However, the performance and lifetime of the NAND flash memory may be deteriorated due to time delay and additional data transfer due to the space re-collection operation for the NAND flash memory.
본 발명의 일 목적은 플래시 메모리를 구비하는 스토리지 장치의 성능 및 수명을 향상시킬 수 있는 스토리지 장치의 공간 재수거 방법을 제공하는 것이다.SUMMARY OF THE INVENTION It is an object of the present invention to provide a method of re-collecting space in a storage apparatus capable of improving the performance and life span of a storage apparatus having a flash memory.
본 발명의 다른 목적은 스토리지 장치의 공간 재수거 방법을 수행하는 스토리지 장치를 제공하는 것이다.It is another object of the present invention to provide a storage apparatus that performs a method of re-collecting space of a storage apparatus.
본 발명의 일 목적을 달성하기 위하여, 본 발명의 실시예들에 따른 스토리지 장치의 공간 재수거 방법은, 플래시 메모리를 구비하고, 플래시 변환 레이어를 이용하여 상기 플래시 메모리를 제어하며, 호스트 장치와 인터액션을 수행하는 스토리지 장치에서, 상기 호스트 장치로부터 쓰기 요청을 수신하는 경우, 상기 쓰기 요청과 관련된 메인 데이터를 기록할 상기 플래시 메모리의 대상 페이지에 빈 공간이 존재하는지 여부를 판단하는 단계; 및 상기 대상 페이지에 상기 빈 공간이 존재하는 경우, 재사용 대상 블록에 존재하는 유효 데이터 및 상기 메인 데이터를 상기 대상 페이지에 기록하는 단계를 포함 할 수 있다. According to an aspect of the present invention, there is provided a method for re-collecting space in a storage apparatus, the method comprising: providing a flash memory; controlling the flash memory using a flash conversion layer; Determining whether a blank space is present in a target page of the flash memory to record main data related to the write request when receiving a write request from the host device; And recording the valid data and the main data existing in the reuse target block in the target page when the empty space exists in the target page.
일 실시예에 의하면, 상기 대상 페이지에 빈 공간이 존재하는지 여부를 판단하는 단계는, 상기 메인 데이터를 상기 플래시 메모리의 최소 기록 단위인 페이지에 기초하여 풀(full) 페이지 데이터 및 상기 부분 페이지 데이터로 구분하는 단계를 포함 할 수 있다. According to an embodiment of the present invention, the step of determining whether or not a blank space is present in the target page may include storing the main data into full page data and partial page data based on a page which is a minimum recording unit of the flash memory And < / RTI >
일 실시예에 의하면, 상기 유효 데이터 및 상기 메인 데이터를 상기 대상 페이지에 기록하는 단계는, 상기 스토리지 장치에 구비된 데이터 입출력 큐에 상기 유효 데이터가 있는지 여부를 판단하는 단계; 상기 유효 데이터가 상기 데이터 입출력 큐에 있는 경우, 상기 메인 데이터에 대한 제1 논리 블록 주소가 상기 유효 데이터의 제2 논리 블록 주소와 동일한지 여부를 판단하는 단계; 및 상기 제1 논리 블록 주소와 상기 제2 논리 블록 주소가 다른 경우, 상기 유효 데이터 및 상기 메인 데이터를 병합하는 단계를 포함 할 수 있다. According to an embodiment of the present invention, the step of recording the valid data and the main data in the target page may include: determining whether the valid data exists in a data input / output queue provided in the storage device; Determining whether a first logical block address for the main data is the same as a second logical block address of the valid data when the valid data is in the data input / output queue; And merging the valid data and the main data when the first logical block address and the second logical block address are different from each other.
일 실시예에 의하면, 상기 유효 데이터 및 상기 메인 데이터를 상기 대상 페이지에 기록하는 단계는, 상기 제1 논리 블록 주소와 상기 제2 논리 블록 주소가 동일한 경우, 상기 유효 데이터를 무효화 처리하는 단계를 더 포함 할 수 있다. According to another embodiment of the present invention, the step of writing the valid data and the main data in the target page may further include invalidating the valid data if the first logical block address is identical to the second logical block address .
본 발명의 다른 목적을 달성하기 위하여, 본 발명의 실시예들에 따른 스토리지 장치는, 플래시 메모리를 포함하고, 호스트 장치로부터 쓰기 요청을 수신하는 경우, 상기 쓰기 요청과 관련된 메인 데이터를 기록할 상기 플래시 메모리의 대상 페이지에 빈 공간이 존재하는지 여부를 판단하며, 상기 대상 페이지에 상기 빈 공간이 존재하는 경우, 재사용 대상 블록에 존재하는 유효 데이터 및 상기 메인 데이터를 상기 대상 페이지에 기록 할 수 있다. According to another aspect of the present invention, there is provided a storage apparatus including a flash memory, the storage apparatus including a flash memory for storing main data related to the write request, Determining whether a blank space exists in a target page of the memory, and if the empty space exists in the target page, the valid data and the main data existing in the target block to be reused may be recorded in the target page.
일 실시예에 의하면, 상기 스토리지 장치는, 캐시 버퍼; 데이터 입출력 큐; 상기 쓰기 요청에 응답하여 상기 메인 데이터를 상기 캐시 버퍼에 제공하는 제1 모듈; 상기 유효 데이터를 상기 데이터 입출력 큐에 제공하는 제2 모듈; 및 상기 캐시 버퍼에 저장된 상기 메인 데이터 및 상기 데이터 입출력 큐로부터 출력되는 상기 유효 데이터를 병합하는 제3 모듈을 포함 할 수 있다. According to one embodiment, the storage device comprises: a cache buffer; Data input / output queue; A first module for providing the main data to the cache buffer in response to the write request; A second module for providing the valid data to the data input / output queue; And a third module for merging the main data stored in the cache buffer and the valid data output from the data input / output queue.
일 실시예에 의하면, 상기 제3 모듈은, 상기 메인 데이터를 상기 플래시 메모리의 최소 기록 단위인 페이지에 기초하여 풀 페이지 데이터 및 상기 부분 페이지 데이터로 구분하고, 상기 메인 데이터가 부분 페이지 데이터인 경우, 상기 대상 페이지에 상기 빈 공간이 존재하는 것으로 판단 할 수 있다. According to one embodiment, the third module divides the main data into full page data and partial page data based on a page which is a minimum recording unit of the flash memory, and when the main data is partial page data, It can be determined that the empty space exists in the target page.
일 실시예에 의하면, 상기 제3 모듈은, 상기 데이터 입출력 큐에 상기 유효 데이터가 있는지 여부를 판단하고, 상기 유효 데이터가 상기 데이터 입출력 큐에 있는 경우, 상기 메인 데이터에 대한 제1 논리 블록 주소가 상기 유효 데이터의 제2 논리 블록 주소와 동일한지 여부를 판단하며, 상기 제1 논리 블록 주소와 상기 제2 논리 블록 주소가 다른 경우, 상기 유효 데이터 및 상기 메인 데이터를 병합 할 수 있다. According to one embodiment, the third module determines whether the valid data exists in the data input / output queue, and when the valid data is in the data input / output queue, the first logical block address for the main data is The valid data and the main data may be merged if the first logical block address is different from the second logical block address.
일 실시예에 의하면, 상기 제3 모듈은, 상기 제1 논리 블록 주소와 상기 제2 논리 블록 주소가 동일한 경우, 상기 유효 데이터를 무효화 처리 할 수 있다. According to an embodiment, when the first logical block address and the second logical block address are the same, the third module may invalidate the valid data.
본 발명의 실시예들에 따른 스토리지 장치의 공간 재수거 방법은, 스토리지 장치가 호스트 장치로부터 쓰기 요청을 수신하는 경우, 쓰기 요청과 관련된 메인 데이터를 기록할 대상 페이지(예를 들어, 플래시 메모리의 대상 페이지)에 빈 공간이 있는지 판단하고, 메인 데이터에 유효 데이터(즉, 재사용 대상 블록에 존재하는 유효 데이터)를 병합(또는, 업기(piggyback)) 하여, 대상 페이지에 기록할 수 있다. 따라서, 스토리지 장치의 공간 재수거 방법은, 플래시 메모리 내에서의 카피백(copyback) 동작(즉, 유효 데이터를 재사용 대상 블록에서 미사용 블록에 복사하는 동작)을 최소화 하고, 카피백 동작에 따른 스토리지 장치의 성능 저하 및 수명 단축을 방지할 수 있다.A method for reallocating space in a storage apparatus according to embodiments of the present invention includes the steps of: when a storage apparatus receives a write request from a host apparatus, (Or valid data existing in the reuse target block) is merged (or piggybacked) in the main data and recorded on the target page. Therefore, the method of reallocating space in the storage apparatus minimizes the copyback operation in the flash memory (that is, the operation of copying the valid data from the target block to the unused block) It is possible to prevent the performance degradation and the life span shortening.
또한, 스토리지 장치의 공간 재수거 방법은, 메인 데이터 및 유효 데이터간 논리 블록 주소의 중복 여부를 판단하고, 논리 블록 주소가 중복되는 경우 유효 데이터를 무효화 처리함으로써, 병합 처리에 의한 스토리지 장치의 오 동작을 방지 할 수 있다.Also, the method for re-collecting space of a storage apparatus may include determining whether a logical block address between the main data and the valid data is duplicated, invalidating the valid data when the logical block address is duplicated, Can be prevented.
나아가, 본 발명의 실시예들에 따른 스토리지 장치는 데이터 입출력 큐를 포함하므로, 상기 스토리지 장치의 공간 재수거 방법을 효율적으로 수행할 수 있다.Furthermore, since the storage apparatus according to embodiments of the present invention includes a data input / output queue, it is possible to efficiently perform the space re-collection method of the storage apparatus.
다만, 본 발명의 효과는 상기 효과들로 한정되는 것이 아니며, 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위에서 다양하게 확장될 수 있을 것이다.However, the effects of the present invention are not limited to the above effects, and may be variously extended without departing from the spirit and scope of the present invention.
도 1은 본 발명의 실시예들에 따른 스토리지 시스템을 나타내는 블록도이다.
도 2는 도 1의 스토리지 시스템에서 수행되는 스토리지 장치의 공간 재수거의 비교예를 나타내는 도면이다.
도 3은 도 1의 스토리지 시스템에서 수행되는 스토리지 장치의 공간 재수거의 일 예를 나타내는 도면이다.
도 4는 도 1의 스토리지 시스템에 포함된 스토리지 장치의 일 예를 나타내는 블록도이다.
도 5는 본 발명의 실시예들에 따른 스토리지 장치의 공간 재수거 방법을 나타내는 순서도이다.1 is a block diagram illustrating a storage system in accordance with embodiments of the present invention.
FIG. 2 is a diagram showing a comparative example in which the space reattachment of the storage device performed in the storage system of FIG. 1 is almost similar; FIG.
FIG. 3 is a diagram showing an example of a spatial rewinding of a storage apparatus performed in the storage system of FIG. 1; FIG.
4 is a block diagram showing an example of a storage apparatus included in the storage system of FIG.
5 is a flowchart illustrating a method for collecting space in a storage apparatus according to embodiments of the present invention.
이하, 첨부한 도면들을 참조하여, 본 발명의 실시예들을 보다 상세하게 설명하고자 한다. 도면상의 동일한 구성 요소에 대해서는 동일하거나 유사한 참조 부호를 사용한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The same or similar reference numerals are used for the same components in the drawings.
도 1은 본 발명의 실시예들에 따른 스토리지 시스템을 나타내는 블록도이다.1 is a block diagram illustrating a storage system in accordance with embodiments of the present invention.
도 1을 참조하면, 스토리지 시스템(100)은 호스트 장치(110) 및 스토리지 장치(140)를 포함할 수 있다.Referring to FIG. 1, a
호스트 장치(110)는 파일 시스템(미도시)를 이용하여 논리 블록 기반 인터페이스에 기초하여 논리 어드레스 상에서 블록 단위로 데이터들에 대한 읽기 커맨드(read command) 또는 쓰기 커맨드(write command)를 생성할 수 있다. 여기서, 파일 시스템은 확장 파일 시스템(Extended File System; Ext4), NT 파일 시스템(New Technology File System; NTFS) 등일 수 있다. 또한, 호스트 장치(110)는 스토리지 장치(120)와 인터액션을 수행하고, 예를 들어, 호스트 장치(110)는 인터페이스 규약(예를 들어, ATA, PCI 등)을 통해 스토리지 장치(120)와 데이터 전송(또는, 통신)을 수행할 수 있다.The
호스트 장치(110)는 파일 시스템 외에 호스트 컨트롤러(미도시), 다른 하드웨어적 또는 소프트웨어적 구성 요소들을 더 포함할 수 있다. 예를 들어, 호스트 장치(110)는 호스트 플래시 변환 레이어(미도시)를 포함하고, 호스트 플래시 변환 레이어를 이용하여 플래시 변환 레이어(예를 들어, 스토리지 장치(120)에 포함된 플래시 변환 레이어)의 일부 기능을 수행할 수 있다. 이 경우, 호스트 장치(110)는 파일 시스템과 호스트 컨트롤러 사이의 인터액션을 통해 스토리지 장치(120)의 내부 동작 정보를 보다 정확하게 파악하고, 스토리지 장치(120)에서 수행되는 동작들(예를 들어, 가비지 콜렉션 동작 등)을 효율적으로 지원(support)할 수 있다.In addition to the file system, the
스토리지 장치(120)는 낸드 플래시 메모리 장치에 상응할 수 있고, 솔리드 스테이트 드라이브(solid state drive; SSD), 시큐어 디지털 카드(secure digital card; SDCARD), 유니버셜 플래시 스토리지(universal flash storage; UFS), 임베디드 멀티미디어 카드(embedded multi media card; EMMC), CF 카드(compact flash card), 메모리 스틱(memory stick), XD 픽쳐 카드(XD picture card) 등으로 구현될 수 있다. 다만, 이는 예시적인 것으로서, 스토리지 장치(120)의 종류가 그에 한정되는 것은 아니다.The
스토리지 장치(120)는 플래시 메모리(122) 및 플래시 메모리(122)를 제어하기 위한 스토리지 컨트롤러(미도시)를 포함할 수 있다. 도 1에서, 스토리지 장치(120)는 하나의 플래시 메모리(122)를 포함하는 것으로 도시되어 있으나, 스토리지 장치(120)는 이에 국한되는 것은 아니다. 예를 들어, 스토리지 장치(120)는 서로 인터액션을 수행하는 n개(단, n은 1이상의 정수)의 플래시 메모리들을 포함할 수 있다.The
스토리지 장치(120)(또는, 스토리지 컨트롤러)는 파일 시스템(111)을 지원하기 위한 플래시 변환 레이어(flash translation layer)를 이용하여 논리 어드레스(logical address)를 물리 어드레스(physical address)로 변환하는 어드레스 맵핑(address mapping) 동작을 수행할 수 있다. 예를 들어, 스토리지 장치(120)는 맵핑 테이블(미도시)을 이용하여 호스트 장치(110)(또는, 파일 시스템)에서 생성되는 논리 어드레스를 플래시 메모리(122)의 물리 어드레스로 변환하는 어드레스 맵핑 동작을 수행할 수 있다.The storage device 120 (or the storage controller) may use an address mapping to convert a logical address to a physical address using a flash translation layer for supporting the file system 111 (address mapping) operation. For example, the
또한, 스토리지 장치(120)(또는, 스토리지 컨트롤러)는 어드레스 맵핑 동작을 통해 플래시 메모리(122)에 대한 대한 읽기(read) 동작, 쓰기(write) 동작, 소거(erase) 동작, 컴팩션(compaction) 동작, 웨어 레벨링(wear-leveling) 동작 등의 백그라운드 동작을 수행할 수 있다. 여기서, 스토리지 장치(120)는 컴팩션 동작을 통해 유효 페이지들을 이동시켜 플래시 메모리(1220)의 자유 블록을 확보하거나, 또는 플래시 메모리(122)를 최적화할 수 있으며, 스토리지 장치(120)는 웨어 레벨링 동작을 통해 플래시 메모리(122)의 셀들의 마모도를 평준화할 수 있다. 한편, 스토리지 장치(120)는 덮어쓰기(overwrite) 및 랜덤 액세스(random access)를 지원하지 않으므로, 스토리지 장치(120)는 쓰기 전 삭제(erase before write)의 제약을 가질 수 있다.In addition, the storage device 120 (or the storage controller) may perform a read operation, a write operation, an erase operation, a compaction operation, and the like for the
실시예들에서, 스토리지 장치(120)는 공간 재수거(space reclamation) 동작을 수행할 수 있다. 여기서, 공간 재수거 동작은 가비지 콜렉션(garbage collection) 동작에 상응할 수 있다. 예를 들어, 공간 재수거 동작은 컴팩션 동작, 웨어 레벨링 동작 및 플래시 메모리(122)의 비트 에러(bit error)를 감소시키기 위한 리드 리클레임(read reclaim) 동작을 포함하고, 스토리지 장치(120)는 공간 재수거 동작을 수행함으로써, 플래시 메모리(122) 상에 분산된 유효 데이터를 이동/병합하여 자유 블록(또는, 미사용 블록)을 확보하고, 플래시 메모리(122)를 최적화할 수 있다.In embodiments, the
실시예들에서, 스토리지 장치(120)는 캐시 버퍼(121) 및 데이터 입출력 큐(queue)(123)를 포함할 수 있다.In embodiments, the
캐시 버퍼(121)(또는, 버퍼 캐시)는 플래시 메모리(122)에 대한 읽기(read) 동작, 쓰기(write) 동작 등을 수행할 때, 데이터를 일시적으로 저장(또는, 캐시)할 수 있다. 즉, 캐시 버퍼(121)는 데이터(예를 들어, 쓰기 요청과 관련된 메인 데이터)를 기억하는 보조 기억 장치로, 플래시 메모리(122)의 입출력 효율을 향상시킬 수 있다.The cache buffer 121 (or the buffer cache) may temporarily store (or cache) data when performing a read operation, a write operation, or the like to the
데이터 입출력 큐(121)는 플래시 메모리(122)의 공간 재수거를 위한 유효 데이터를 저장하는 임시 저장 공간일 수 있다. 여기서, 유효 데이터는 재수거 대상 블록으로 선택된 블록(또는, 블록의 페이지)에 존재하는 데이터일 수 있다. 데이터 입출력 큐(126)는 임시 저장 공간으로서 기능하는 모든 데이터 구조(예를 들면, 연결리스트, 우선순위 큐 등)를 포함하는 것으로 해석되어야 한다.The data input /
참고로, 플래시 메모리(122)의 공간 재수거를 위해 유효 데이터(즉, 플래시 메모리(122)의 재수거 대상 블록에 존재하는 유효 데이터)를 플래시 메모리(122)의 미사용 블록(또는, 프로그램되지 않은 블록)에 기록하는 경우(즉, 플래시 메모리(122) 내에서 유효 데이터에 대한 카피백(copyback) 동작을 수행하는 경우), 플래시 메모리(122)의 전반적인 성능이 저하되고, 플래시 메모리(122)의 수명이 짧아질 수 있다.For reference, in order to reuse the space in the
한편, 본 발명의 실시예들에 따른 스토리지 시스템(100)은 데이터 입출력 큐(123) 및 후술하는 미사용 공간(쓰기 요청과 관련된 메인 데이터를 기록하기 위한 대상 페이지의 빈 공간)을 이용함으로써, 플래시 메모리(122) 내에서의 유효 데이터에 대한 카피백(copyback) 동작을 최소화 할 수 있다. 따라서, 스토리지 시스템(100)은 플래시 메모리(122)의 성능 저하 및 수명 단축을 방지(또는, 보완, 완화)할 수 있다.Meanwhile, the
일 실시예에서, 스토리지 장치(120)는, 호스트 장치(110)로부터 쓰기 요청을 수신하는 경우, 쓰기 요청과 관련된 메인 데이터가 기록될 대상 페이지(예를 들어, 플래시 메모리(122)의 기록 대상 블록의 기록 대상 페이지)에 빈 공간이 발생하는지 여부를 판단할 수 있다. 여기서, 쓰기 요청은 동기적인 쓰기 요청(synchronous write request)일 수 있다.In one embodiment, when receiving a write request from the
참고로, 쓰기 요청은, 도 1에 도시된 바와 같이, 제1 쓰기 요청(M1), 제2 쓰기 요청(M2) 및 제3 쓰기 요청(M3)을 포함할 수 있다. 제1 쓰기 요청(M1)(또는, write through)에 응답하여, 스토리지 장치(120)는 메인 데이터를 동기적으로 플래시 메모리(122)에 바로 기록하고, 호스트 장치(110)에 응답할 수 있다. 또한, 제2 쓰기 요청(M2)(또는, write-back)에 응답하여, 스토리지 장치(120)는 메인 데이터를 캐시 버퍼(121)에만 기록하고, 특정 조건(예를 들어, 특정 알고리즘)에 따라 캐시 버퍼(121)에 기록된 메인 데이터를 플래쉬 메모리(121)에 기록할 수 있다. 나아가, 제3 쓰기 요청(M3)(또는, cache flush)에 따라, 스토리지 장치(120)는 캐시 버퍼(121)에 기록된 메인 데이터 모두를 플래시 메모리(122)에 기록하고, 호스트 장치(110)에 응답할 수 있다.For reference, a write request may include a first write request M1, a second write request M2, and a third write request M3, as shown in FIG. In response to the first write request M1 (or write through), the
즉, 스토리지 장치(120)는 제1 쓰기 요청(M1) 및 제3 쓰기 요청(M3)과 같은 동기적인 쓰기 요청에 응답하여, 상기 요청과 관련된 메인 데이터를 플래시 메모리(122)에 기록할 수 있다.That is, the
한편, 호스트 장치(110)는 데이터의 신뢰성을 보장하기 위해 잦은 동기적 쓰기 요청을 생성할 수 있고, 이 경우, 동기적 쓰기 요청과 관련된 메인 데이터는 플래시 메모리(122)의 페이지(즉, 플래시 메모리(122)의 최소 기록 단위인 페이지)보다 작을 수 있으므로, 플래시 메모리(122)의 물리 페이지에 빈 공간(또는, 낭비되는 공간)이 발생할 수 있다. 또한, 플래시 메모리(122)의 기술 발전에 따라, 플래시 메모리(122)의 물리 페이지의 크기는 점점 커지는 추세이므로, 동기적 쓰기 요청 처리에 따라 발생하는 플래시 메모리(122)의 물리 페이지의 빈 공간은 더욱 커질 수 있다.Meanwhile, the
따라서, 스토리지 장치(120)는, 호스트 장치(110)로부터 쓰기 요청(예를 들어, 동기적인 쓰기 요청)을 수신하는 경우, 쓰기 요청과 관련된 메인 데이터를 대상 페이지에 기록하는 경우, 빈 공간이 발생할 지 여부를 판단(또는, 예측) 할 수 있다.Thus, when the
예를 들어, 스토리지 장치(120)는 쓰기 요청과 관련된 메인 데이터가 부분(partial) 페이지 데이터(예를 들어, 페이지에 빈 공간이 발생하는 데이터) 또는 풀(full) 페이지데이터(예를 들어, 페이지 안에 가득 채워져, 페이지에 빈 공간이 발생하지 않는 데이터)인지 여부를 판단할 수 있다. 예를 들어, 스토리지 장치(120)는 메인 데이터의 크기와 플래시 메모리(122)의 페이지(예를 들어, 플래시 메모리(122)의 최소 기록 단위인 페이지)의 크기(또는, 페이지에 기초하여 설정된 기준 값)를 비교하고, 상기 크기들이 동일한 경우 메인 데이터를 풀 페이지 데이터로 판단하고, 메인 데이터의 크기가 페이지의 크기보다 작은 경우 메인 데이터를 부분 페이지 데이터로 판단할 수 있다.For example, the
일 실시예에서, 스토리지 장치(120)는 메인 데이터가 부분 페이지 데이터인 경우, 메인 데이터 및 유효 데이터(즉, 데이터 입출력 큐(123)에 저장된 유효 데이터)를 플래시 메모리(122)의 대상 페이지에 기록(또는, 프로그래밍) 할 수 있다. 즉, 스토리지 장치(120)는 대상 페이지의 빈 공간에 상응하는 유효 데이터를 메인 데이터에 병합(또는, 업기(piggyback)) 할 수 있다.In one embodiment, when the main data is partial page data, the
상술한 바와 같이, 본 발명의 실시예들에 따른 스토리지 시스템(100)은 플래시 메모리(122) 및 데이터 입출력 큐(123)를 구비하는 스토리지 장치(120)를 포함하고, 스토리지 장치(120)는 유효 데이터(즉, 플래시 메모리(122)의 공간 재수거를 위해 선택된 재사용 대상 블록에 존재하는 유효 데이터)를 데이터 입출력 큐(123)에 일시적으로 저장(복사)하고, 스토리지 장치(120)는 호스트 장치(110)로부터 쓰기 요청을 수신하는 경우, 쓰기 요청과 관련된 메인 데이터에 유효 데이터를 병합(또는, 업기)하여 플래시 메모리(122)의 대상 페이지(예를 들어, 메인 데이터를 기록하기 위해 할당된 페이지)에 기록할 수 있다. 즉, 본 발명의 실시예들에 따른 스토리지 시스템(100)은 데이터 입출력 큐(123) 및 대상 페이지의 빈 공간을 활용하여, 플래시 메모리(122)의 공간 재수거 동작을 수행할 수 있다.As described above, the
한편, 도 1에 도시되지는 않았지만, 스토리지 장치(120)는 캐시 버퍼(121), 플래시 메모리(122) 및 데이터 입출력 큐(123) 외에 다른 하드웨어적 또는 소프트웨어적 구성 요소들을 더 포함할 수 있다. 예를 들어, 스토리지 장치(120)는 스토리지 컨트롤러를 포함할 수 있고, 여기서, 스토리지 컨트롤러는 호스트 장치(110)와 플래시 메모리(122) 사이에서 데이터 입출력 큐(123)를 사용하여 페이지 단위로 데이터 전송을 요청/처리하는 모든 프로그램을 포함하는 의미로 해석되어야 한다. 예를 들어, 스토리지 컨트롤러는 플래시 변환 레이어 또는 플래시 변환 레이어와 유사한 기능을 하는 프로그램에서 구현될 수 있다.1, the
도 2는 도 1의 스토리지 시스템에서 수행되는 스토리지 장치의 공간 재수거의 비교예를 나타내는 도면이고, 도 3은 도 1의 스토리지 시스템에서 수행되는 스토리지 장치의 공간 재수거의 일 예를 나타내는 도면이다.FIG. 2 is a view showing a comparative example of a space re-arrangement of a storage apparatus performed in the storage system of FIG. 1, and FIG. 3 is a diagram showing an example of a space re-arrangement of a storage apparatus performed in the storage system of FIG.
도 1 및 도 2를 참조하면, 스토리지 시스템(100)은 데이터 입출력 큐(123)를 이용하지 않고, 플래시 메모리(122)의 공간 재수거를 수행할 수 있다. 이 경우, 스토리지 시스템(100)은 플래시 메모리(122)의 공간 재수거를 위해 플래시 메모리(122)의 미사용 블록(예를 들어, 제4 블록(B4))을 할당하고, 플래시 메모리(122)의 재사용 대상 블록(reclaim target block)(예를 들어, 제1 블록(B1))에 기록된 유효 데이터를 플래시 메모리(122)의 미사용 블록(예를 들어, 제4 블록(B4))에 복사(또는, 프로그래밍)하고, 재사용 대상 블록의 유효 데이터를 소거(erase) 할 수 있다. 즉, 스토리지 시스템(100)은 유효 데이터에 대한 카피백(copyback) 동작을 통해, 플래시 메모리(122)의 공간을 재수거할 수 있다.Referring to FIGS. 1 and 2, the
참고로, 하나의 재사용 대상 블록에는 하나의 미사용 블록이 할당될 수 있으며, 할당된 미사용 블록들의 개수는 요구되는 조건(예를 들어, 시스템 파라미터)에 따라 다양하게 결정 될 수 있다.For reference, one unused block may be allocated to one reuse target block, and the number of allocated unused blocks may be variously determined according to a required condition (for example, a system parameter).
예를 들어, 플래시 메모리(122)는 블록들(B1 내지 B5)을 포함하고, 제1 내지 제3 블록들(B1 내지 B3)은 사용된 블록들(210)(또는, 프로그래밍된 블록들)에 포함되고, 제4 및 제5 블록들(B4, B5)는 미사용 블록들(220)에 포함될 수 있다. 한편, 제1 블록(B1)은 데이터(또는, 유효 데이터)를 포함하는 유효 페이지들(예를 들어, 제1 및 제2 페이지들(P1, P2))을 포함할 수 있다.For example, the
이 경우, 스토리지 시스템(100)은 제1 블록(B1)을 공간 재수거를 위한 재사용 대상 블록으로 선택하고, 제4 블록(B4)을 공간 재수거를 위해 할당하며, 제1 블록(B1)에 존재하는 유효 데이터들에 대한 카피백 동작을 수행할 수 있다. 즉, 스토리지 시스템(100)은 제1 블록(B1)의 제1 및 제2 페이지들(P1, P2)에 기록된 유효 데이터를 제4 블록(B4)의 제3 및 제4 페이지들(P3, P4)에 각각 복사 할 수 있다. 이후, 스토리지 시스템(100)은 제1 블록(B1)을 자유 블록으로서 재사용 가능하도록 제1 블록(B1)에 존재하는 유효 데이터를 소거 할 수 있다.In this case, the
상술한 바와 같이, 스토리지 시스템(100)이 데이터 입출력 큐(123)를 이용하지 않는 경우, 공간 재수거를 위한 별도의 블록(예를 들어, 제4 블록(B4))이 할당 및 유효 데이터에 대한 카피백 동작이 요구될 수 있다.As described above, when the
한편, 도 1 및 도 3을 참조하면, 본 발명의 실시예들에 따른 스토리지 시스템(100)은 데이터 입출력 큐(123) 및 페이지의 미사용 영역(R2)를 이용하여 플래시 메모리(122)의 공간 재수거를 수행할 수 있다.1 and 3, the
재사용 대상 블록인 제1 블록(B1)의 제1 페이지(P1) 및 제2 페이지(P2)에 제1 유효 데이터(VDATA1) 및 제2 유효 데이터(VDATA2)가 존재하는 경우, 스토리지 시스템(100)은 제1 유효 데이터(VDATA1) 및 제2 유효 데이터(VDATA2)를 데이터 입출력 큐(123)에 복사할 수 있다. 예를 들어, 스토리지 시스템(100)은 제1 유효 데이터(VDATA1) 및 제2 유효 데이터(VDATA2)를 순차적으로 데이터 입출력 큐(123)에 복사(또는, 입력) 할 수 있다.When the first valid data VDATA1 and the second valid data VDATA2 exist in the first page P1 and the second page P2 of the first block B1 as the reuse target block, And the first valid data (VDATA1) and the second valid data (VDATA2) to the data input / output queue (123). For example, the
스토리지 시스템(100)이 쓰기 요청을 수신하고, 쓰기 요청과 관련된 메인 데이터(HDATA)가 기록될 플래시 메모리(122)(예를 들어, 제3 페이지(P3))에 빈 공간이 있는 경우, 스토리지 시스템(100)은 유효 데이터를 상기 빈 공간에 기록할 수 있다.If the
실시예들에서, 스토리지 시스템(100)은 쓰기 요청과 관련된 메인 데이터(HDATA)가 풀 페이지 데이터 또는 부분 페이지 데이터인지를 판단할 수 있다. 즉, 스토리지 시스템(100)은 쓰기 요청과 관련된 메인 데이터(HDATA)가 풀 페이지 데이터 또는 부분 페이지 데이터인지를 판단함으로써, 메인 데이터(HDATA)가 기록될 대상 페이지(예를 들어, 제3 페이지(P3))에 빈 공간이 발생하는지 여부를 판단할 수 있다.In embodiments, the
예를 들어, 메인 데이터(HDATA)의 크기는 Q 바이트 이고, 플래시 메모리(122)의 페이지의 크기는 P 바이트일 수 있다(단, Q는 양의 정수, P는 Q 보다 큰 양의 정수). 이 경우, 대상 페이지인 제6 블록(B6)의 제3 페이지(P3)의 제1 영역(R1)은 메인 데이터(HDATA)의 기록을 위한 사용 영역이 되고, 제3 페이지(P3)의 제2 영역(R2)은 데이터가 기록되지 않은 미사용 영역(unused dummy region)이 될 수 있다.For example, the size of the main data HDATA is Q bytes, and the size of the page of the
실시예들에서, 스토리지 시스템(100)은 제2 영역(R2)에 데이터 입출력 큐(123)에서 출력되는 제3 유효 데이터(VDATA3)를 기록할 수 있다. 여기서, 제3 유효 데이터(VDATA3)은 입출력 큐(123)에서 순차적으로 입출력되는 데이터로서, 예를 들어, 제3 유효 데이터(VDATA3)는 데이터 입출력 큐(123)에 상대적으로 먼저 입력된 제1 유효 데이터(VDATA1)일 수 있다.In embodiments, the
즉, 스토리지 시스템(100)은 플래시 메모리(122)의 페이지보다 작은 메인 데이터(HDATA)를 대상 페이지(예를 들어, 제3 페이지(P3)의 제1 영역(R1))에 기록하는 경우, 대상 페이지의 미사용 영역(예를 들어, 제3 페이지(P3)의 제1 영역(R1))에 공간 재수거를 위한 유효 데이터(예를 들어, 제3 유효 데이터(VDATA3))를 기록할 수 있다.That is, when the main data HDATA smaller than the page of the
따라서, 스토리지 시스템(100)은 별도의 블록을 할당하는 동작(예를 들어, 도 2의 스토리지 시스템에서 공간 재수거를 위해 제4 블록(B4)을 할당하는 동작)을 최소화 하고, 이 경우, 스토리지 시스템(100)은 플래시 메모리(122)(예를 들어, 제4 블록(B4))의 사용(또는, 쓰기 동작)에 따른 수명 단축을 방지할 수 있다. 또한, 스토리지 시스템(100)은 메인 데이터(HDATA)에 대한 쓰기 요청 처리시, 유효 데이터(예를 들어, 제3 유효 데이터(VDATA3))를 플래시 메모리(122)에 기록함으로써, 유효 데이터의 유효 데이터(VDATA3)의 기록을 위한 별도의 프로세스를 최소화 할 수 있다. 따라서, 스토리지 시스템(100)은 플래시 메모리(122)의 공간 재수거의 처리 속도 및 플래시 메모리(122)의 전반적인 속도를 향상시킬 수 있다.Accordingly, the
도 4는 도 1의 스토리지 시스템에 포함된 스토리지 장치의 일 예를 나타내는 블록도이다.4 is a block diagram showing an example of a storage apparatus included in the storage system of FIG.
도 1, 도 3 및 도 4를 참조하면, 스토리지 시스템(100)은 제1 모듈(410), 제2 모듈(420) 및 제3 모듈(430)을 포함할 수 있다.Referring to FIGS. 1, 3 and 4, the
제1 모듈(410)은 호스트 장치(110)으로부터 제공된 쓰기 요청에 응답하여 메인 데이터(HDATA)를 캐시 버퍼(121)에 제공하고, 캐시 버퍼(121)는 메인 데이터(HDATA)를 일시적으로 저장할 수 있다. 예를 들어, 제1 모듈(410)은 비동기적 쓰기 모듈(asynchronous write module) 일 수 있다.The
제2 모듈(420)은 재사용 대상 블록인 제1 블록(B1)으로부터 유효 데이터(예를 들어, 제1 유효 데이터(VDATA1) 및 제2 유효 데이터(VDATA2)를 리딩하여 데이터 입출력 큐(123)에 제공하고, 데이터 입출력 큐(123)는 순차적으로 입력된 유효 데이터를 순차적으로 출력할 수 있다. 예를 들어, 제2 모듈(420)은 유효 데이터 선 인출 모듈(valid data pre-fetch module) 일 수 있다.The
제3 모듈(430)은 메인 데이터(HDATA)가 부분 페이지 데이터인지 여부를 판단하고, 메인 데이터가 부분 페이지 데이터인 경우, 메인 데이터 및 유효 데이터(예를 들어, 제3 유효 데이터(VDATA3))를 병합할 수 있다. 예를 들어, 제3 모듈(430)은 동기적 쓰기 모듈(synchronous write module) 일 수 있다.The
일 실시예에서, 제3 모듈(430)은 메인 데이터(HDATA)를 플래시 메모리(122)의 최소 기록 단위인 페이지에 기초하여 풀 페이지 데이터 및 상기 부분 페이지 데이터로 구분할 수 있다. 앞서 도 3을 참조하여 설명한 바와 같이, 메인 데이터(HDATA)의 크기가 페이지의 크기(또는, 페이지에 기초하여 설정된 기준 값)보다 작은 경우, 제3 모듈(430)은 메인 데이터(HDATA)를 부분 페이지 데이터로 판단할 수 있다. 한편, 메인 데이터(HDATA)의 크기가 페이지의 크기(또는, 페이지에 기초하여 설정된 기준 값)보다 큰 경우, 제3 모듈(430)은 메인 데이터(HDATA)를 풀 페이지 데이터로 판단하고, 메인 데이터만을 플래시 메모리(122)에 기록할 수 있다.In one embodiment, the
일 실시예에서, 제3 모듈(430)은 데이터 입출력 큐(123)에 유효 데이터(예를 들어, 제3 유효 데이터(VDATA3))가 있는지 여부를 판단할 수 있다. 예를 들어, 데이터 입출력 큐(123)에 유효 데이터가 있는 경우, 메인 데이터(HDATA) 및 유효 데이터의 병합을 수행하고, 데이터 입출력 큐(123)에 유효 데이터가 없는 경우, 플래시 메모리(122)의 공간 재수거(예를 들어, 웨어 레벨링 동작, 리드 리클레임 동작 등의 카피백 동작)가 수행되지 않는 것으로 판단하고, 메인 데이터만을 플래시 메모리(122)에 기록할 수 있다.In one embodiment, the
일 실시예에서, 제3 모듈(430)은 메인 데이터(HDATA)에 대한 제1 논리 블록 주소가 유효 데이터의 제2 논리 블록 주소와 동일한지 여부를 판단하고, 제1 논리 블록 주소와 제2 논리 블록 주소가 다른 경우, 유효 데이터 및 메인 데이터를 병합할 수 있다. 또한, 제3 모듈(430)은 제1 논리 블록 주소와 제2 논리 블록 주소가 동일한 경우, 제3 유효 데이터(VDATA)를 무효화 처리할 수 있다.In one embodiment, the
참고로, 메인 데이터(HDATA)의 제1 논리 블록 주소와 제3 유효 데이터(VDATA3)의 제2 논리 블록 주소가 동일한 경우, 메인 데이터(HDATA)는 제3 유효 데이터(VDATA3)보다 갱신된 데이터일 수 있다. 즉, 제3 유효 데이터(VDATA3)는 구 데이터이고, 메인 데이터(HDATA)는 신 데이터일 수 있다. 이 경우, 제3 유효 데이터(VDATA3)를 플래시 메모리(122)에 그대로 기록하면, 제1 논리 블록 주소의 값이 신 데이터가 아닌 구 데이터로 돌아가게 될 수 있다.When the first logical block address of the main data HDATA and the second logical block address of the third valid data VDATA3 are the same, the main data HDATA is updated with the third valid data VDATA3 . That is, the third valid data VDATA3 is old data, and the main data HDATA is new data. In this case, when the third valid data VDATA3 is written in the
따라서, 제3 모듈(430)은 메인 데이터(HDATA)의 제1 논리 블록 주소와 제3 유효 데이터(VDATA3)의 제2 논리 블록 주소가 다르면, 메인 데이터(HDATA) 및 제3 유효 데이터(VDATA3)를 병합하고, 메인 데이터(HDATA)의 제1 논리 블록 주소와 제3 유효 데이터(VDATA3)의 제2 논리 블록 주소가 같으면, 제3 유효 데이터(VDATA3)를 구 데이터로 판단하여 무효화 처리(예를 들어, 삭제, 제거)할 수 있다.Accordingly, if the first logical block address of the main data HDATA is different from the second logical block address of the third valid data VDATA3, the
일 실시예에서, 제3 모듈(430)은 제3 유효 데이터(VDATA3)를 무효화 처리한 경우, 데이터 입출력 큐(123)에 새로운 유효 데이터가 있는지 여부를 판단하고, 새로운 유효 데이터가 존재하는 경우, 메인 데이터(HDATA)에 새로운 유효 데이터를 병합할 수 있다.In one embodiment, when invalidating the third valid data VDATA3, the
한편, 제3 모듈(430)은 병합 데이터(PDATA)(즉, 메인 데이터(HDATA) 및 제3 유효 데이터(VDATA3)를 병합한 데이터)를 플래시 메모리(122)에 기록할 수 있다.On the other hand, the
상술한 바와 같이, 제3 모듈(430)은 데이터 병합 및 논리 블록 주소의 충돌 감지 기능을 수행할 수 있다.As described above, the
도 4를 참조하여 설명한 바와 같이, 스토리지 시스템(100)은 메인 데이터(HDATA)에 공간 재수거를 위한 유효 데이터를 병합(또는, 업기)하되, 메인 데이터(HDATA) 및 유효 데이터간 논리 블록 주소의 중복 여부를 판단하고, 논리 블록 주소가 중복되는 경우 유효 데이터를 무효화 처리함으로써, 구 데이터가 플래시 메모리(122)에 기록되는 것을 방지할 수 있다.As described with reference to FIG. 4, the
도 4에서, 스토리지 시스템(100)(또는, 스토리지 장치(120)는 제1 모듈(410), 제2 모듈(420) 및 제3 모듈(430)을 포함하는 것으로 도시하였으나, 스토리지 시스템(100)은 이에 국한되는 것은 아니다. 예를 들어, 스토리지 시스템(100)은 제1 내지 제3 모듈(410 내지 430)의 기능들을 수행하는 하나의 모듈(또는, 스토리지 컨트롤러)를 포함할 수 있다.4, the storage system 100 (or the storage device 120) is shown as including a
도 5는 본 발명의 실시예들에 따른 스토리지 장치의 공간 재수거 방법을 나타내는 순서도이다.5 is a flowchart illustrating a method for collecting space in a storage apparatus according to embodiments of the present invention.
도 1 및 도 5를 참조하면, 스토리지 장치의 공간 재수거 방법은 도 1의 스토리지 시스템(100)(또는, 스토리지 장치(120))에서 수행될 수 있다.Referring to Figures 1 and 5, a method of reallocating space in a storage device may be performed in the storage system 100 (or storage device 120) of Figure 1.
도 5의 방법은, 스토리지 장치(120)가 호스트 장치(110)로부터 쓰기 요청을 수신하는 경우, 쓰기 요청과 관련된 메인 데이터(HDATA)가 기록될 대상 페이지(또는, 플래시 메모리(122)의 대상 블록의 대상 페이지)에 빈 공간이 존재하는지 여부를 판단할 수 있다(S510).5, when the
예를 들어, 도 5의 방법은 플래시 메모리(122)의 페이지(예를 들어, 플래시 메모리(122)의 최소 기록 단위인 페이지)의 크기(또는, 페이지에 기초하여 설정된 기준 값)에 기초하여 메인 데이터(HDATA)를 부분 페이지 데이터 또는 풀 페이지 데이터로 구분하고, 메인 데이터(HDATA)가 부분 페이지 데이터인 경우, 대상 페이지에 빈 공간이 존재하는 것으로 판단할 수 있다.For example, the method of FIG. 5 may be based on a size (or a reference value set based on a page) of the page of the flash memory 122 (e.g., a page that is the minimum recording unit of the flash memory 122) Data HDATA is divided into partial page data or full page data, and when the main data HDATA is partial page data, it can be determined that a blank space exists in the target page.
도 5의 방법은, 대상 페이지에 빈 공간이 존재하는 경우, 메인 데이터(HDATA) 및 유효 데이터(VDATA)를 대상 페이지에 기록할 수 있다. 여기서, 유효 데이터(VDATA)는 플래시 메모리(122)의 공간 재수거를 위해 선택된 재사용 대상 블록에 존재하는 데이터일 수 있다. 유효 데이터(VDATA)는 플래시 메모리(122)의 공간 재수거를 위한 재사용 대상 블록이 선택된 경우, 재사용 대상 블록으로부터 데이터 입출력 큐(123)에 복사(또는, 입력, 제공) 될 수 있다.5, the main data HDATA and the valid data VDATA can be recorded in the target page when there is a vacant space in the target page. Here, the valid data VDATA may be data existing in the reuse target block selected for the space re-collection of the
실시예들에서, 도 5의 방법은, 데이터 입출력 큐(123)에 유효 데이터(VDATA)가 있는지 여부를 판단하고(S520), 유효 데이터(VDATA)가 데이터 입출력 큐(123)에 있는 경우, 메인 데이터(HDATA)에 대한 제1 논리 블록 주소가 유효 데이터(VDATA)의 제2 논리 블록 주소와 동일한지 여부를 판단하며(S530), 제1 논리 블록 주소와 제2 논리 블록 주소가 다른 경우, 유효 데이터(VDATA) 및 메인 데이터(HDATA)를 병합할 수 있다(S540).In the embodiments, the method of FIG. 5 determines whether valid data VDATA is present in the data input / output queue 123 (S520). If valid data VDATA is present in the data input /
예를 들어, 데이터 입출력 큐(123)에 유효 데이터(VDATA)가 있는 경우, 도 5의 방법은 메인 데이터(HDATA) 및 유효 데이터(VDATA)의 병합을 수행하고, 데이터 입출력 큐(123)에 유효 데이터(VDATA)가 없는 경우, 플래시 메모리(122)의 공간 재수거 작업이 수행되지 않는 것으로(또는, 재사용 대상 블록이 없는 것으로) 판단하고, 메인 데이터(HDATA)만을 플래시 메모리(122)에 기록할 수 있다.For example, when the valid data VDATA is present in the data input /
한편, 도 5의 방법은 메인 데이터(HDATA)의 제1 논리 블록 주소와 유효 데이터(VDATA)의 제2 논리 블록 주소가 동일한 경우, 유효 데이터(VDATA)를 무효화 처리(또는, 삭제, 제거) 할 수 있다(S550).5, if the first logical block address of the main data HDATA is equal to the second logical block address of the valid data VDATA, the valid data VDATA is invalidated (or deleted, removed) (S550).
즉, 도 5의 방법은, 메인 데이터(HDATA)의 제1 논리 블록 주소와 유효 데이터(VDATA)의 제2 논리 블록 주소가 동일한 경우, 유효 데이터(VDATA)는 메인 데이터(HDATA)에 대한 구 데이터(또는, 제1 논리 블록 주소에 대한 구 데이터) 인 것으로 판단하여, 유효 데이터(VDATA)를 플래시 메모리(122)에 기록하지 않을 수 있다.5, when the first logical block address of the main data HDATA and the second logical block address of the valid data VDATA are the same, the valid data VDATA is the old data of the main data HDATA (Or old data for the first logical block address), and may not write the valid data VDATA to the
일 실시예에서, 도 5의 방법은 유효 데이터(VDATA)를 무효화 처리한 경우, 데이터 입출력 큐(123)에 새로운 유효 데이터(VDATA)가 있는지 여부를 판단하고, 새로운 유효 데이터(VDATA)가 존재하는 경우, 메인 데이터(HDATA)에 새로운 유효 데이터(VDATA)를 병합할 수 있다.In one embodiment, the method of FIG. 5 determines whether there is new valid data (VDATA) in the data input /
도 5의 방법은 병합된 데이터(즉, 메인 데이터(HDATA)에 유효 데이터(VDATA)를 병합한 데이터)를 대상 페이지에 기록(또는, 프로그래밍)할 수 있다(S560).5, the merged data (i.e., data obtained by merging the valid data VDATA with the main data HDATA) can be recorded (or programmed) in the target page (S560).
도 5를 참조하여 설명한 바와 같이, 본 발명의 실시예들에 따른 스토리지 장치의 공간 재수거 방법은 메인 데이터(HDATA)를 기록할 대상 페이지에 빈 공간이 있는 경우, 메인 데이터(HDATA)에 유효 데이터(VDATA)를 병합(또는, 업기)하되, 메인 데이터(HDATA) 및 유효 데이터(VDATA)간 논리 블록 주소의 중복 여부를 판단하고, 논리 블록 주소가 중복되는 경우 유효 데이터(VDATA)를 무효화 처리함으로써, 구 데이터가 플래시 메모리(122)에 기록되는 것을 방지할 수 있다.5, in the case of the space re-collecting method of the storage apparatus according to the embodiments of the present invention, when there is a vacant space in the page to which the main data HDATA is to be recorded, It is determined whether the logical block address is duplicated between the main data HDATA and the valid data VDATA and the valid data VDATA is invalidated when the logical block address is duplicated , It is possible to prevent old data from being written into the
이상, 본 발명의 실시예들에 따른 스토리지 장치 및 스토리지 장치의 공간 재수거 방법에 대하여 도면을 참조하여 설명하였지만, 상기 설명은 예시적인 것으로서 본 발명의 기술적 사상을 벗어나지 않는 범위에서 해당 기술 분야에서 통상의 지식을 가진 자에 의하여 수정 및 변경될 수 있을 것이다. While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the present invention is not limited to the disclosed exemplary embodiments. It will be appreciated by those skilled in
본 발명의 실시예들에 따른 스토리지 장치 및 스토리지 장치의 공간 재수거 방법은 스토리지 장치(즉, 플래시 메모리 장치)를 구비한 스토리지 시스템에 적용될 수 있다. 예를 들어, 본 발명은 솔리드 스테이트 드라이브(SSD), 임베디드 멀티미디어 카드(EMMC), 시큐어 디지털 카드(SD카드) 등을 구비한 스토리지 시스템에 적용될 수 있다.The method for recovering space in a storage apparatus and a storage apparatus according to embodiments of the present invention can be applied to a storage system having a storage apparatus (i.e., a flash memory apparatus). For example, the present invention can be applied to a storage system having a solid state drive (SSD), an embedded multimedia card (EMMC), a secure digital card (SD card), and the like.
100: 스토리지 시스템 110: 호스트 장치
120: 스토리지 장치 121: 캐시 버퍼
122: 플래시 메모리 123: 데이터 입출력 큐
210: 사용 블록들 220: 미사용 블록들
410: 제1 모듈 420: 제2 모듈
430: 제3 모듈100: storage system 110: host device
120: Storage device 121: Cache buffer
122: flash memory 123: data input / output queue
210: used blocks 220: unused blocks
410: first module 420: second module
430: Third module
Claims (9)
상기 호스트 장치로부터 쓰기 요청을 수신하는 경우, 상기 쓰기 요청과 관련된 메인 데이터를 기록할 상기 플래시 메모리의 대상 페이지에 빈 공간이 존재하는지 여부를 판단하는 단계; 및
상기 대상 페이지에 상기 빈 공간이 존재하는 경우, 재사용 대상 블록에서 데이터 입출력 큐로 복사된 유효 데이터와 상기 메인 데이터를 병합하여 상기 대상 페이지에 기록하는 단계를 포함하는 스토리지 장치의 공간 재수거 방법.In a storage device having a flash memory, controlling the flash memory using a flash conversion layer, and performing an interaction with the host device,
Determining whether a blank space exists in a target page of the flash memory to record main data related to the write request when receiving a write request from the host device; And
And merging the main data copied from the reuse target block into the data input / output queue and the main data and recording the merged data in the target page when the empty space exists in the target page.
상기 메인 데이터를 상기 플래시 메모리의 최소 기록 단위인 페이지에 기초하여 풀(full) 페이지 데이터 및 부분(partial) 페이지 데이터로 구분하는 단계를 포함하는 것을 특징으로 하는 스토리지 장치의 공간 재수거 방법.The method of claim 1, wherein the step of determining whether a blank space exists in the target page includes:
And dividing the main data into full page data and partial page data based on a page which is a minimum recording unit of the flash memory.
상기 데이터 입출력 큐에 상기 유효 데이터가 있는지 여부를 판단하는 단계;
상기 유효 데이터가 상기 데이터 입출력 큐에 있는 경우, 상기 메인 데이터에 대한 제1 논리 블록 주소가 상기 유효 데이터의 제2 논리 블록 주소와 동일한지 여부를 판단하는 단계; 및
상기 제1 논리 블록 주소와 상기 제2 논리 블록 주소가 다른 경우, 상기 유효 데이터와 상기 메인 데이터를 병합하는 단계를 포함하는 것을 특징으로 하는 스토리지 장치의 공간 재수거 방법.2. The method of claim 1, wherein merging the valid data and the main data and recording the merged data in the target page comprises:
Determining whether the valid data exists in the data input / output queue;
Determining whether a first logical block address for the main data is the same as a second logical block address of the valid data when the valid data is in the data input / output queue; And
And merging the valid data with the main data if the first logical block address and the second logical block address are different from each other.
상기 제1 논리 블록 주소와 상기 제2 논리 블록 주소가 동일한 경우, 상기 유효 데이터를 무효화 처리하는 단계를 더 포함하는 것을 특징으로 하는 스토리지 장치의 공간 재수거 방법.4. The method of claim 3, wherein merging the valid data and the main data and recording the merged data in the target page comprises:
And invalidating the valid data if the first logical block address and the second logical block address are identical to each other.
호스트 장치로부터 쓰기 요청을 수신하는 경우, 상기 쓰기 요청과 관련된 메인 데이터를 기록할 상기 플래시 메모리의 대상 페이지에 빈 공간이 존재하는지 여부를 판단하며, 상기 대상 페이지에 상기 빈 공간이 존재하는 경우, 재사용 대상 블록에서 데이터 입출력 큐로 복사된 유효 데이터와 상기 메인 데이터를 병합하여 상기 대상 페이지에 기록하는 것을 특징으로 하는 스토리지 장치.A flash memory,
The method comprising: determining whether a blank space exists in a target page of the flash memory in which main data related to the write request is to be written, when the write request is received from the host apparatus; And merges the main data copied from the target block into the data input / output queue with the main data and records the merged data in the target page.
캐시 버퍼;
상기 데이터 입출력 큐;
상기 쓰기 요청에 응답하여 상기 메인 데이터를 상기 캐시 버퍼에 제공하는 제1 모듈;
상기 유효 데이터를 상기 데이터 입출력 큐에 제공하는 제2 모듈; 및
상기 캐시 버퍼에 저장된 상기 메인 데이터와 상기 데이터 입출력 큐로부터 출력되는 상기 유효 데이터를 병합하는 제3 모듈을 포함하는 것을 특징으로 하는 스토리지 장치.The storage system according to claim 5,
Cache buffer;
The data input / output queue;
A first module for providing the main data to the cache buffer in response to the write request;
A second module for providing the valid data to the data input / output queue; And
And a third module for merging the main data stored in the cache buffer and the valid data output from the data input / output queue.
상기 데이터 입출력 큐에 상기 유효 데이터가 있는지 여부를 판단하고,
상기 유효 데이터가 상기 데이터 입출력 큐에 있는 경우, 상기 메인 데이터에 대한 제1 논리 블록 주소가 상기 유효 데이터의 제2 논리 블록 주소와 동일한지 여부를 판단하며,
상기 제1 논리 블록 주소와 상기 제2 논리 블록 주소가 다른 경우, 상기 유효 데이터와 상기 메인 데이터를 병합하는 것을 특징으로 하는 스토리지 장치.7. The apparatus of claim 6,
Determining whether the valid data exists in the data input / output queue,
And if the valid data is in the data input / output queue, determining whether a first logical block address for the main data is the same as a second logical block address of the valid data,
And merges the valid data and the main data when the first logical block address is different from the second logical block address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020160035294A KR101791855B1 (en) | 2016-03-24 | 2016-03-24 | Storage device and method of reclaiming space of the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020160035294A KR101791855B1 (en) | 2016-03-24 | 2016-03-24 | Storage device and method of reclaiming space of the same |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20170110904A KR20170110904A (en) | 2017-10-12 |
KR101791855B1 true KR101791855B1 (en) | 2017-10-31 |
Family
ID=60141291
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020160035294A KR101791855B1 (en) | 2016-03-24 | 2016-03-24 | Storage device and method of reclaiming space of the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101791855B1 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010531029A (en) * | 2007-06-22 | 2010-09-16 | コンペレント・テクノロジーズ | Data storage space recovery system and method |
-
2016
- 2016-03-24 KR KR1020160035294A patent/KR101791855B1/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010531029A (en) * | 2007-06-22 | 2010-09-16 | コンペレント・テクノロジーズ | Data storage space recovery system and method |
Also Published As
Publication number | Publication date |
---|---|
KR20170110904A (en) | 2017-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8219776B2 (en) | Logical-to-physical address translation for solid state disks | |
US8166258B2 (en) | Skip operations for solid state disks | |
US6938116B2 (en) | Flash memory management method | |
KR101769883B1 (en) | Apparatus, system, and method for allocating storage | |
US8166233B2 (en) | Garbage collection for solid state disks | |
JP5649742B2 (en) | Transaction log restore | |
CN108604165B (en) | Storage device | |
US20150127889A1 (en) | Nonvolatile memory system | |
US20200409840A1 (en) | System Garbage Collection Method and Method for Garbage Collection in Solid State Disk | |
KR20100037319A (en) | Variable space page mapping method and apparatus for flash memory device | |
KR20150083264A (en) | System and method for efficient address translation on Flash memory device | |
KR20070096429A (en) | Fast mounting for a file system on nand flash memory | |
KR101017067B1 (en) | Locality-Aware Garbage Collection Technique for NAND Flash Memory-Based Storage Systems | |
US20100318726A1 (en) | Memory system and memory system managing method | |
KR20120084906A (en) | Non-volatile memory system and management method therefor | |
TW202101223A (en) | Data storage device and non-volatile memory control method | |
KR20170084675A (en) | Method of accessing data with in a memory, and memory device using the method | |
CN116364148A (en) | Wear balancing method and system for distributed full flash memory system | |
Subramani et al. | Garbage collection algorithms for nand flash memory devices--an overview | |
KR101077901B1 (en) | Apparatus and method for managing flash memory using log block level mapping algorithm | |
CN109426436B (en) | Variable large block-based garbage recycling method and device | |
CN110162268B (en) | Method and system for tile-by-tile data organization and placement with real-time computation | |
KR101153688B1 (en) | Nand flash memory system and method for providing invalidation chance to data pages | |
US11263132B2 (en) | Method and system for facilitating log-structure data organization | |
KR101791855B1 (en) | Storage device and method of reclaiming space of the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |