KR102266166B1 - Memory controller and storage device including the same - Google Patents
Memory controller and storage device including the same Download PDFInfo
- Publication number
- KR102266166B1 KR102266166B1 KR1020190141816A KR20190141816A KR102266166B1 KR 102266166 B1 KR102266166 B1 KR 102266166B1 KR 1020190141816 A KR1020190141816 A KR 1020190141816A KR 20190141816 A KR20190141816 A KR 20190141816A KR 102266166 B1 KR102266166 B1 KR 102266166B1
- Authority
- KR
- South Korea
- Prior art keywords
- buffer
- memory
- read
- write
- data
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0658—Controller construction arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
- G06F3/0611—Improving I/O performance in relation to response time
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0653—Monitoring storage devices or systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0656—Data buffering arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0659—Command handling arrangements, e.g. command buffers, queues, command scheduling
Abstract
본 발명은 메모리 컨트롤러 및 이를 포함하는 스토리지 디바이스에 관한 것으로, 본 발명의 실시예에 따른 메모리 컨트롤러는 비휘발성 메모리(200)에 기입될 데이터, 및 비휘발성 메모리(200)로부터 독출될 데이터를 버퍼 메모리(300)에 일시 저장하는 버퍼링 동작을 실행하는 메모리 컨트롤러(100)에 있어서, 데이터를 버퍼 메모리(300)에 일시 저장하는 요청인 다수의 버퍼 쓰기 리퀘스트(buffer write request), 및 버퍼 메모리(300)에 저장된 데이터를 독출하는 요청인 다수의 버퍼 읽기 리퀘스트(buffer read request)를 저장하는 버퍼 리퀘스트 큐(queue, 10)), 버퍼 리퀘스트 큐(10)에 저장된 다수의 버퍼 쓰기 리퀘스트 및 버퍼 읽기 리퀘스트 각각에 수록된 데이터의 길이를 합산하여 리퀘스트 데이터 총량을 실시간으로 산출하는 버퍼 트래픽 모니터링부(20), 및 실시간으로 산출된 리퀘스트 데이터 총량을 기반으로, 실행 비율을 설정하여, 버퍼링 동작의 실행을 제어하는 버퍼 관리부(30)를 포함한다.The present invention relates to a memory controller and a storage device including the same, wherein the memory controller according to an embodiment of the present invention stores data to be written into the nonvolatile memory 200 and data to be read from the nonvolatile memory 200 into a buffer memory. In the memory controller 100 for executing a buffering operation for temporarily storing data in 300 , a plurality of buffer write requests, which are requests for temporarily storing data in the buffer memory 300 , and the buffer memory 300 ) A buffer request queue (queue, 10) that stores a number of buffer read requests, which are requests to read data stored in the , and a plurality of buffer write requests and buffer read requests stored in the buffer request queue 10, respectively. The buffer traffic monitoring unit 20 for calculating the total amount of request data in real time by summing the lengths of the data contained in the buffer, and the buffer for controlling the execution of the buffering operation by setting the execution ratio based on the total amount of request data calculated in real time and a management unit 30 .
Description
본 발명은 메모리 컨트롤러 및 이를 포함하는 스토리지 디바이스에 관한 것으로, 보다 상세하게는 버퍼 메모리의 트래픽을 감시함으로써 성능 병목 발생 여부를 예측하고 이에 따라 버퍼 메모리를 관리하는 메모리 컨트롤러 및 이를 포함하는 스토리지 디바이스에 관한 것이다.The present invention relates to a memory controller and a storage device including the same, and more particularly, to a memory controller for predicting whether a performance bottleneck occurs by monitoring traffic of a buffer memory and managing the buffer memory accordingly, and to a storage device including the same will be.
반도체 메모리는 정보의 기억 메커니즘에 따라 휘발성 메모리(Volatile Memory)와 비휘발성 메모리(Non-volatile Memory)로 구분된다. 휘발성 메모리로는 DRAM, SRAM 등이 있는데, 읽고 쓰는 속도가 빠르지만 전원 공급이 차단되면 기억정보가 소실된다. 한편, 비휘발성 메모리는 전원이 차단되어도 기억정보를 보존할 수 있기 때문에 전원의 공급 여부에 무관하게 보존해야 할 데이터를 저장하는데 사용한다. 이러한 비휘발성 메모리로는 EPROM, EEPROM, FRAM, PRAM, MRAM, 플래시 메모리(Flash Memory) 등이 있는데, 특히 하기 선행기술문헌의 특허문헌에 개시된 바와 같이, 플래시 메모리가 컴퓨터, 스마트폰, 디지털카메라, 보이스 리코더, 캠코더 등과 같은 정보기기들의 음성 및 영상 데이터 저장 매체로서 널리 사용되고 있다. The semiconductor memory is divided into a volatile memory and a non-volatile memory according to a storage mechanism of information. Volatile memory includes DRAM and SRAM, which reads and writes fast, but information is lost when the power supply is cut off. On the other hand, the nonvolatile memory is used to store data to be preserved regardless of whether the power is supplied or not because the memory information can be preserved even when the power is cut off. Examples of such non-volatile memory include EPROM, EEPROM, FRAM, PRAM, MRAM, and flash memory. In particular, as disclosed in the patent documents of the following prior art documents, the flash memory is a computer, a smartphone, a digital camera, It is widely used as audio and video data storage media of information devices such as voice recorders and camcorders.
이러한 플래시 메모리로 구성된 플래시 스토리지 디바이스(Flash storage device)는 호스트로부터 수신한 쓰기 커맨드의 처리 성능을 높이기 위해 버퍼 메모리를 쓰기 버퍼(write buffer) 및 프리패치 버퍼(prefetch buffer)로 사용한다. 그러나 플래시 메모리와 같은 고대역 메모리(High Bandwidth Memory, HBM)를 스토리지 미디어(storage media)로 사용하는 경우에는 버퍼 메모리에 성능 병목(bottleneck)이 발생할 수 있다. 호스트의 쓰기 커맨드 처리 과정에서 발생하는 버퍼 메모리에 대한 호스트 데이터 트래픽(data traffic)이 스토리지 미디어 대비 매우 많기 때문에 버퍼 메모리의 대역폭(Bandwidth)이 스토리지 미디어보다 압도적으로 높지 않으면 버퍼 메모리에 성능 병목이 발생하게 된다. 또한, 버퍼 메모리에는 쓰기 버퍼링 이외에도 소프트웨어 코드 실행이나 메타 데이터 액세스 등과 같은 다양한 트래픽이 존재하고, 읽기 프리패치의 경우 해당 논리 블록 주소(LBA, Logical Block Address)에 대한 읽기 커맨드가 발생하지 않으면 버퍼 메모리의 대역폭이 낭비되므로 성능 병목이 발생할 가능성이 높다.A flash storage device configured with such a flash memory uses a buffer memory as a write buffer and a prefetch buffer to increase processing performance of a write command received from a host. However, when a high bandwidth memory (HBM) such as a flash memory is used as a storage media, a performance bottleneck may occur in the buffer memory. Since the host data traffic to the buffer memory generated in the process of processing the host's write command is very large compared to the storage media, if the bandwidth of the buffer memory is not overwhelmingly higher than that of the storage media, the buffer memory will become a performance bottleneck. do. In addition to write buffering, various traffics such as software code execution or metadata access exist in the buffer memory. In the case of read prefetch, if a read command to the corresponding logical block address (LBA) does not occur, the buffer memory is Because bandwidth is wasted, it is likely to become a performance bottleneck.
이에 종래 플래시 스토리지 디바이스에서의 버퍼 메모리 성능 병목을 관리하기 위한 방안이 절실히 요구되고 있다.Accordingly, there is an urgent need for a method for managing a buffer memory performance bottleneck in a conventional flash storage device.
본 발명은 상술한 종래기술의 문제점을 해결하기 위한 것으로, 본 발명의 일 측면은 버퍼 메모리에 대한 트래픽을 실시간으로 검사하여 성능 병목 가능성을 판별하고, 이에 대응하여 쓰기 버퍼링 및 읽기 프리패치 실행을 제한함으로써, 버퍼 메모리를 관리할 수 있는 메모리 컨트롤러를 제공하는 데 있다.SUMMARY OF THE INVENTION The present invention is to solve the problems of the prior art described above, and an aspect of the present invention is to check the traffic to the buffer memory in real time to determine the possibility of a performance bottleneck, and to limit write buffering and read prefetch execution in response thereto Accordingly, an object of the present invention is to provide a memory controller capable of managing the buffer memory.
본 발명의 실시예에 따른 메모리 컨트롤러는 비휘발성 메모리에 기입될 데이터, 및 상기 비휘발성 메모리로부터 독출될 데이터를 버퍼 메모리에 일시 저장하는 버퍼링 동작을 실행하는 메모리 컨트롤러에 있어서, 상기 데이터를 상기 버퍼 메모리에 일시 저장하는 요청인 다수의 버퍼 쓰기 리퀘스트(buffer write request), 및 상기 버퍼 메모리에 저장된 상기 데이터를 독출하는 요청인 다수의 버퍼 읽기 리퀘스트(buffer read request)를 저장하는 버퍼 리퀘스트 큐(queue); 상기 버퍼 리퀘스트 큐에 저장된 다수의 상기 버퍼 쓰기 리퀘스트 및 상기 버퍼 읽기 리퀘스트 각각에 수록된 상기 데이터의 길이를 합산하여 리퀘스트 데이터 총량을 실시간으로 산출하는 버퍼 트래픽 모니터링부; 및 실시간으로 산출된 상기 리퀘스트 데이터 총량을 기반으로, 실행 비율을 설정하여, 상기 버퍼링 동작의 실행을 제어하는 버퍼 관리부;를 포함한다.In the memory controller according to an embodiment of the present invention, the memory controller performs a buffering operation of temporarily storing data to be written into a nonvolatile memory and data to be read from the nonvolatile memory in a buffer memory, wherein the data is stored in the buffer memory A buffer request queue for storing a plurality of buffer write requests, which is a request to temporarily store the data, and a plurality of buffer read requests, which is a request to read the data stored in the buffer memory. ; a buffer traffic monitoring unit calculating a total amount of request data in real time by summing the lengths of the data included in each of the plurality of buffer write requests and the buffer read requests stored in the buffer request queue; and a buffer management unit configured to control execution of the buffering operation by setting an execution rate based on the total amount of the request data calculated in real time.
또한, 본 발명의 실시예에 따른 메모리 컨트롤러에 있어서, 상기 메모리 컨트롤러는, 기설정된 초기 실행 비율에 따라 상기 버퍼링 동작을 실행하되, 실시간으로 산출된 상기 리퀘스트 데이터 총량이 기설정된 상한값 초과이면, 상기 버퍼 관리부가, 상기 초기 실행 비율을 하향 조정하여, 상기 실행 비율을 설정할 수 있다.Further, in the memory controller according to an embodiment of the present invention, the memory controller executes the buffering operation according to a preset initial execution ratio, and when the total amount of the request data calculated in real time exceeds a preset upper limit, the buffer The management unit may set the execution ratio by downwardly adjusting the initial execution ratio.
또한, 본 발명의 실시예에 따른 메모리 컨트롤러에 있어서, 상기 버퍼 관리부는, 실시간으로 산출된 상기 리퀘스트 데이터 총량이 기설정된 하한값 이상이고 상기 상한값 이하가 될 때까지, 반복적으로 하향 조정하여 상기 실행 비율을 설정할 수 있다.In addition, in the memory controller according to an embodiment of the present invention, the buffer management unit repeatedly adjusts downwards the execution ratio until the total amount of the request data calculated in real time is equal to or greater than a predetermined lower limit and less than or equal to the upper limit. can be set.
또한, 본 발명의 실시예에 따른 메모리 컨트롤러에 있어서, 상기 버퍼 관리부는, 실시간으로 산출된 상기 리퀘스트 데이터 총량이 상기 하한값 미만이면, 상기 실행 비율을 상향 조정할 수 있다.In addition, in the memory controller according to an embodiment of the present invention, the buffer manager may increase the execution ratio when the total amount of the request data calculated in real time is less than the lower limit.
또한, 본 발명의 실시예에 따른 메모리 컨트롤러에 있어서, 상기 버퍼 관리부는, 실시간으로 산출된 상기 리퀘스트 데이터 총량이 상기 하한값 미만이더라도, 설정된 상기 실행 비율이 상기 초기 실행 비율과 동일하면, 상기 실행 비율을 유지할 수 있다.In addition, in the memory controller according to the embodiment of the present invention, the buffer management unit, even if the total amount of the request data calculated in real time is less than the lower limit value, if the set execution ratio is the same as the initial execution ratio, the execution ratio can keep
또한, 본 발명의 실시예에 따른 메모리 컨트롤러에 있어서, 상기 버퍼 관리부는, 상기 상한값 초과 정도, 및 상기 하한값 미만 정도에 따라 각각 구간별로 기설정된 실행 비율 변동량을 적용하여 상기 실행 비율을 조정할 수 있다.Also, in the memory controller according to an embodiment of the present invention, the buffer management unit may adjust the execution ratio by applying a preset execution ratio variation for each section according to the degree of exceeding the upper limit value and the degree of less than the lower limit value.
또한, 본 발명의 실시예에 따른 메모리 컨트롤러에 있어서, 상기 버퍼 관리부는, 상기 버퍼링 동작 중, 호스트의 쓰기 커맨드에 대응하여 기입될 상기 데이터를 상기 버퍼 메모리에 일시 저장하는 쓰기 버퍼링과, 상기 호스트의 제1 읽기 커맨드에 대한 처리 완료 후에 연속적으로 발생할 제2 읽기 커맨드를 예상하여 독출될 상기 데이터를 상기 버퍼 메모리에 일시 저장하는 읽기 프리패치를 구별하고, 각각에 대한 동작 실행을 제어할 수 있다.In addition, in the memory controller according to an embodiment of the present invention, the buffer manager includes: write buffering for temporarily storing the data to be written in response to a write command from a host in the buffer memory during the buffering operation; In anticipation of a second read command to be continuously generated after processing of the first read command is completed, read prefetches for temporarily storing the data to be read may be distinguished from each other in the buffer memory, and the execution of each operation may be controlled.
또한, 본 발명의 실시예에 따른 메모리 컨트롤러에 있어서, 상기 버퍼 관리부는, 제1 실행 비율을 설정하여, 상기 쓰기 버퍼링 동작의 실행을 제어하고, 상기 제1 실행 비율과 동일하거나 또는 서로 다른 제2 실행 비율을 설정하여, 상기 읽기 프리패치 동작의 실행을 제어할 수 있다.In addition, in the memory controller according to an embodiment of the present invention, the buffer manager sets a first execution ratio to control execution of the write buffering operation, and a second execution ratio equal to or different from the first execution ratio Execution of the read prefetch operation may be controlled by setting an execution rate.
또한, 본 발명의 실시예에 따른 메모리 컨트롤러에 있어서, 상기 버퍼 관리부는, 다수의 상기 쓰기 커맨드 중, 상기 제1 실행 비율에 따라 무작위로 일부를 선정하고, 선정된 일부에 대해서만 상기 버퍼링 동작을 실행하고, 다수의 상기 제1 읽기 커맨드 중, 상기 제2 실행 비율에 따라 무작위로 일부를 선정하고, 선정된 일부에 대해서만 상기 읽기 프리패치 동작을 실행할 수 있다.In addition, in the memory controller according to an embodiment of the present invention, the buffer management unit randomly selects a part from among a plurality of the write commands according to the first execution ratio, and executes the buffering operation on only the selected part and randomly selects a part of the plurality of first read commands according to the second execution ratio, and executes the read prefetch operation on only the selected part.
한편, 본 발명의 실시예에 따른 스토리지 디바이스는, 비휘발성 메모리; 버퍼 메모리; 및 청구항 1 내지 9 중 어느 한 항에 따른 메모리 컨트롤러;를 포함한다.Meanwhile, a storage device according to an embodiment of the present invention includes a non-volatile memory; buffer memory; and the memory controller according to any one of
본 발명의 특징 및 이점들은 첨부도면에 의거한 다음의 상세한 설명으로 더욱 명백해질 것이다.The features and advantages of the present invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawings.
이에 앞서 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이고 사전적인 의미로 해석되어서는 아니되며, 발명자가 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다.Prior to this, the terms or words used in the present specification and claims should not be construed as conventional and dictionary meanings, and the inventor may properly define the concept of the term to describe his invention in the best way. It should be interpreted as meaning and concept consistent with the technical idea of the present invention based on the principle that there is.
본 발명에 따르면, 실시간으로 버퍼 메모리의 트래픽을 검사하여 성능 병목 발생을 예측하고, 이에 따라 호스트의 쓰기 커맨드에 대응해서는 쓰기 버퍼를 거치지 않고 데이터를 호스트에서 스토리지 미디어로 바로 전달하고, 호스트의 읽기 커맨드에 대응해서는 읽기 완료 후에 읽기 프리패치를 생략함으로써, 특히 고대역 메모리를 스토리지 미디어로 사용하는 경우에 효율적으로 버퍼를 관리할 수 있다.According to the present invention, the occurrence of a performance bottleneck is predicted by inspecting the traffic of the buffer memory in real time, and accordingly, in response to a write command from the host, data is directly transferred from the host to the storage medium without going through the write buffer, and the host read command In response, by omitting read prefetch after read completion, buffers can be managed efficiently, especially when high-bandwidth memory is used as a storage medium.
도 1은 본 발명의 실시예에 따른 메모리 컨트롤러를 개략적으로 도시한 블록도이다.
도 2 내지 도 3은 도 1에 도시된 메모리 컨트롤러의 작동을 설명하기 위한 블록도이다.
도 4 내지 도 5는 본 발명의 실시예에 따른 메모리 컨트롤러의 작동 방법을 도시한 순서도이다.
도 6은 본 발명의 실시예에 따른 스토리지 디바이스를 개략적으로 도시한 블록도이다.
도 7은 본 발명의 실시예에 따른 스토리지 디바이스를 SSD에 적용한 예를 도시한 블록도이다.1 is a block diagram schematically illustrating a memory controller according to an embodiment of the present invention.
2 to 3 are block diagrams for explaining the operation of the memory controller shown in FIG. 1 .
4 to 5 are flowcharts illustrating a method of operating a memory controller according to an exemplary embodiment of the present invention.
6 is a block diagram schematically illustrating a storage device according to an embodiment of the present invention.
7 is a block diagram illustrating an example in which a storage device according to an embodiment of the present invention is applied to an SSD.
본 발명의 목적, 특정한 장점들 및 신규한 특징들은 첨부된 도면들과 연관되어지는 이하의 상세한 설명과 바람직한 실시예들로부터 더욱 명백해질 것이다. 본 명세서에서 각 도면의 구성요소들에 참조번호를 부가함에 있어서, 동일한 구성 요소들에 한해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 번호를 가지도록 하고 있음에 유의하여야 한다. 또한, "제1", "제2" 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하기 위해 사용되는 것으로, 구성요소가 상기 용어들에 의해 제한되는 것은 아니다. 이하, 본 발명을 설명함에 있어서, 본 발명의 요지를 불필요하게 흐릴 수 있는 관련된 공지 기술에 대한 상세한 설명은 생략한다.The objects, specific advantages and novel features of the present invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawings and preferred embodiments. In the present specification, in adding reference numbers to the components of each drawing, it should be noted that only the same components are given the same number as possible even though they are indicated on different drawings. Also, terms such as “first” and “second” are used to distinguish one component from another, and the component is not limited by the terms. Hereinafter, in describing the present invention, detailed descriptions of related known technologies that may unnecessarily obscure the gist of the present invention will be omitted.
이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시형태를 상세히 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 1은 본 발명의 실시예에 따른 메모리 컨트롤러를 개략적으로 도시한 블록도이고, 도 2 내지 도 3은 도 1에 도시된 메모리 컨트롤러의 작동을 설명하기 위한 블록도이다.1 is a block diagram schematically illustrating a memory controller according to an embodiment of the present invention, and FIGS. 2 to 3 are block diagrams for explaining an operation of the memory controller shown in FIG. 1 .
도 1 내지 도 3에 도시된 바와 같이, 본 발명의 실시예에 따른 메모리 컨트롤러는 비휘발성 메모리(200)에 기입될 데이터, 및 비휘발성 메모리(200)로부터 독출될 데이터를 버퍼 메모리(300)에 일시 저장하는 버퍼링 동작을 실행하는 메모리 컨트롤러(100)에 있어서, 데이터를 버퍼 메모리(300)에 일시 저장하는 요청인 다수의 버퍼 쓰기 리퀘스트(buffer write request), 및 버퍼 메모리(300)에 저장된 데이터를 독출하는 요청인 다수의 버퍼 읽기 리퀘스트(buffer read request)를 저장하는 버퍼 리퀘스트 큐(queue, 10)), 버퍼 리퀘스트 큐(10)에 저장된 다수의 버퍼 쓰기 리퀘스트 및 버퍼 읽기 리퀘스트 각각에 수록된 데이터의 길이를 합산하여 리퀘스트 데이터 총량을 실시간으로 산출하는 버퍼 트래픽 모니터링부(20), 및 실시간으로 산출된 리퀘스트 데이터 총량을 기반으로, 실행 비율을 설정하여, 버퍼링 동작의 실행을 제어하는 버퍼 관리부(30)를 포함한다.1 to 3 , the memory controller according to an embodiment of the present invention stores data to be written to the
본 발명은 비휘발성 메모리를 제어하는 메모리 컨트롤러에 관한 것이다. 비휘발성 메모리는 본 발명에 따른 메모리 컨트롤러에 의해 제어되고, 전원 공급이 차단되어도 정보 데이터를 보존할 수 있는 스토리지 미디어로서, 메모리 컨트롤러에 의해 제어되어 읽기, 프로그램 등과 같은 동작들을 수행한다. 이러한 비휘발성 메모리의 일례로는 EPROM, EEPROM, FRAM, PRAM, MRAM, 플래시 메모리(Flash Memory) 등을 들 수 있다. 비휘발성 메모리가 미디어로 채용된 스토리지 디바이스의 경우에 호스트의 쓰기 및 읽기 커맨드(command)의 처리 성능을 높이기 위해 버퍼 메모리를 쓰기 버퍼(write buffer) 또는 프리패치 버퍼(prefetch buffer)로 사용할 수 있는데, 호스트의 커맨드 처리 과정에서 버퍼 메모리에 대하여 발생하는 쓰기 및 읽기 데이터 트래픽(read and write data traffic)이 스토리지 디바이스 대비 매우 많기 때문에 버퍼 메모리에 성능 병목이 발생할 수 있는바, 이에 대한 해결방안으로서 버퍼 메모리를 관리할 수 있는 본 발명이 안출되었다.The present invention relates to a memory controller for controlling a non-volatile memory. The nonvolatile memory is controlled by the memory controller according to the present invention and is a storage medium capable of retaining information data even when power is cut off, and is controlled by the memory controller to perform operations such as reading and programming. Examples of the non-volatile memory include EPROM, EEPROM, FRAM, PRAM, MRAM, and flash memory. In the case of a storage device employing a non-volatile memory as a medium, the buffer memory can be used as a write buffer or a prefetch buffer to increase the processing performance of the host's write and read commands. Since the amount of read and write data traffic that occurs to the buffer memory in the process of processing the host's command is much higher than that of the storage device, the buffer memory may become a performance bottleneck. As a solution to this, the buffer memory is used. A manageable invention has been devised.
구체적으로, 본 발명에 따른 메모리 컨트롤러(100)는 버퍼 리퀘스트 큐(10), 버퍼 트래픽 모니터링부(20), 및 버퍼 관리부(30)를 포함한다.Specifically, the
버퍼 리퀘스트 큐(buffer request queue, 10)는 버퍼 메모리(300)에 대한 적어도 하나 이상의 버퍼 쓰기 리퀘스트 및/또는 버퍼 읽기 리퀘스트(request)를 저장하는 큐(queue)로 구성된다. 본 발명의 실시예에 따른 메모리 컨트롤러(100)는 호스트(400)로부터 쓰기 커맨드(write command) 또는 읽기 커맨드(read command)를 수신하여 처리하는데, 버퍼 메모리(300)를 사용함으로써 커맨드 처리 성능을 향상시킬 수 있다. 호스트 쓰기 커맨드에 대한 응답 속도 개선을 위해 비휘발성 메모리(200)에 기입될 쓰기 데이터를 버퍼 메모리(300)에 일시 저장하는 쓰기 버퍼링(write buffering)을 수행할 수 있으며, 호스트 읽기 커맨드의 패턴을 파악하여 향후 읽기 커맨드가 요청될 것이라고 예상되는 논리 블록 주소(LBA, Logical Block Address)의 데이터를 비휘발성 메모리(200)로부터 버퍼 메모리(300)로 미리 읽어들이는 프리패치(prefetch) 작업을 수행할 수 있다. 쓰기 버퍼링이나 읽기 프리패치 이외에도 소프트웨어 코드 실행이나 메타 데이터(meta-data) 저장 등을 위해 버퍼 메모리(300)에 대한 다수의 버퍼 쓰기 및 읽기 리퀘스트가 동시 다발적으로 발생하는데, 이러한 다수의 버퍼 리퀘스트들이 버퍼 리퀘스트 큐(10)에 저장된다.The
버퍼 쓰기 리퀘스트에는 리퀘스트를 전달한 마스터(master) 정보, 쓰기 주소 정보(ADDR1)와 기입될 데이터가 포함되는데, 그 주소 정보(ADDR1)에는 접근하는 버퍼 영역의 시작 주소 및 데이터의 길이를 포함한 정보가 수록된다. 버퍼 읽기 리퀘스트에는 리퀘스트를 전달한 마스터(master) 정보와 읽기 주소 정보(ADDR2)가 포함되고, 그 주소 정보(ADDR2)에는 독출될 읽기 데이터가 위치한 버퍼 영역의 시작 주소와 그 데이터의 길이를 포함한 정보가 수록된다. The buffer write request includes master information, write address information (ADDR1), and data to be written. The address information (ADDR1) contains information including the start address of the buffer area to be accessed and the length of the data. do. The buffer read request includes master information and read address information (ADDR2) that have delivered the request, and the address information (ADDR2) contains information including the start address of the buffer area where the read data to be read is located and the length of the data. are included
버퍼 리퀘스트 큐(10)에 저장된 리퀘스트는 버퍼 메모리 컨트롤러(15)에 의해 페치(fetch)되어 버퍼 쓰기 및/또는 읽기 연산이 수행될 수 있다. 버퍼 쓰기 리퀘스트인 경우, 리퀘스트 내의 쓰기 주소 정보를 이용하여 버퍼 쓰기를 위한 신호를 생성하여 버퍼 메모리(300)에 전달하고 쓰기 데이터를 버퍼 메모리(300)에 전달하여 버퍼 쓰기 연산을 수행할 수 있다. 쓰기 연산 수행 결과는 리퀘스트 내의 마스터(master) 정보에 따라 리퀘스트를 생성한 모듈로 전달될 수 있다. 버퍼 읽기 리퀘스트인 경우에는 리퀘스트 내의 읽기 주소 정보를 이용하여 버퍼 읽기를 위한 신호를 생성하여 버퍼 메모리(300)에 전달하고 버퍼 메모리(300)로부터 읽기 데이터을 전달받아 리퀘스트 내의 마스터(master) 정보에 따라 대상 모듈로 읽기 데이터를 반환할 수 있다.The request stored in the
버퍼 메모리(300)는 스토리지 성능을 개선하기 위하여 데이터를 임시로 저장하는 용도로 사용된다. 구체적으로, 도 2를 참고로, 호스트(400)의 쓰기 커맨드를 수신하는 경우에, 메모리 컨트롤러(100)는 쓰기 버퍼링(write buffering) 및 버퍼 플러시(buffer flush)를 수행할 수 있다. 우선, 호스트(400)로부터 쓰기 커맨드를 수신하면, 버퍼 메모리(buffer memory, 300)에 버퍼 공간을 할당하고, 할당된 버퍼 공간에 호스트 데이터를 임시 저장할 버퍼 쓰기 리퀘스트를 버퍼 리퀘스트 큐(10)로 전송한다. 버퍼 메모리 컨트롤러(15)가 해당 버퍼 쓰기 리퀘스트를 처리한 후 버퍼 쓰기 연산 결과를 성공적으로 반환하면, 호스트 쓰기 커맨드에 대한 컴플리션(write completion)을 호스트(400)로 전송한다. 이러한 처리 과정을 쓰기 버퍼링이라고 한다. 다음에, 버퍼링된 데이터를 비휘발성 메모리(200)로 플러시하기 위해서, 메모리 채널 컨트롤러(60)로 해당 데이터에 대한 프로그램 리퀘스트를 전달한다. 메모리 채널 컨트롤러(60)는 버퍼 읽기 리퀘스트를 통해 데이터를 버퍼 메모리 컨트롤러(15)로부터 전달받은 후, 비휘발성 메모리에 대한 프로그램 오퍼레이션(operation)을 수행하고, 프로그램 컴플리션을 반환한다. 프로그램이 완료되면 데이터가 저장된 위치를 맵핑 테이블(mapping table)에 기록하고, 할당된 버퍼 공간을 해제한다. 이상의 처리 과정을 버퍼 플러시라고 한다. 한편, 도 3을 참고로, 호스트(400)의 읽기 커맨드가 입력된 경우에는, 먼저 버퍼 메모리(300)에 요청된 데이터가 존재하는지 검색한다. 버퍼 메모리(300) 내에 데이터가 존재하면, 버퍼 리퀘스트 큐(10)로 버퍼 읽기 리퀘스트를 전송하고, 버퍼 메모리 컨트롤러(15)가 해당 리퀘스트를 처리하여 데이터를 반환하면, 호스트(400)로 데이터를 전송하고 컴플리션을 전송한다. 반면, 버퍼 메모리(300)에 데이터가 존재하지 않으면, 맵핑 테이블을 참조하여 데이터가 위치한 비휘발성 메모리(200) 상의 물리적 주소(physical address)를 얻어 메모리 채널 컨트롤러(60)에 읽기 리퀘스트를 전송하고, 이에 따라 호스트(400)로 비휘발성 메모리(200)의 데이터 및 컴플리션을 전달한다. 일반적으로 버퍼 메모리(300)가 비휘발성 메모리(200)보다 접근 속도가 빠르기 때문에 호스트 읽기가 요청될 데이터를 예측하여 미리 비휘발성 메모리(200)에서 버퍼 메모리(300)로 데이터를 읽어 들이면 호스트 읽기 성능을 개선할 수 있다. 예를 들어, 기존 처리 완료된 호스트의 제1 읽기 커맨드와 연속적인 논리 블록 주소(LBA)를 가지는 호스트 데이터를 비휘발성 메모리(200)에서 읽은 후 버퍼 쓰기 리퀘스트를 통해 버퍼 메모리(300)에 일시 저장한 후, 향후 해당 논리 블록 주소를 가지는 호스트의 제2 읽기 커맨드가 도착하면 버퍼 메모리(300)에서 호스트(400)로 데이터를 전달할 수 있다. 이러한 동작을 읽기 프리패치라고 정의한다.The
전술한 버퍼 메모리(300)의 용도 이외에도 소프트웨어 코드 실행이나 메타 데이터 액세스 등과 같은 다양한 버퍼 쓰기 및 읽기 리퀘스트가 발생할 수 있다. 또한, 읽기 프리패치의 경우 해당 논리 블록 주소에 대한 읽기 리퀘스트가 발생하지 않으면 버퍼 메모리(300)의 대역폭(bandwidth)이 낭비된다. 따라서, 버퍼 메모리(300)에 성능 병목이 발생할 수 있다.In addition to the above-described use of the
버퍼 트래픽 모니터링부(20)는 실시간으로 버퍼 리퀘스트 큐(10)의 상태를 감시하여, 버퍼 메모리(300)의 성능 병목 발생 여부를 판별한다. 버퍼 메모리(300)에 성능 병목이 발생하는 경우 버퍼 리퀘스트 큐(10)로 리퀘스트가 입력되는 속도가 큐(10)에서 페치되는 속도보다 빠르기 때문에 큐(10) 내에 페치(fetch)되지 않은 다량의 리퀘스트가 존재하게 된다. 버퍼 리퀘스트 별로 쓰기 또는 읽기 요청된 데이터의 길이가 상이할 수 있으므로, 성능 병목을 정밀하게 판별하기 위해서는 리퀘스트 내의 데이터 길이 정보를 이용할 수 있다. 일실시예로서, 버퍼 리퀘스트 큐(10)에 저장된 다수의 쓰기 리퀘스트, 및/또는 읽기 리퀘스트 각각에 포함된 데이터의 길이를 총합함으로써, 페치되지 않고 처리 대기 중인 데이터(이하 '리퀘스트 데이터'라 함)의 총량을 산출할 수 있다. 이때, 리퀘스트 데이터 총량이 기설정된 상한값(upper limit)을 초과하면, 버퍼 메모리(300)에 대한 성능 병목이라고 판별할 수 있다. 반대로 리퀘스트 데이터 총량이 기설정된 하한값(lower limit) 미만이면 버퍼 메모리 대역폭이 충분히 활용되지 못한다고 판별할 수 있다. 리퀘스트 데이터 총량이 상기 상한값 이하이고 상기 하한값 이상이면 버퍼 메모리(300)의 대역폭이 충분히 활용되는 동시에 버퍼 메모리(300)의 성능 병목 문제가 없음을 나타낼 수 있다. 따라서, 버퍼 트래픽 모니터링부(20)가 생성한 리퀘스트 데이터 총량을 기반으로 버퍼 관리부(30)가 버퍼의 대역폭을 효율적으로 관리할 수 있다.The buffer
버퍼 관리부(30)는 버퍼 트래픽 모니터링부(20)가 실시간으로 산출한 리퀘스트 데이터 총량을 기반으로, 실행 비율을 설정하고, 상기 실행 비율에 따라 비휘발성 메모리(200)에 기입될 데이터 및 비휘발성 메모리(200)로부터 독출될 데이터를 버퍼 메모리(300)에 일시 저장하는 버퍼링 동작 실행을 제어하는 방식으로 버퍼 메모리(300)를 관리한다. 상기 버퍼링 동작에는 쓰기 버퍼링 및 읽기 프리패치가 포함되는바, 쓰기 버퍼링 실행, 및/또는 읽기 프리패치 실행 비율을 조절하는 방식으로 버퍼 메모리(300)를 관리할 수 있다. 이때, 쓰기 버퍼링과 읽기 프리패치를 구별하여 각각에 대한 동작 실행을 제어할 수 있다.The
메모리 컨트롤러(100)는 기설정된 초기 실행 비율에 따라 버퍼링 동작을 실행할 수 있는데, 버퍼에 대한 리퀘스트 데이터 총량이 기설정된 상한값을 초과하면, 초기 실행 비율을 하향 조정하여 실행 비율을 설정하고, 그 실행 비율에 따라 버퍼링 동작(예를 들어, 쓰기 버퍼링 실행 및/또는 읽기 프리패치 실행)을 생략할 수 있다. 예를 들어, 초기 버퍼링 비율이 100%인 경우, 리퀘스트 데이터 총량이 기설정된 상한값을 초과하면, 쓰기 버퍼링 비율을 70%로 하향 조정한 후, 호스트 쓰기 커맨드 중 70%에 대해서만 쓰기 버퍼링을 실행하며, 나머지 30%에 대해서는 쓰기 버퍼링을 생략하고 쓰기 데이터를 비휘발성 메모리(200)로 바로 전달할 수 있다. 이때, 쓰기 버퍼링 비율이 제한되었음에도 그 후 실시간으로 산출된 리퀘스트 데이터 총량이 기설정된 상한값을 초과하면 쓰기 버퍼링 비율을 정해진 값만큼 다시 하향 조정할 수 있다. 즉, 쓰기 버퍼링의 하향 조정은, 실시간으로 산출된 리퀘스트 데이터 총량이 기설정된 상한값 이하가 될 때까지 반복될 수 있다. 반면, 리퀘스트 데이터 총량이 기설정된 하한값 미만이 되면, 쓰기 버퍼링 비율을 정해진 값만큼 상향 조정할 수 있다. 이와 같은 쓰기 버퍼링 실행 비율의 동적 변경은 리퀘스트 데이터 총량이 바람직한 범위 내, 예를 들어 기설정된 상한값 이하이고 하한값 이상의 범위 내에 들어오면 멈추게 된다. 리퀘스트 데이터 총량이 상기 바람직한 범위는 아니지만 포화 조건 (saturation condition), 예를 들어 초기 실행 비율에 도달하면 쓰기 버퍼링에 대한 실행 비율이 그대로 유지될 수 있다. 일실시예로, 리퀘스트 데이터 총량이 기설정된 하한값 미만이라고 하더라도, 쓰기 버퍼링 비율이 초기와 같이 이미 100%로 포화되어 있다면 비율 조정은 일어나지 않을 수 있다. 읽기 프리패치의 실행 제한도 전술한 쓰기 버퍼링 실행 제한과 동일한 원리로 실행 비율이 조절되는바, 자세한 설명은 생략한다. The
한편, 쓰기 버퍼링의 실행 비율과 읽기 프리패치의 실행 비율은 동일하거나 상이할 수 있으므로, 제1 실행 비율을 설정하여 쓰기 버퍼링 동작의 실행이 제어될 때에, 제1 실행 비율과 동일하거나 이와 다른 제2 실행 비율을 설정하여 읽기 프리패치 동작의 실행을 제어할 수 있다. 또한, 쓰기 버퍼링 및/또는 읽기 프리패치 실행 비율의 상향 및 하향 정도는 산출된 상기 리퀘스트 데이터 총량에 대응하여 상이하게 설정될 수 있다. 일실시예로 상한값 초과 정도, 및 하한값 미만 정도에 따라 각각 구간별로 기설정된 실행 비율 변동량을 적용하여 실행 비율을 조정할 수 있다. 일례로 아래 <표 1>과 같이 쓰기 버퍼링 및 읽기 프리패치 각각에 대한 실행 비율의 변동량을 정할 수 있다.Meanwhile, since the execution ratio of the write buffering and the execution ratio of the read prefetch may be the same or different, when the execution of the write buffering operation is controlled by setting the first execution ratio, the second execution ratio equal to or different from the first execution ratio You can control the execution of read prefetch operations by setting the execution rate. In addition, the upward and downward degrees of the write buffering and/or read prefetch execution ratio may be set differently according to the calculated total amount of request data. In an embodiment, the execution ratio may be adjusted by applying a preset execution ratio variation for each section according to the degree of exceeding the upper limit and the degree of less than the lower limit. As an example, as shown in <Table 1> below, it is possible to determine the amount of variation in the execution ratio for each of the write buffering and read prefetching.
상기 일실시예에서, 리퀘스트 데이터 총량에 따른 쓰기 버퍼링 및 읽기 프리패치 실행 비율 변동량은 기설정된 것이고, 버퍼 트래픽 모니터링부(20)에서 실시간으로 산출한 리퀘스트 총량을 적용하여 쓰기 버퍼링, 및/또는 읽기 프리패치 비율을 조절한다. 예를 들어, 어느 일시점에서 변경 설정된 쓰기 버퍼링 실행 비율이 90%이고 읽기 프리패치 실행 비율이 70%일 때, 산출된 리퀘스트 데이터 총량이 200KB 초과 250 KB 미만이면, 각각에 대한 실행 비율 변동량을 적용하여, 쓰기 버퍼링 및 읽기 프리패치 비율을 각각 80% (= 90-10 %), 40% (= 70-30%)로 변경할 수 있다.한편, 실행 비율에 따라 쓰기 버퍼링 및/또는 읽기 프리패치 실행을 생략하는 경우에, 그 실행이 생략되는 호스트 쓰기 커맨드 및/또는 읽기 커맨드를 선정할 필요가 있다. 따라서, 버퍼 관리부(30)는 다수의 호스트 쓰기 커맨드 및 읽기 커맨드 각각의 실행 비율에 따라 무작위로 일부를 선정하고 선정된 일부에 대해서만 버퍼링 동작 및 읽기 프리패치 동작을 실행할 수 있다. 일실시예로 랜덤넘버에 따라 무작위로 호스트 커맨드를 선정할 수 있는데, 예를 들어 호스트 쓰기 커맨드가 입력될 때에, 호스트 쓰기 버퍼링 실행 비율이 70%인 경우, 1과 100 사이의 랜덤넘버를 생성하여 그 값이 70 이하이면 쓰기 버퍼링을 실행하고 그렇지 않으면 쓰기 버퍼링을 생략할 수 있다. 호스트이 읽기 커맨드에 대해서도 동일한 방식을 적용할 수 있고, 이때 쓰기 커맨드 및 읽기 커맨드 각각의 실행 비율은 동일하거나 상이할 수 있다.In the above embodiment, the amount of change in the write buffering and read prefetch execution ratio according to the total amount of request data is preset, and the total amount of requests calculated in real time by the buffer
한편, 버퍼 관리부(30)는, 성능 병목 발생 여부와 별개로, 버퍼 메모리(300)의 버퍼 영역을 감시하여 쓰기 버퍼링 및/또는 읽기 프리패치 실행을 제한할 수도 있다. 이 경우, 버퍼 관리부(30)는 쓰기 데이터가 일시 저장되거나, 또는 읽기 데이터가 프리패치되는 버퍼 영역의 사이즈를 산출하고, 산출된 버퍼 영역의 사이즈를 기반으로 상기 실행을 제한할 수 있다. 이때, 버퍼 영역의 사이즈에 관한 임계값을 기설정하고, 산출된 사이즈와 상기 임계값을 비교하여, 그 임계값을 초과하는 경우에 상기 실행을 제한할 수 있다.Meanwhile, the
전술한 버퍼 트래픽 모니터링부(20) 및/또는 버퍼 관리부(30)는 하드웨어 또는 소프트웨어로 구현될 수 있다. 즉, 메모리 컨트롤러(100) 내부에 위치한 디지털 또는 아날로그 회로 형태로 구현되거나, 별도의 칩 또는 모듈로 구현되어 메모리 컨트롤러(100)에 연결될 수 있으며, SRAM과 같은 내장 메모리나 플로피 디스크, 컴팩트 디스크, USB 등과 같은 외장 메모리에 소프트웨어를 저장하고 실행하는 방식으로 구현될 수 있고, 또한 사용자에 의해 프로그램될 수 있는 형태로 구현될 수도 있다. 나아가, 버퍼 메모리 컨트롤러(15) 또는 다른 내장 모듈 등에 통합될 수도 있다.The above-described buffer
발명에 따른 메모리 컨트롤러(100)는 호스트(400)와의 인터페이스를 제공하는 수단으로서, 호스트 인터페이스(40)를 더 포함할 수 있다. 호스트 인터페이스(40)는 적어도 하나 이상의 채널이나 포트들을 통해 호스트(400)와 연결될 수 있다. 예를 들어, 호스트 인터페이스(40)는 PATA 버스(parallel AT attachment bus), SATA 버스(serial AT attachment), PCIe 버스(peripheral component interconnect express) 중 어느 하나 또는 이들 모두를 통해 호스트(400)와 연결될 수 있다. 또는, SCSI, USB 등을 통해 외부와 연결될 수도 있다. The
또한, 본 발명에 따른 메모리 컨트롤러(100)는 비휘발성 메모리(200)와의 인터페이스를 제공하는 수단으로서, 메모리 채널 컨트롤러(60)를 더 포함할 수 있다. 여기서 비휘발성 메모리(200)는 플래시 메모리, PRAM, MRAM, ReRAM, FRAM 등으로 구현될 수 있고, 다수의 비휘발성 메모리(200)를 지원하기 위해 다수의 메모리 채널 컨트롤러(60)가 사용될 수 있다. 이때, 하나의 메모리 채널 컨트롤러(60)에는 하나 또는 그 이상의 비휘발성 메모리(200)가 연결될 수 있고, 하나의 메모리 채널 컨트롤러(60)에 연결되는 비휘발성 메모리(200)들은 동일한 데이터 버스를 공유할 수 있다.In addition, the
한편, 본 발명에 따른 메모리 컨트롤러(100)는 호스트(400)의 리퀘스트를 처리하기 위해, 프로세서(processor, 50)를 더 포함할 수 있다. 프로세서(50)는 마이크로 컨트롤 유닛(MCU), 중앙처리장치(CPU) 등으로 구현될 수 있다. 프로세서(50)는 호스트(400)로부터 전송된 쓰기 커맨드, 읽기 커맨드를 처리하는 일 구성으로서, 상기 커맨드 처리에 필요한 소프트웨어를 구동하여 메모리 컨트롤러(100)의 기능을 제어할 수 있다. 이러한 프로세서(50)는 플래시 변환 계층(FTL)과 같은 소프트웨어를 구동할 수 있다. 플래시 변환 계층은 상기 메모리 채널 컨트롤러(60)의 실행을 제어하고, 가비지 컬렉션(Garbage Collection, GC)을 수행할 수 있다. 여기서, 프로세서(50)에 의해 구동되는 소프트웨어는 버퍼 메모리(300)에 저장될 수 있다. Meanwhile, the
이하에서는 호스트로부터 읽기 커맨드, 및 쓰기 커맨드를 각각 수신하는 실시예를 들어 본 발명에 따른 메모리 컨트롤러를 보다 자세하게 설명한다. Hereinafter, a memory controller according to the present invention will be described in more detail by taking an embodiment in which a read command and a write command are respectively received from the host.
도 4 내지 도 5는 본 발명의 실시예에 따른 메모리 컨트롤러의 작동 방법을 도시한 순서도로서, 도 4는 호스트 쓰기 커맨드에 대한 작동 방법을, 도 5는 호스트 읽기 커맨드에 대한 작동 방법을 각각 나타낸다.4 to 5 are flowcharts illustrating a method of operating a memory controller according to an embodiment of the present invention. FIG. 4 illustrates an operation method for a host write command and FIG. 5 illustrates an operation method for a host read command, respectively.
도 4를 참고로, 메모리 컨트롤러가 호스트 쓰기 커맨드를 수신하면, 먼저 버퍼 메모리의 버퍼가 풀(full) 상태인지 검사한다. 풀 상태이면 쓰기 버퍼링 실행이 불가능하므로, 쓰기 커맨드에 대응되는 데이터를 비휘발성 메모리로 전달하고, 해당 데이터의 논리 블록 주소(LBA, Logical Block Address)를 물리 주소로 변환하는 맵핑(LBA-to-physical address) 업데이트를 수행한 후에, 처리 완료 신호(completion)를 호스트에 전달한다. 버퍼가 풀 상태가 아닌 경우에는, 1과 100 사이의 랜덤 넘버를 생성하고, 쓰기 버퍼링 실행 비율과 비교하여 실행 비율보다 큰 값이면 쓰기 버퍼링을 생략한다. 즉, 버퍼가 풀 상태인 경우와 동일한 방식으로 처리한다. 반면, 랜덤 넘버가 쓰기 버퍼링 실행 비율 이하이면, 버퍼 메모리에 버퍼 영역을 할당하고 해당 데이터를 버퍼 메모리에 전달하여 쓰기 버퍼에 일시 저장하며, 해당 쓰기 데이터의 논리 블록 주소(LBA, Logical Block Address)를 쓰기 버퍼 LBA 리스트에 삽입하고, 처리 완료 신호(completion)를 호스트에 전달하는 일련의 쓰기 버퍼링을 수행한다. 이때, 읽기 프리패치 버퍼 LBA 리스트에 해당 쓰기 데이터의 LBA가 존재하면 이를 삭제한다. 다음에 쓰기 버퍼에 저장된 해당 데이터를 비휘발성 메모리로 전달하는 버퍼 플러시를 실행하고, LBA를 물리 주소로 변환하는 맵핑(LBA-to-physical address) 업데이트를 수행한 후에, 쓰기 버퍼 LBA 리스트에서 해당 LBA를 삭제한다. Referring to FIG. 4 , when the memory controller receives a host write command, it is first checked whether the buffer of the buffer memory is in a full state. In the full state, write buffering cannot be executed, so the data corresponding to the write command is transferred to the non-volatile memory and a mapping (LBA-to-physical) that converts the logical block address (LBA) of the data into a physical address address), after performing the update, a processing completion signal (completion) is transmitted to the host. If the buffer is not in the full state, a random number between 1 and 100 is generated, and compared with the write buffering execution ratio, if the value is greater than the execution ratio, the write buffering is omitted. That is, it is processed in the same way as when the buffer is full. On the other hand, if the random number is less than the write buffering execution rate, a buffer area is allocated in the buffer memory, the data is transferred to the buffer memory, and temporarily stored in the write buffer, and the logical block address (LBA, Logical Block Address) of the write data is stored. It inserts into the write buffer LBA list and performs a series of write buffering that delivers a processing completion signal to the host. At this time, if there is an LBA of the corresponding write data in the read prefetch buffer LBA list, it is deleted. Next, after executing a buffer flush that transfers the data stored in the write buffer to the non-volatile memory, and updating the LBA-to-physical address that translates the LBA into a physical address, the LBA in the write buffer LBA list delete
도 5를 참고로, 호스트로부터 읽기 커맨드를 수신한 경우에는, 버퍼 메모리의 쓰기 버퍼에 읽기 커맨드에 대응하는 해당 데이터가 존재하는지 검색하여, 해당 데이터가 존재하면 그 데이터를 호스트에 전달하고, 쓰기 버퍼에 데이터가 존재하지 않으면 버퍼 메모리의 프리패치 버퍼를 검색하여 프리패치 버퍼에 해당 데이터가 존재하며, 그 데이터를 호스트에 전달한다. 버퍼 메모리에 해당 데이터가 존재하지 않는 경우에는 비휘발성 메모리에서 호스트로 데이터를 전달한다. 이렇게 데이터가 호스트로 전달되는 경우, 읽기 프리패치 실행 비율에 따라 읽기 프리패치를 수행하는데, 1과 100 사이의 랜덤 넘버를 생성하여 실행 비율보다 크면 읽기 프리패치의 실행을 생략하고, 그렇지 않으면 읽기 프리패치를 수행한다.Referring to FIG. 5 , when a read command is received from the host, it is searched for whether data corresponding to the read command exists in the write buffer of the buffer memory, and if the data exists, the data is transmitted to the host, and the write buffer If there is no data in the buffer memory, the prefetch buffer of the buffer memory is searched and the data is present in the prefetch buffer, and the data is delivered to the host. When the corresponding data does not exist in the buffer memory, the data is transferred from the nonvolatile memory to the host. When data is transferred to the host in this way, read prefetch is performed according to the read prefetch execution ratio. A random number between 1 and 100 is generated and if it is greater than the execution ratio, the read prefetch execution is omitted. perform the patch.
본 발명에 따른 메모리 컨트롤러는 스토리지 디바이스에 적용될 수 있는데, 이하에서 설명한다.The memory controller according to the present invention can be applied to a storage device, which will be described below.
도 5는 본 발명의 실시예에 따른 스토리지 디바이스를 개략적으로 도시한 블록도이고, 도 6은 본 발명의 실시예에 따른 스토리지 디바이스를 SSD에 적용한 예를 도시한 블록도이다.5 is a block diagram schematically illustrating a storage device according to an embodiment of the present invention, and FIG. 6 is a block diagram illustrating an example in which the storage device according to an embodiment of the present invention is applied to an SSD.
도 5에 도시된 바와 같이, 본 발명의 실시예에 따른 스토리지 디바이스(1000)는 비휘발성 메모리(200), 버퍼 메모리(300); 및 비휘발성 메모리(200)를 제어하고, 버퍼 메모리(300)를 관리하는 메모리 컨트롤러(100)를 포함할 수 있다.As shown in FIG. 5 , a
여기서, 스토리지 디바이스(1000)는 메모리 카드나 착탈 가능한 이동식 저장 장치를 포함할 수 있다. 스토리지 디바이스(1000)는 호스트(2000)와 연결되어 사용되고, 호스트(2000) 인터페이스를 통해 호스트(2000)와 데이터를 주고 받는다. 이때, 스토리지 디바이스(1000)는 호스트(2000)로부터 전원을 공급받아 내부 동작을 수행할 수 있다.Here, the
비휘발성 메모리(200)는 플래시 메모리 등일 수 있고, 메모리 컨트롤러(100)는 전술한 바와 같이 비휘발성 메모리(200)를 제어하고, 버퍼 메모리(300)의 성능 병목을 판별하여 이를 관리할 수 있도록 기능화되며, 버퍼 메모리(300)는 호스트(2000)에서 비휘발성 메모리(200)로, 또는 비휘발성 메모리(200)에서 호스트(2000)로 전송될 데이터를 버퍼링하는 데 사용되는 것으로, 이들 각각에 대해서는 전술하였는바 자세한 설명은 생략한다.The
또한, 도 6을 참고로, 본 발명에 따른 스토리지 디바이스(1000)는 솔리드 스테이트 드라이브(Solid State Drive, SSD)일 수도 있다. Also, referring to FIG. 6 , the
SSD는 호스트(2000)와 연결되기 때문에, 호스트(2000)는 SSD에 데이터를 쓰거나 SSD에 저장된 데이터를 읽을 수 있다. SSD는 호스트(2000) 인터페이스를 통해 호스트(2000)와 신호를 교환하고 전원 커넥터를 통해 전원을 공급받을 수 있다. SSD는 다수의 비휘발성 메모리(200), 및 SSD 컨트롤러를 포함할 수 있는데, 여기서 비휘발성 메모리(200)는 플래시 메모리 이외에도 PRAM, MRAM, ReRAM, FRAM 등으로 구현될 수 있고, 복수의 비휘발성 메모리(200)가 복수의 채널을 통해 SSD 컨트롤러와 연결될 수 있다. 이때, 하나의 채널에는 하나 또는 그 이상의 비휘발성 메모리(200)가 연결될 수 있고, 하나의 채널에 연결되는 비휘발성 메모리(200)는 동일한 데이터 버스에 연결될 수 있다.Since the SSD is connected to the
한편, 본 발명에 따른 메모리 컨트롤러(100)는 SSD 컨트롤러로서 제공되어, 호스트(2000) 인터페이스를 통해 호스트(2000)와 신호를 주고받는다. 여기서, 신호를 통해 커맨드, 어드레스, 데이터 등이 전달될 수 있고, 호스트(2000)의 커맨드에 따라 해당 비휘발성 메모리(200)에 데이터를 쓰거나 해당 비휘발성 메모리(200)로부터 데이터를 읽어낸다. Meanwhile, the
이상 본 발명을 구체적인 실시예를 통하여 상세히 설명하였으나, 이는 본 발명을 구체적으로 설명하기 위한 것으로, 본 발명은 이에 한정되지 않으며, 본 발명의 기술적 사상 내에서 당 분야의 통상의 지식을 가진 자에 의해 그 변형이나 개량이 가능함이 명백하다.Although the present invention has been described in detail through specific examples, this is intended to describe the present invention in detail, and the present invention is not limited thereto, and by those of ordinary skill in the art within the technical spirit of the present invention. It is clear that the modification or improvement is possible.
본 발명의 단순한 변형 내지 변경은 모두 본 발명의 영역에 속한 것으로 본 발명의 구체적인 보호 범위는 첨부된 특허청구범위에 의하여 명확해질 것이다.All simple modifications and variations of the present invention belong to the scope of the present invention, and the specific scope of protection of the present invention will be made clear by the appended claims.
10: 리퀘스트 큐 15: 버퍼 메모리 컨트롤러
20: 버퍼 트래픽 모니터링부 30: 버퍼 관리부
40: 호스트 인터페이스 50: 프로세서
60: 메모리 채널 컨트롤러 100: 메모리 컨트롤러
200: 비휘발성 메모리 300: 버퍼 메모리
400, 2000: 호스트 1000: 스토리지 디바이스10: request queue 15: buffer memory controller
20: buffer traffic monitoring unit 30: buffer management unit
40: host interface 50: processor
60: memory channel controller 100: memory controller
200: non-volatile memory 300: buffer memory
400, 2000: host 1000: storage device
Claims (10)
다수의 상기 호스트의 쓰기 커맨드, 및 읽기 커맨드 각각에 대응하여, 상기 데이터를 상기 버퍼 메모리에 일시 저장하는 요청인 다수의 버퍼 쓰기 리퀘스트(buffer write request), 및 상기 버퍼 메모리에 저장된 상기 데이터를 독출하는 요청인 다수의 버퍼 읽기 리퀘스트(buffer read request)를 저장하는 버퍼 리퀘스트 큐(queue);
상기 버퍼 리퀘스트 큐에 저장되되, 미실행된 다수의 상기 버퍼 쓰기 리퀘스트 및 미실행된 상기 버퍼 읽기 리퀘스트 각각에 수록된 상기 데이터의 길이를 합산하여 리퀘스트 데이터 총량을 실시간으로 산출하는 버퍼 트래픽 모니터링부; 및
실시간으로 산출된 상기 리퀘스트 데이터 총량을 기반으로, 실행 비율을 설정하여, 상기 실행 비율에 따라 다수의 상기 호스트의 쓰기 커맨드 및 읽기 커맨드 중 무작위로 선정된 일부에 대한 상기 버퍼링의 동작 실행을 제한하는 버퍼 관리부;를 포함하며,
상기 버퍼링의 동작 실행이 제한되는 일부의 상기 쓰기 커맨드에 대해서는, 상기 쓰기 버퍼링을 생략하고, 기입될 상기 데이터를 상기 비휘발성 메모리로 전달하며,
상기 버퍼링의 동작 실행이 제한되는 일부의 상기 읽기 커맨드에 대해서는, 상기 읽기 프리패치를 생략하고,
상기 버퍼 관리부는,
기설정된 초기 실행 비율에 따라 상기 버퍼링 동작을 실행하되, 실시간으로 산출된 상기 리퀘스트 데이터 총량이 기설정된 상한값 초과이면, 상기 초기 실행 비율을 하향 조정하여, 상기 실행 비율을 설정하는 메모리 컨트롤러.
Write buffering for temporarily storing data to be written into the non-volatile memory in response to a write command from the host, and read from the non-volatile memory in anticipation of a subsequent read command that will occur continuously after processing of the read command from the host is completed A memory controller for executing a buffering operation including a read prefetch for temporarily storing data to be used in the buffer memory,
In response to each of a plurality of write commands and read commands of the host, a plurality of buffer write requests, which are requests for temporarily storing the data in the buffer memory, and a plurality of buffer write requests for reading the data stored in the buffer memory is a buffer request queue that stores a number of buffer read requests that are requests;
a buffer traffic monitoring unit stored in the buffer request queue and calculating a total amount of request data in real time by summing the lengths of the data included in each of the plurality of unexecuted buffer write requests and the unexecuted buffer read requests; and
A buffer configured to set an execution ratio based on the total amount of the request data calculated in real time, and limit the execution of the buffering operation for a part randomly selected among write commands and read commands of the plurality of hosts according to the execution ratio management; including;
For some of the write commands in which the execution of the buffering operation is restricted, the write buffering is omitted and the data to be written is transferred to the non-volatile memory;
For some of the read commands in which the execution of the buffering operation is restricted, the read prefetch is omitted,
The buffer management unit,
The memory controller performs the buffering operation according to a preset initial execution ratio, but sets the execution ratio by lowering the initial execution ratio when the total amount of the request data calculated in real time exceeds a preset upper limit.
상기 버퍼 관리부는,
실시간으로 산출된 상기 리퀘스트 데이터 총량이 기설정된 하한값 이상이고 상기 상한값 이하가 될 때까지, 반복적으로 하향 조정하여 상기 실행 비율을 설정하는 메모리 컨트롤러.
The method according to claim 1,
The buffer management unit,
The memory controller for setting the execution ratio by repeatedly adjusting downward until the total amount of the request data calculated in real time is equal to or greater than a predetermined lower limit and less than or equal to the upper limit.
상기 버퍼 관리부는,
실시간으로 산출된 상기 리퀘스트 데이터 총량이 상기 하한값 미만이면, 상기 실행 비율을 상향 조정하는 메모리 컨트롤러.
4. The method according to claim 3,
The buffer management unit,
If the total amount of the request data calculated in real time is less than the lower limit, the memory controller increases the execution ratio.
상기 버퍼 관리부는,
실시간으로 산출된 상기 리퀘스트 데이터 총량이 상기 하한값 미만이더라도, 설정된 상기 실행 비율이 상기 초기 실행 비율과 동일하면, 상기 실행 비율을 유지하는 메모리 컨트롤러.
5. The method according to claim 4,
The buffer management unit,
Even if the total amount of the request data calculated in real time is less than the lower limit value, the memory controller maintains the execution ratio when the set execution ratio is the same as the initial execution ratio.
상기 버퍼 관리부는,
상기 상한값 초과 정도, 및 상기 하한값 미만 정도에 따라 각각 구간별로 기설정된 실행 비율 변동량을 적용하여 상기 실행 비율을 조정하는 메모리 컨트롤러.
5. The method according to claim 4,
The buffer management unit,
The memory controller adjusts the execution ratio by applying a preset execution ratio variation for each section according to the degree of exceeding the upper limit value and the degree of being less than the lower limit value.
상기 버퍼 관리부는,
상기 쓰기 버퍼링과, 상기 읽기 프리패치를 구별하고, 각각에 대한 동작 실행을 제어하는 메모리 컨트롤러.
The method according to claim 1,
The buffer management unit,
A memory controller that distinguishes the write buffering from the read prefetch, and controls execution of an operation for each.
상기 버퍼 관리부는,
제1 실행 비율을 설정하여, 상기 쓰기 버퍼링의 동작 실행을 제어하고,
상기 제1 실행 비율과 동일하거나 또는 서로 다른 제2 실행 비율을 설정하여, 상기 읽기 프리패치의 동작 실행을 제어하는 메모리 컨트롤러.
8. The method of claim 7,
The buffer management unit,
setting a first execution rate to control execution of the write buffering operation;
The memory controller controls execution of the read prefetch operation by setting a second execution ratio that is the same as or different from the first execution ratio.
상기 버퍼 관리부는,
다수의 상기 쓰기 커맨드 중, 상기 제1 실행 비율에 따라 무작위로 일부를 선정하고, 선정된 일부에 대해서만 상기 버퍼링 동작을 실행하고,
다수의 상기 읽기 커맨드 중, 상기 제2 실행 비율에 따라 무작위로 일부를 선정하고, 선정된 일부에 대해서만 상기 읽기 프리패치의 동작 실행을 하는 메모리 컨트롤러.
9. The method of claim 8,
The buffer management unit,
Among a plurality of the write commands, a part is randomly selected according to the first execution ratio, and the buffering operation is performed only on the selected part,
A memory controller that randomly selects a part of the plurality of read commands according to the second execution ratio, and executes the read prefetch operation on only the selected part.
버퍼 메모리; 및
청구항 1, 및 3 내지 9 중 어느 한 항에 따른 메모리 컨트롤러;를 포함하는 스토리지 디바이스.
non-volatile memory;
buffer memory; and
A storage device comprising a; the memory controller according to any one of claims 1 and 3 to 9.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190141816A KR102266166B1 (en) | 2019-11-07 | 2019-11-07 | Memory controller and storage device including the same |
US17/091,085 US11416168B2 (en) | 2019-11-07 | 2020-11-06 | Memory controller and storage device including the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190141816A KR102266166B1 (en) | 2019-11-07 | 2019-11-07 | Memory controller and storage device including the same |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20210055408A KR20210055408A (en) | 2021-05-17 |
KR102266166B1 true KR102266166B1 (en) | 2021-06-17 |
Family
ID=76158284
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020190141816A KR102266166B1 (en) | 2019-11-07 | 2019-11-07 | Memory controller and storage device including the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102266166B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102516412B1 (en) * | 2022-01-13 | 2023-03-31 | 성균관대학교산학협력단 | GPU clock control method and device for machine learning |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008204257A (en) | 2007-02-21 | 2008-09-04 | Seiko Epson Corp | Memory controller for controlling memory, and memory control method |
JP2012015584A (en) * | 2010-06-29 | 2012-01-19 | Kyocera Mita Corp | Data transmission device and image formation device |
JP2019174941A (en) | 2018-03-27 | 2019-10-10 | 東芝メモリ株式会社 | Storage device, computer system and operating method for storage device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06274656A (en) | 1993-03-20 | 1994-09-30 | Hitachi Ltd | Microcomputer |
KR20140142793A (en) * | 2013-06-04 | 2014-12-15 | 삼성전자주식회사 | Operating method for memory controller controlling nonvolatile memory device and nonvolatile memory system |
KR20160065661A (en) * | 2014-12-01 | 2016-06-09 | 주식회사 티엘아이 | Memory controller, system including the same, and method thereof |
KR20180031289A (en) * | 2016-09-19 | 2018-03-28 | 삼성전자주식회사 | Storage device and method of operating the storage device |
KR20190085644A (en) * | 2018-01-11 | 2019-07-19 | 에스케이하이닉스 주식회사 | Data processing device and operating method thereof |
KR102521298B1 (en) * | 2018-02-14 | 2023-04-14 | 에스케이하이닉스 주식회사 | Memory controller and operating method thereof |
-
2019
- 2019-11-07 KR KR1020190141816A patent/KR102266166B1/en active IP Right Grant
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008204257A (en) | 2007-02-21 | 2008-09-04 | Seiko Epson Corp | Memory controller for controlling memory, and memory control method |
JP2012015584A (en) * | 2010-06-29 | 2012-01-19 | Kyocera Mita Corp | Data transmission device and image formation device |
JP2019174941A (en) | 2018-03-27 | 2019-10-10 | 東芝メモリ株式会社 | Storage device, computer system and operating method for storage device |
Also Published As
Publication number | Publication date |
---|---|
KR20210055408A (en) | 2021-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10095613B2 (en) | Storage device and data processing method thereof | |
US8892520B2 (en) | Storage device including a file system manager for managing multiple storage media | |
US8015352B2 (en) | Disk drive storage defragmentation system | |
KR102584018B1 (en) | Apparatus, system and method for caching compressed data background | |
KR101095740B1 (en) | Memory system and controller | |
US11385831B2 (en) | Memory controller and storage device including the same | |
US20160162187A1 (en) | Storage System And Method For Processing Writing Data Of Storage System | |
US20140095555A1 (en) | File management device and method for storage system | |
US20060112232A1 (en) | Method and apparatus for managing a cache memory in a mass-storage system | |
KR100794312B1 (en) | Memory controller with automatic command processing unit and memory system including the same | |
JP2009099149A (en) | Control method of adaptive hybrid density memory storage device, and adaptive hybrid density memory storage device | |
US20130103893A1 (en) | System comprising storage device and related methods of operation | |
CN113168374A (en) | Write command retention in partition namespaces | |
KR20220037333A (en) | Read handling in zoned namespace devices | |
KR20190063054A (en) | Memory System and Operation Method thereof | |
US11416168B2 (en) | Memory controller and storage device including the same | |
US9990280B2 (en) | Methods for reading data from a storage unit of a flash memory and apparatuses using the same | |
KR102266166B1 (en) | Memory controller and storage device including the same | |
US11150809B2 (en) | Memory controller and storage device including the same | |
US9524236B1 (en) | Systems and methods for performing memory management based on data access properties | |
US10528360B2 (en) | Storage device, information processing system, method of activating storage device and program | |
US11960419B2 (en) | Systems and methods for data prefetching for low latency data read from a remote server | |
CN110515861B (en) | Memory device for processing flash command and method thereof | |
US11704249B2 (en) | Frozen time cache for multi-host read operations | |
KR102088945B1 (en) | Memory controller and storage device including the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right |