KR102262209B1 - Method and apparatus for sending barrier command using dummy io request - Google Patents

Method and apparatus for sending barrier command using dummy io request Download PDF

Info

Publication number
KR102262209B1
KR102262209B1 KR1020190015743A KR20190015743A KR102262209B1 KR 102262209 B1 KR102262209 B1 KR 102262209B1 KR 1020190015743 A KR1020190015743 A KR 1020190015743A KR 20190015743 A KR20190015743 A KR 20190015743A KR 102262209 B1 KR102262209 B1 KR 102262209B1
Authority
KR
South Korea
Prior art keywords
order
write
write request
storage
command
Prior art date
Application number
KR1020190015743A
Other languages
Korean (ko)
Other versions
KR20190096838A (en
Inventor
원유집
오준택
최경열
손성배
Original Assignee
한양대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한양대학교 산학협력단 filed Critical 한양대학교 산학협력단
Publication of KR20190096838A publication Critical patent/KR20190096838A/en
Application granted granted Critical
Publication of KR102262209B1 publication Critical patent/KR102262209B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

더미 입출력 요청을 이용한 배리어 명령 전달 방법을 개시한다. 본 발명의 일 실시예에 따른 호스트가 스토리지에 기록되는 데이터의 기록 순서를 보장하는 방법은 갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 상기 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하는 단계; 상기 적어도 하나의 블록데이터가 상기 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 상기 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하는 단계; 더미 데이터에 대하여 상기 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출하는 단계;를 포함한다.Disclosed is a method of transmitting a barrier command using a dummy input/output request. The method of the host guaranteeing the writing order of data written to the storage according to an embodiment of the present invention supports the guarantee of the writing order in the storage for at least one block data that is data corresponding to an updated data block. invoking at least one order-guaranteed write request; calling a barrier-based synchronization command, which is a command to cause the at least one block data to be written to the storage before subsequent block data for which the order-guaranteed write request is called after the at least one order-guaranteed write request is called; and invoking a barrier-based write request supporting the guarantee of the write order in the storage and the setting of a breakpoint in the write order for the dummy data.

Description

더미 입출력 요청을 이용한 배리어 명령 전달 방법 및 그 장치{METHOD AND APPARATUS FOR SENDING BARRIER COMMAND USING DUMMY IO REQUEST}Barrier command transmission method using dummy I/O request and device therefor {METHOD AND APPARATUS FOR SENDING BARRIER COMMAND USING DUMMY IO REQUEST}

본 발명은 더미 입출력 요청을 이용하여 데이터가 스토리지에 기록되는 순서를 보장하기 위한 배리어 명령을 전달하는 방법 및 그 방법이 적용된 컴퓨팅 장치에 관한 것이다.The present invention relates to a method of transmitting a barrier command for ensuring the order in which data is written to storage using a dummy input/output request, and a computing device to which the method is applied.

스토리지(storage)는 운영체제로부터 명령을 전달 받고 해당 명령에 대응되는 동작을 수행한다. 예컨대, 리눅스 커널이 플래시 메모리 기반 스토리지에 명령을 전달하려면, 입출력 요청을 할당하고 입출력 요청에 전달하고자 하는 명령을 설정한 후 그 스토리지에 전달해야 한다. 그래서, 호스트가 스토리지에 명령을 전달할 수 있는 방법은 이와 같은 입출력 명령을 통한 방법밖에 없다. 단, 예외적으로 스토리지 내 캐시에 있는 데이터를 영속 저장 장치에 저장하는 명령인 플러시(flush)는 스토리지에 대한 구체적인 입출력 요청없이 전달될 수 있다.The storage receives a command from the operating system and performs an operation corresponding to the command. For example, in order for the Linux kernel to transmit a command to flash memory-based storage, it must allocate an I/O request, set a command to be transmitted to the I/O request, and then transmit it to the storage. Therefore, the only way the host can transmit a command to the storage is through such an I/O command. However, as an exception, flush, which is a command for storing data in the cache in the storage to the persistent storage device, may be transmitted without a specific I/O request to the storage.

즉, 기존 리눅스 커널이 스토리지에 플러시를 제외한 명령을 전달하려면, 스토리지로부터 데이터를 읽거나 스토리지에 데이터를 기록해야 한다. 만일 호스트가 읽거나 쓰고자 하는 데이터가 없으면, 스토리지에 명령을 전달할 방법이 없다. In other words, in order for the existing Linux kernel to send a command other than flush to storage, it must read data from or write data to storage. If there is no data the host wants to read or write, there is no way to pass the command to the storage.

여기서, 플러시 명령은 사용자가 fsync() 혹은 fdatasync()와 같은 시스템 콜을 호출하여 스토리지에 전달될 수 있지만, 전후 데이터 간의 기록 순서 상의 구분점을 설정하는 배리어 명령은 기록해야 할 데이터가 있을 때에만, 스토리지에 전달될 수 있는 문제가 있다. 만일 호스트가 데이터 쓰기 순서 보장을 위해 배리어 관련 시스템 콜을 호출할 때, 기록해야 할 데이터가 없으면, 베리어 명령은 저장 장치에 전달되지 않고, 데이터의 기록 순서는 보장되지 않게 된다.Here, the flush command can be delivered to the storage by the user calling a system call such as fsync() or fdatasync(), but the barrier command that sets a breakpoint in the writing order between before and after data is only used when there is data to be written. , there is a problem that can be passed to storage. If there is no data to be written when the host calls a barrier-related system call to ensure the data write order, the barrier command is not transmitted to the storage device and the data write order is not guaranteed.

따라서, 더미 입출력 요청을 이용하여 기록해야 할 데이터가 없을 때에도 배리어 명령을 스토리지에 전달하는 방법 및 그 방법이 적용된 컴퓨팅 장치에 대한 필요성이 대두되고 있다. Accordingly, there is a need for a method of transmitting a barrier command to a storage even when there is no data to be written using a dummy I/O request and a computing device to which the method is applied.

관련 선행기술로는 대한민국 공개특허공보 제10-2017-0141184호(발명의 명칭 : 로깅 장치 및 로깅 방법)가 있다.As a related prior art, there is Republic of Korea Patent Publication No. 10-2017-0141184 (title of the invention: logging device and logging method).

본 발명은 호스트가 더미 입출력 요청을 이용하여 배리어 명령을 스토리지에 전달함으로써, 스토리지에 기록해야 할 데이터가 없는 경우에도 배리어 명령을 스토리지에 전달할 수 있는 방법 및 그 방법이 적용된 컴퓨팅 장치를 제공하고자 한다.An object of the present invention is to provide a method and a computing device to which a host transmits a barrier command to a storage using a dummy I/O request, thereby transmitting a barrier command to a storage even when there is no data to be recorded in the storage, and a computing device to which the method is applied.

본 발명이 해결하고자 하는 과제는 이상에서 언급한 과제(들)로 제한되지 않으며, 언급되지 않은 또 다른 과제(들)은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.The problem to be solved by the present invention is not limited to the problem(s) mentioned above, and another problem(s) not mentioned will be clearly understood by those skilled in the art from the following description.

상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 더미 입출력 요청을 이용한 배리어 명령 전달 방법은 갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 상기 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하는 단계; 상기 적어도 하나의 블록데이터가 상기 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 상기 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하는 단계; 더미 데이터에 대하여 상기 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출하는 단계;를 포함한다.In order to achieve the above object, a barrier command transmission method using a dummy input/output request according to an embodiment of the present invention guarantees a write order in the storage for at least one block data that is data corresponding to an updated data block. invoking at least one supported order-guaranteed write request; calling a barrier-based synchronization command, which is a command to cause the at least one block data to be written to the storage before subsequent block data for which the order-guaranteed write request is called after the at least one order-guaranteed write request is called; and invoking a barrier-based write request supporting the guarantee of the write order in the storage and the setting of a breakpoint in the write order for the dummy data.

또한, 상기 목적을 달성하기 위한 본 발명의 다른 실시예에 따른 더미 입출력 요청을 이용한 배리어 명령 전달 방법은 갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 상기 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하는 단계; 상기 적어도 하나의 블록데이터가 상기 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 상기 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하는 단계; 쓰기 요청으로부터 쓰기 명령을 구성하기 위해 이용되는 IO 스케줄러 큐에 상기 적어도 하나의 순서 보장 쓰기 요청이 남아있는지 판단하는 단계; 및 상기 적어도 하나의 쓰기 요청이 남아있지 않으면, 더미 데이터에 대하여 상기 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출하는 단계를 포함한다.In addition, in the method of transmitting a barrier command using a dummy input/output request according to another embodiment of the present invention for achieving the above object, for at least one block data that is data corresponding to an updated data block, invoking at least one order-guaranteed write request that supports guarantees; calling a barrier-based synchronization command, which is a command to cause the at least one block data to be written to the storage before subsequent block data for which the order-guaranteed write request is called after the at least one order-guaranteed write request is called; determining whether the at least one order-guaranteed write request remains in an IO scheduler queue used to construct a write command from a write request; and when the at least one write request does not remain, invoking a barrier-based write request supporting the guarantee of the write order in the storage and the setting of a breakpoint of the write order for the dummy data.

바람직하게는, 상기 적어도 하나의 쓰기 요청의 전부 또는 일부가 남아있으면, 상기 적어도 하나의 쓰기 요청 중 마지막으로 쓰기 명령으로 구성되는 쓰기 요청을 배리어 기반 쓰기 요청으로 변경하는 단계를 더 포함할 수 있다.Preferably, the method may further include changing a write request including a last write command among the at least one write request into a barrier-based write request when all or part of the at least one write request remains.

또한, 상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 더미 입출력 요청을 이용하여 배리어 명령을 전달하는 컴퓨팅 장치는 기록 순서의 보장을 지원하는 파일 시스템을 운영하는 소프트웨어가 탑재된 스토리지; 및 상기 스토리지에 탑재된 소프트웨어를 운영하는 프로세서를 포함하고, 상기 프로세서는 갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 상기 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하고, 상기 적어도 하나의 블록데이터가 상기 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 상기 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하고, 쓰기 요청으로부터 쓰기 명령을 구성하기 위해 이용되는 IO 스케줄러 큐에 상기 적어도 하나의 순서 보장 쓰기 요청이 남아있는지 판단하고, 상기 적어도 하나의 쓰기 요청이 남아있지 않으면, 더미 데이터에 대하여 상기 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출한다.In addition, in order to achieve the above object, a computing device for transmitting a barrier command using a dummy input/output request according to an embodiment of the present invention includes: a storage in which software for operating a file system supporting the guarantee of writing order is mounted; and a processor for operating software mounted in the storage, wherein the processor supports at least one sequence for supporting the guarantee of a writing sequence in the storage for at least one block data corresponding to the updated data block. A barrier-based synchronization command that invokes a guaranteed write request and causes the at least one block data to be written to the storage before subsequent block data for which an order-guaranteed write request is called after the at least one order-guaranteed write request is called and determine whether the at least one order-guaranteed write request remains in an IO scheduler queue used to construct a write command from the write request, and if the at least one write request does not remain, the storage for dummy data Invokes a barrier-based write request that supports writing order guarantees and setting breakpoints in write order.

바람직하게는, 상기 프로세서는 상기 적어도 하나의 쓰기 요청의 전부 또는 일부가 남아있으면, 상기 적어도 하나의 쓰기 요청 중 마지막으로 쓰기 명령으로 구성되는 쓰기 요청을 배리어 기반 쓰기 요청으로 변경할 수 있다.Preferably, when all or part of the at least one write request remains, the processor may change a write request including a last write command among the at least one write request to a barrier-based write request.

본 발명은 호스트가 더미 입출력 요청을 이용하여 배리어 명령을 스토리지에 전달함으로써, 스토리지에 기록해야 할 데이터가 없는 경우에도 배리어 명령을 스토리지에 전달할 수 있는 효과가 있다.According to the present invention, the host transmits the barrier command to the storage using the dummy I/O request, so that the barrier command can be transmitted to the storage even when there is no data to be written to the storage.

도 1은 종래의 기술에 따른 호스트와 스토리지 간의 데이터 입출력 과정을 설명하기 위한 도면이다.
도 2는 종래의 기술에 따른 EXT4 파일시스템의 동기화 명령인 fsync()의 동작 과정을 설명하기 위한 도면이다.
도 3은 본 발명의 일 실시예에 따른 순서 보장 입출력 스택을 설명하기 위한 도면이다.
도 4는 본 발명의 일 실시예에 따른 더미 입출력 요청을 이용한 배리어 명령 전달 방법을 설명하기 위한 흐름도이다.
도 5는 본 발명의 다른 실시예에 따른 더미 입출력 요청을 이용한 배리어 명령 전달 방법을 설명하기 위한 흐름도이다.
도 6은 본 발명의 다른 실시예에 따른 더미 입출력 요청을 이용한 배리어 명령 전달 방법을 설명하기 위한 도면이다.
도 7은 본 발명의 일 실시예에 따른 더미 입출력 요청을 이용하여 배리어 명령을 전달하는 컴퓨팅 장치를 설명하기 위한 블록도이다.
1 is a diagram for explaining a data input/output process between a host and a storage according to the related art.
2 is a diagram for explaining an operation process of fsync(), which is a synchronization command of an EXT4 file system according to the related art.
3 is a diagram for explaining an order guarantee input/output stack according to an embodiment of the present invention.
4 is a flowchart illustrating a method of transmitting a barrier command using a dummy input/output request according to an embodiment of the present invention.
5 is a flowchart illustrating a method of transmitting a barrier command using a dummy input/output request according to another embodiment of the present invention.
6 is a diagram for explaining a method of transmitting a barrier command using a dummy input/output request according to another embodiment of the present invention.
7 is a block diagram illustrating a computing device that transmits a barrier command using a dummy input/output request according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.Since the present invention can have various changes and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and it should be understood to include all modifications, equivalents and substitutes included in the spirit and scope of the present invention. In describing each figure, like reference numerals have been used for like elements.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, A, and B may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, a first component may be referred to as a second component, and similarly, a second component may also be referred to as a first component. and/or includes a combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is referred to as being “connected” or “connected” to another component, it is understood that the other component may be directly connected or connected to the other component, but other components may exist in between. it should be On the other hand, when it is mentioned that a certain element is "directly connected" or "directly connected" to another element, it should be understood that the other element does not exist in the middle.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present application. does not

도 1은 종래의 기술에 따른 호스트와 스토리지 간의 데이터 입출력 과정을 설명하기 위한 도면이다.1 is a diagram for explaining a data input/output process between a host and a storage according to the related art.

도 1을 참조하면, 호스트에서 운영되는 파일시스템은 IO 스케줄러 큐(IO scheduler queue)에 쓰기 요청(write request)를 입력한다. 그리고, 블록 디바이스 드라이버는 IO 스케줄러 큐로부터 하나 이상의 쓰기 요청을 제거하여, 이로부터 쓰기 명령(write command)를 구성한다. 그리고, 블록 디바이스 드라이버는 가능한 경우에 그 쓰기 명령을 스토리지 디바이스에게 전달한다. 이때, 스토리지 디바이스의 커맨드 큐(command queue)가 가득차 있지 않으면, 가능한 경우에 해당할 수 있다. 또한, 스토리지 컨트롤러(storage controller)는 커맨드 큐로부터 그 전달된 쓰기 명령을 제거하고, 호스트로부터 그 쓰기 명령에 관련 데이터를 수신하여 캐시에 저장한다. 수신이 완료되면, 스토리지는 호스트에 시그널을 전송한다. 한편, 캐시에 저장된 데이터는 주기적으로 또는 호스트로부터의 명시적인 요청에 의하여 스토리지 표면에 기록된다.Referring to FIG. 1 , a file system operated in a host inputs a write request to an IO scheduler queue. Then, the block device driver removes one or more write requests from the IO scheduler queue, and constructs a write command therefrom. Then, the block device driver transmits the write command to the storage device, if possible. At this time, if the command queue of the storage device is not full, it may correspond to a possible case. Also, the storage controller removes the transmitted write command from the command queue, receives data related to the write command from the host, and stores it in the cache. When the reception is complete, the storage sends a signal to the host. On the other hand, data stored in the cache is written to the storage surface periodically or by an explicit request from the host.

여기서, 쓰기 요청의 입력 순서(I), 쓰기 명령 전달 순서(D), 데이터 전송 순서(X) 및 데이터 기록 순서(P)를 고려할 때, 다음과 같은 순서 상의 불일치가 존재할 수 있다.Here, when considering the input order (I) of the write request, the order of transmitting the write command (D), the data transmission order (X), and the data writing order (P), there may be a discrepancy in the following order.

우선, I와 D가 불일치할 수 있다. 이는, IO 스케줄러가 쓰기 요청을 스케줄링 원칙에 따라 재배치(reorder)하거나 병합(coalescence)할 수 있기 때문이다.First, I and D may not match. This is because the IO scheduler can reorder or coalesce write requests according to the scheduling principle.

또한, D와 X가 불일치할 수 있다. 이는, 스토리지 컨트롤러가 자유롭게 커맨드 큐의 쓰기 명령의 순서를 조정할 수 있기 때문이다.Also, D and X may not match. This is because the storage controller can freely adjust the order of write commands in the command queue.

또한, X와 P가 불일치할 수 있다. 이는, 스토리지의 캐시가 FIFO가 아니기 때문이다. 즉, 플래시 기반 스토리지에서, 데이터 기록 순서는 캐시에 기록된 순서가 아니라, 관련된 맵핑 테이블에 기록된 순서에 따라 결정될 수 있다.Also, X and P may be mismatched. This is because the cache of storage is not FIFO. That is, in the flash-based storage, the data writing order may be determined according to the writing order in the related mapping table, not the writing order in the cache.

이러한 다양한 순서 상의 불확실성 때문에, 현대의 IO 스택을 이용한 데이터 입출력 과정은 전 과정을 통해 순서가 지켜지기 어려운 것으로 인식되어 왔다.Due to the uncertainty of these various orders, the data input/output process using the modern IO stack has been recognized as difficult to keep the order throughout the entire process.

도 2는 종래의 기술에 따른 EXT4 파일시스템의 동기화 명령인 fsync()의 동작 과정을 설명하기 위한 도면이다.2 is a diagram for explaining an operation process of fsync(), which is a synchronization command of an EXT4 file system according to the related art.

EXT4(extended file system 4)는 리눅스의 대표적인 저널링 파일 시스템으로, 기존 EXT3 파일 시스템의 향상된 버전이다. 저널링 파일 시스템은 파일 시스템에 변경사항을 반영(commit)하기 전에, 저널안에 생성되는 변경사항을 추적하여 기록하는 파일 시스템이다. 이를 통해, 시스템 충돌이나 전원 문제가 발생할 때 초래될 수 있는 시스템의 손상을 최소화할 수 있는 효과가 있다.EXT4 (extended file system 4) is a typical journaling file system in Linux and is an improved version of the existing EXT3 file system. The journaling file system is a file system that tracks and records changes made in the journal before committing the changes to the file system. Through this, it is possible to minimize system damage that may be caused when a system crash or a power problem occurs.

EXT4 파일 시스템에서는 기록 순서를 제어하기 위하여 fsync() 함수를 이용한다. Ordered모드(default)에서는 데이터 블록(D)이 저널 트랜잭션에 앞서 기록된다.In the EXT4 file system, the fsync() function is used to control the writing order. In the ordered mode (default), the data block (D) is written prior to the journal transaction.

우선, 파일 시스템이 데이터 블록(D)에 대한 쓰기 요청을 입력한다. 이때, 데이터 블록(D)은 다른 파일들에 대한 복수의 블록일 수 있다. 그 후, 어플리케이션 쓰레드는 DMA 전송이 완료될 때까지 대기한다. 그리고, DMA 전송이 완료되면 그 어플리케이션 쓰레드는 JBD 쓰레드를 동작시켜 저널 트랜잭션을 반영하도록 한다. 그 후, 그 어플리케이션 쓰레드는 다시 슬립 상태로 진입하며, JBD 쓰레드가 저널 트랜잭션을 모두 기록한 후, 반환(return)한다.First, the file system inputs a write request for the data block (D). In this case, the data block D may be a plurality of blocks for other files. After that, the application thread waits until the DMA transfer is completed. And, when the DMA transfer is completed, the application thread operates the JBD thread to reflect the journal transaction. After that, the application thread enters the sleep state again, and after the JBD thread records all journal transactions, it returns.

보다 구체적으로, 저널 트랜잭션은 두개의 쓰기 요청을 통해 반영될 수 있다. 이는, 저널 디스크립터 블록 및 로그 블록(JD)과 커밋 블록(JC)이다. 또한, 저널 트랜잭션을 반영하는 과정에서, JBD 쓰레드는 단일 트랜잭션 내부에서, 그리고 트랜잭션들 간에서 그 기록 순서를 유지할 필요가 있다. More specifically, a journal transaction can be reflected through two write requests. These are the journal descriptor block and log block (JD) and the commit block (JC). Also, in the process of reflecting journal transactions, JBD threads need to maintain their writing order within a single transaction and between transactions.

단일 트랜잭션 내부에서는, JBD 쓰레드가 JD를 JC보다 먼저 기록해야 할 필요가 있다. 즉, JBD 쓰레드는 JD가 JC보다 먼저 기록되도록, Transfer-and-Flush 기법을 이용할 수 있다. 이때, Transfer-and-Flush 기법은 JD에 관한 데이터가 DMA를 통해 전송(transfer)되고, 스토리지에 기록(flush)되는 동안 대기한 후, JC에 관한 데이터가 DMA를 통해 전송(transfer)되고, 스토리지에 기록(flush)되도록 함으로써, 그 기록 순서를 지키는 것이다.Inside a single transaction, the JBD thread needs to write the JD before the JC. That is, the JBD thread can use the Transfer-and-Flush technique so that the JD is written before the JC. At this time, in the Transfer-and-Flush technique, data about JD is transferred through DMA, and after waiting while being flushed to storage, data about JC is transferred through DMA, and storage By flushing to , the order of writing is maintained.

또한, 트랜잭션들 간에는, JBD 쓰레드가 저널 트랜잭션의 요청 순서에 따라서 그 트랜잭션들이 기록되도록 해야 할 필요가 있다.Also, between transactions, it is necessary for the JBD thread to record the transactions according to the request order of the journal transaction.

이처럼, EXT4 파일 시스템에서는 fsync()를 이용한 동기화 과정에서, 여러 차례의 컨텍스트 스위치가 발생하며, 데이터 전송과 기록에 따른 대기 시간이 요구되어 전송 오버헤드, 플러시 오버헤드가 필연적으로 발생하게 된다.As such, in the EXT4 file system, in the synchronization process using fsync(), context switches occur several times, and waiting time for data transmission and writing is required, so transmission overhead and flush overhead are inevitably generated.

도 3은 본 발명의 일 실시예에 따른 순서 보장 입출력 스택을 설명하기 위한 도면이다.3 is a diagram for explaining an order guarantee input/output stack according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 순서 보장 입출력 스택은 순서 보장 블록 디바이스 레이어에서 새롭게 정의된 배리어 기반 쓰기 명령, 순서 보장 디스패치 모듈(order preserving dispatch module), 에포크 기반 IO 스케줄러(Epoch-based IO scheduler)로 구성될 수 있다. 이와 같은 구성들을 이용함으로써, Transfer-and-Flush 기법을 이용하지 않고도, 부분적으로 쓰기 요청에 대한 순서가 스토리지에까지 반영될 수 있다.The order guarantee input/output stack according to an embodiment of the present invention is a barrier-based write command newly defined in the order guarantee block device layer, an order preserving dispatch module, and an epoch-based IO scheduler. can be configured. By using these configurations, the order for write requests can be partially reflected even to the storage without using the transfer-and-flush technique.

보다 구체적으로, 순서 보장 블록 디바이스 레이어는 쓰기 요청을 두 종류로 구분한다. 순서 보장 쓰기 요청과 순서 없는 쓰기 요청이 그것이다. 여기서, 순서 보장 쓰기 요청은 스토리지 기록 순서가 보장되도록 하기 위한 쓰기 요청이다. More specifically, the order guarantee block device layer classifies write requests into two types. These are order-guaranteed write requests and out-of-order write requests. Here, the order-guaranteed write request is a write request to ensure the storage write order is guaranteed.

또한, 순서 보장 쓰기 요청의 집합으로, 그 집합 내부에서는 기록 순서가 변경가능한 단위가 에포크이다. 또한, 순서 보장 쓰기 요청에 대응되는 순서 보장 쓰기 명령 중에서 특별한 하나의 타입이 배리어 기반 쓰기 명령이다. 즉, 배리어 기반 쓰기 명령은 에포크를 분류하기 위하여 이용되며, 그 전후의 순서 보장 쓰기 명령 간의 스토리지에서의 기록 순서가 보장된다.In addition, as a set of order-guaranteed write requests, the unit in which the write order can be changed is the epoch. In addition, one special type of the order-guaranteed write command corresponding to the order-guaranteed write request is a barrier-based write command. That is, the barrier-based write command is used to classify the epoch, and the order of writing in the storage between the write commands before and after that is guaranteed is guaranteed.

이때, 순서 보장 쓰기 명령 및 배리어 기반 쓰기 명령에는 각각 새로운 속성인 REQ_ORDERED 및 REQ_BARRIER가 이용될 수 있다. 즉, 일반적인 순서 보장 쓰기 명령에는 REQ_ORDERED가 이용되고, 배리어 기반 쓰기 명령에는 REQ_ORDERED와 REQ_BARRIER가 함께 이용될 수 있다.In this case, new attributes REQ_ORDERED and REQ_BARRIER may be used for the order-guaranteed write command and the barrier-based write command, respectively. That is, REQ_ORDERED may be used for a general order guarantee write command, and REQ_ORDERED and REQ_BARRIER may be used together for a barrier-based write command.

도 4는 본 발명의 일 실시예에 따른 더미 입출력 요청을 이용한 배리어 명령 전달 방법을 설명하기 위한 흐름도이다.4 is a flowchart illustrating a method of transmitting a barrier command using a dummy input/output request according to an embodiment of the present invention.

단계 S410에서는, 호스트가 갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출한다.In step S410, the host calls at least one order-guaranteed write request supporting the guarantee of the write order in the storage with respect to at least one block data that is data corresponding to the updated data block.

이때, 호스트의 쓰기 요청은 순서 보장이 가능한 순서 보장 쓰기 요청과 순서 보장이 되지 않는 순서 없는 쓰기 요청으로 구분될 수 있다. 호스트는 데이터의 기록 순서에 관한 보장이 필요한 경우에, 순서 보장 쓰기 요청을 호출하여 그 기록 순서를 보장받을 수 있다.In this case, the write request from the host may be divided into an order-guaranteed write request in which order is guaranteed and an out-of-order write request in which order is not guaranteed. When the host needs to guarantee the writing order of data, the host may guarantee the writing order by calling an order-guaranteed write request.

예컨대, 호스트는 특정한 파일을 생성하거나 수정하는 경우에, 해당 파일의 생성되거나 수정된 부분에 대한 적어도 하나의 블록데이터에 대하여, 적어도 하나의 순서 보장 쓰기 요청을 호출할 수 있다.For example, when creating or modifying a specific file, the host may call at least one order-guaranteed write request with respect to at least one block data of the generated or modified portion of the file.

또한, 호출된 적어도 하나의 순서 보장 쓰기 요청은 IO 스케줄러 큐에 입력되며, 다른 프로세스에 의해 복수의 순서 보장 쓰기 명령으로 구성되어 스토리지에 전달될 수 있다. 그러나, 스토리지에 전달된 복수의 순서 보장 쓰기 명령에 대응되는 데이터는 아직 스토리지에 포함된 플래시 메모리에 영속적으로 기록된 것은 아니며, 스토리지의 캐시 메모리에 저장된 상태일 수 있다. In addition, at least one of the called order-guaranteed write requests is input to the IO scheduler queue, and may be configured as a plurality of order-guaranteed write commands by another process and delivered to the storage. However, data corresponding to the plurality of order-guaranteed write commands transmitted to the storage is not yet permanently written to the flash memory included in the storage, and may be stored in the cache memory of the storage.

단계 S420에서는, 호스트가 적어도 하나의 블록데이터가 그 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출한다.In step S420, the host calls a barrier-based synchronization command, which is a command such that at least one block data is written to the storage before subsequent block data for which an order guarantee write request is called after the call of the at least one order guaranteed write request. .

즉, 호스트는 적어도 하나의 블록데이터에 대한 적어도 하나의 순서 보장 쓰기 요청을 후속블록데이터에 대한 순서 보장 쓰기 요청보다 먼저 호출함으로써, 적어도 하나의 블록데이터가 후속블록데이터보다 먼저 스토리지에 기록되도록 하고자 할 수 있다. 이를 위해 호스트는 배리어 기반 동기화 명령을 호출하여 적어도 하나의 블록데이터가 우선적으로 스토리지에 기록되도록 할 수 있다.That is, the host calls at least one order-guaranteed write request for at least one block data before the order-guaranteed write request for subsequent block data, so that at least one block data is written to the storage before the subsequent block data. can To this end, the host may call a barrier-based synchronization command so that at least one block data is preferentially written to the storage.

예컨대, 호스트는 A 파일을 스토리지에 기록한 이후에, B 파일을 스토리지에 기록하기 위하여, 적어도 하나의 순서 보장 쓰기 요청(write(A))을 호출한 뒤, 배리어 기반 동기화 명령(fbarrier(A))을 호출할 수 있다. 그리고, 호스트는 또다시 적어도 하나의 순서 보장 쓰기 요청(write(B))을 호출하여 A 파일이 B 파일보다 먼저 스토리지에 기록되도록 할 수 있다.For example, after the host writes file A to storage, to write file B to storage, the host calls at least one order-guaranteed write request (write(A)), followed by a barrier-based synchronization command (fbarrier(A)) can be called Then, the host may again call at least one order-guaranteed write request (write(B)) so that the A file is written to the storage before the B file.

마지막으로 단계 S430에서는, 호스트가 더미 데이터에 대하여 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출한다.Finally, in step S430, the host calls a barrier-based write request for dummy data that supports the guarantee of the write order in the storage and the setting of a breakpoint in the write order.

즉, 호스트는 실질적으로 파일에 기록되지 않는 더미 데이터에 대하여 배리어 기반 쓰기 요청을 호출함으로써, 배리어 기반 쓰기 요청의 이전과 이후에 쓰기 요청된 데이터가 스토리지 상에서 기록 순서를 보장할 수 있다. 이때, 호스트는 IO 스케줄러 큐에 적어도 하나의 순서 보장 쓰기 요청이 남아있는 지와 무관하게 배리어 기반 쓰기 요청을 호출할 수 있다.That is, the host calls a barrier-based write request for dummy data that is not actually written to a file, so that data written to be written before and after the barrier-based write request can guarantee a write order in the storage. At this time, the host may call the barrier-based write request regardless of whether at least one order-guaranteed write request remains in the IO scheduler queue.

그 결과, 배리어 기반 쓰기 요청의 이전에 쓰기 요청된 데이터는 단일 에포크(epoch)를 형성하게 된다. 또한, 호스트는 배리어 기반 쓰기 요청을 통해 단일 에포크에 포함된 복수의 순서 보장 쓰기 요청 간의 기록 순서를 보장할 수는 없으나, 에포크 간의 기록 순서를 보장하면서, 에포크의 형성을 완료하여 기록 순서의 구분점을 설정할 수 있다.As a result, data previously requested to be written in the barrier-based write request forms a single epoch. In addition, the host cannot guarantee the write order between multiple order-guaranteed write requests included in a single epoch through a barrier-based write request, but complete the formation of the epochs while ensuring the write order between epochs to break the write order. can be set.

이를 위해, 호스트는 호출된 배리어 기반 쓰기 요청을 순서 보장 쓰기 요청으로 변경할 수 있다. 그리고, IO 스케줄러 큐로 입력되는 쓰기 요청을 차단한 뒤, IO 스케줄러 큐에 포함된 적어도 하나의 순서 보장 쓰기 요청을 디스패치 큐에게 전송하되, 마지막으로 전송되는 순서 보장 쓰기 요청을 배리어 기반 쓰기 요청으로 변경하여 전송할 수 있다. 그리고, IO 스케줄러 큐로의 입력 차단을 해제할 수 있다.To this end, the host may change the invoked barrier-based write request to an order-guaranteed write request. Then, after blocking the write request input to the IO scheduler queue, at least one order-guaranteed write request included in the IO scheduler queue is transmitted to the dispatch queue, but the last transmitted order-guaranteed write request is changed to a barrier-based write request. can be transmitted And, it is possible to release blocking of input to the IO scheduler queue.

예컨대, 호스트는 저장하려는 데이터의 메모리 주소 및 크기를 미리 지정된 특정한 값(예, 0)으로 지정함으로써, 더미 데이터에 대한 배리어 기반 쓰기 요청을 호출할 수 있다. 이를 통해, 호스트는 실제로 파일에 데이터를 저장하지 않고도, 데이터의 기록 순서를 보장할 수 있다.For example, the host may call a barrier-based write request for the dummy data by designating the memory address and size of the data to be stored as a predetermined specific value (eg, 0). This allows the host to guarantee the writing order of the data without actually storing the data in a file.

이와 같이, 본 발명의 일 실시예에 따른 더미 입출력 요청을 이용한 배리어 명령 전달 방법은 더미 입출력 요청을 이용하여 배리어 기반 쓰기 요청에 대응되는 배리어 명령을 스토리지에 전달함으로써, 스토리지에 기록해야 할 데이터가 없는 경우에도 배리어 명령을 스토리지에 전달할 수 있는 효과가 있다.As described above, in the method of transmitting a barrier command using a dummy I/O request according to an embodiment of the present invention, the barrier command corresponding to the barrier-based write request is transmitted to the storage using the dummy I/O request, so that there is no data to be written to the storage. Even in this case, it has the effect of passing a barrier command to the storage.

도 5는 본 발명의 다른 실시예에 따른 더미 입출력 요청을 이용한 배리어 명령 전달 방법을 설명하기 위한 흐름도이다.5 is a flowchart illustrating a method of transmitting a barrier command using a dummy input/output request according to another embodiment of the present invention.

단계 S510에서는, 호스트가 갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출한다.In step S510, the host calls at least one order-guaranteed write request supporting the guarantee of the write order in the storage with respect to at least one block data that is data corresponding to the updated data block.

단계 S520에서는, 호스트가 적어도 하나의 블록데이터가 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출한다.In step S520, the host calls a barrier-based synchronization command, which is a command such that at least one block data is written to the storage before the subsequent block data for which the order guarantee write request is called after the at least one order guarantee write request is called.

단계 S530에서는, 호스트가 쓰기 요청으로부터 쓰기 명령을 구성하기 위해 이용되는 IO 스케줄러 큐에 적어도 하나의 순서 보장 쓰기 요청이 남아있는지 판단한다.In step S530, it is determined whether at least one order-guaranteed write request remains in the IO scheduler queue used to configure the write command from the write request by the host.

예컨대, 호스트의 프로세서에서 동작하는 다른 프로세스에 의해 IO 스케줄러 큐에 저장된 적어도 하나의 순서 보장 쓰기 요청이 적어도 하나의 순서 보장 쓰기 명령으로 구성되어, 스토리지에 전송될 수 있다. For example, at least one order guaranteed write request stored in the IO scheduler queue by another process operating in the processor of the host may be configured as at least one order guaranteed write command and transmitted to the storage.

그 결과, IO 스케줄러 큐에 저장된 적어도 하나의 순서 보장 쓰기 요청 중 전부 또는 일부의 쓰기 요청이 남아있거나, 반대로 그 적어도 하나의 순서 보장 쓰기 요청이 하나도 남아있지 않을 수 있다.As a result, all or part of the write requests stored in the IO scheduler queue may remain, or conversely, none of the at least one order guaranteed write requests may remain.

마지막으로 단계 S540에서는, 호스트가 그 적어도 하나의 쓰기 요청이 남아있지 않으면, 더미 데이터에 대하여 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출한다.Finally, in step S540 , if the at least one write request is not left, the host calls a barrier-based write request supporting the guarantee of the write order in the storage and the setting of a breakpoint of the write order for the dummy data.

예컨대, 호스트의 프로세서에서 동작하는 다른 프로세스에 의해 그 적어도 하나의 순서 보장 쓰기 요청에 대응되는 적어도 하나의 순서 보장 쓰기 명령이 스토리지에 전달된 경우, IO 스케줄러 큐에는 그 적어도 하나의 쓰기 요청이 남아있지 않을 수 있다.For example, when at least one order guarantee write command corresponding to the at least one order guarantee write request is transmitted to the storage by another process running on the processor of the host, the at least one write request remains in the IO scheduler queue. may not be

이때, 호스트는 저장하려는 데이터의 메모리 주소 및 크기를 미리 지정된 특정한 값(예, 0)으로 지정함으로써, 더미 데이터에 대한 배리어 기반 쓰기 요청을 호출할 수 있다.In this case, the host may call a barrier-based write request for the dummy data by designating the memory address and size of the data to be stored as a predetermined specific value (eg, 0).

다른 실시예에서는, 호스트가 그 적어도 하나의 쓰기 요청 중 전부 또는 일부가 남아있으면, 적어도 하나의 쓰기 요청 중 마지막으로 쓰기 명령으로 구성되는 쓰기 요청을 배리어 기반 쓰기 요청으로 변경할 수 있다.In another embodiment, if all or part of the at least one write request remains, the host may change the write request including the last write command among the at least one write request to a barrier-based write request.

만일, IO 스케줄러 큐에는 그 적어도 하나의 쓰기 요청 중 전부 또는 일부가 남아있으면, 호스트는 그 적어도 하나의 쓰기 요청 중에서 마지막으로 쓰기 명령으로 구성되는 쓰기 요청을 배리어 기반 쓰기 요청으로 변경(S550)하여 배리어 기반 쓰기 명령을 구성하고, 스토리지에 전송할 수 있다.If all or part of the at least one write request remains in the IO scheduler queue, the host changes the write request composed of the last write command among the at least one write request into a barrier-based write request (S550) to provide a barrier The underlying write command can be constructed and sent to storage.

즉, 호스트는 그 적어도 하나의 쓰기 요청이 IO 스케줄러 큐에 남아있는지 여부에 따라서, 더미 데이터에 대한 배리어 기반 쓰기 요청을 호출하거나 기존의 순서 보장 쓰기 요청 중 하나를 배리어 기반 쓰기 요청으로 변경할 수 있다.That is, the host may call a barrier-based write request for dummy data or change one of the existing order-guaranteed write requests to a barrier-based write request, depending on whether the at least one write request remains in the IO scheduler queue.

한편, 도 6을 참조하여 본 발명의 다른 실시예에 따른 더미 입출력 요청을 이용한 배리어 명령 전달 방법을 설명하면 다음과 같다.Meanwhile, a method of transmitting a barrier command using a dummy input/output request according to another embodiment of the present invention will be described with reference to FIG. 6 .

즉, 도 6은 호스트의 프로세스가 파일 A와 파일 B에 각각 데이터를 기록할 때, 각 파일에 기록되는 데이터의 순서를 보장하기 위해, 각 쓰기 사이에 배리어 기반 동기화 명령(예, fbarrier())을 호출하지만, 파일 A의 데이터가 이미 다른 프로세스에 의해 쓰여져 배리어 기반 동기화 명령이 기록해야 할 데이터가 없는 상황을 나타낸다. That is, Figure 6 shows that when a process on the host writes data to file A and file B, respectively, a barrier-based synchronization command (e.g. fbarrier()) between each write to ensure the order of the data written to each file. , but the data in file A has already been written by another process, indicating that the barrier-based sync command has no data to write.

보다 구체적으로, 먼저 호스트의 프로세스(P1)는 파일 A에 데이터를 기록한다(①). 이 때, 다른 프로세스(P2)로 문맥 전환이 발생하고, 그 다른 프로세스(P2)가 파일 A의 데이터를 저장 장치에 기록한다(②). 다시 원래 프로세스(P1)로 문맥 전환이 발생하고, 그 원래 프로세스(P1)는 파일 B에 데이터를 기록하기 전에 파일 A의 데이터가 먼저 스토리지에 기록되는 것을 보장하기 위해 배리어 기반 동기화 명령을 호출한다(③). 프로세스(P1)는 파일 A에 스토리지에 기록할 데이터가 없음을 확인하고, 더미 입출력 요청을 할당한다(④). 그리고 더미 입출력 요청에 베리어 명령을 설정한 후(⑤), 스토리지에 전달한다(⑥). 마지막으로, 파일 B에 데이터를 쓴다(⑦).More specifically, first, the process (P1) of the host writes data to the file A (①). At this time, a context switch to another process P2 occurs, and the other process P2 writes the data of the file A to the storage device (②). A context switch occurs back to the original process P1, which calls the barrier-based sync command to ensure that the data in file A is first written to storage before writing data to file B ( ③). Process (P1) confirms that there is no data to be written to storage in file A, and allocates a dummy I/O request (④). And after setting the barrier command to the dummy I/O request (⑤), it is transmitted to the storage (⑥). Finally, data is written to file B (⑦).

도 7은 본 발명의 일 실시예에 따른 더미 입출력 요청을 이용하여 배리어 명령을 전달하는 컴퓨팅 장치를 설명하기 위한 블록도이다.7 is a block diagram illustrating a computing device that transmits a barrier command using a dummy input/output request according to an embodiment of the present invention.

도 7을 참조하면, 본 발명의 일 실시예에 따른 더미 입출력 요청을 이용하여 배리어 명령을 전달하는 컴퓨팅 장치(700)는 스토리지(710) 및 프로세서(720)를 포함한다.Referring to FIG. 7 , a computing device 700 that transmits a barrier command using a dummy input/output request according to an embodiment of the present invention includes a storage 710 and a processor 720 .

스토리지(710)는 기록 순서의 보장을 지원하는 파일 시스템을 운영하는 소프트웨어가 탑재된다.The storage 710 is loaded with software for operating a file system that supports the guarantee of writing order.

프로세서(720)는 스토리지(710)에 탑재된 소프트웨어를 운영한다.The processor 720 operates software loaded in the storage 710 .

이때, 프로세서(720)는 갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 스토리지(710)에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하고, 그 적어도 하나의 블록데이터가 그 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 스토리지(710)에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하고, 쓰기 요청으로부터 쓰기 명령을 구성하기 위해 이용되는 IO 스케줄러 큐에 그 적어도 하나의 순서 보장 쓰기 요청이 남아있는지 판단하고, 그 적어도 하나의 쓰기 요청이 남아있지 않으면, 더미 데이터에 대하여 스토리지(710)에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출한다.In this case, the processor 720 calls at least one order guarantee write request supporting the guarantee of the write order in the storage 710 with respect to at least one block data that is data corresponding to the updated data block, and the at least one Invoking a barrier-based synchronization command, which is a command to cause one block data to be written to the storage 710 before subsequent block data for which an order-guaranteed write request is called, after the at least one order-guaranteed write request is called, and from the write request It is determined whether the at least one order-guaranteed write request remains in the IO scheduler queue used to configure the write command, and if the at least one write request does not remain, the write order of the dummy data in the storage 710 is determined. Invokes barrier-based write requests that support guarantees and breakpoints in write order.

다른 실시예에서는, 프로세서(720)는 그 적어도 하나의 쓰기 요청 중 전부 또는 일부가 남아있으면, 그 적어도 하나의 쓰기 요청 중 마지막으로 쓰기 명령으로 구성되는 쓰기 요청을 배리어 기반 쓰기 요청으로 변경할 수 있다.In another embodiment, if all or part of the at least one write request remains, the processor 720 may change the write request including the last write command among the at least one write request to a barrier-based write request.

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다. So far, with respect to the present invention, the preferred embodiments have been looked at. Those of ordinary skill in the art to which the present invention pertains will understand that the present invention can be implemented in a modified form without departing from the essential characteristics of the present invention. Therefore, the disclosed embodiments are to be considered in an illustrative rather than a restrictive sense. The scope of the present invention is indicated in the claims rather than the foregoing description, and all differences within the scope equivalent thereto should be construed as being included in the present invention.

Claims (5)

호스트가 스토리지에 기록되는 데이터의 기록 순서를 보장하기 위하여 더미 입출력 요청을 이용하는 배리어 명령 전달 방법에 있어서,
갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 상기 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하는 단계;
상기 적어도 하나의 블록데이터가 상기 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 상기 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하는 단계;
상기 스토리지에 기록되지 않는 더미 데이터에 대하여 상기 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출하는 단계;
를 포함하는 것을 특징으로 하는 더미 입출력 요청을 이용한 배리어 명령 전달 방법.
A method for transmitting a barrier command using a dummy I/O request by a host to ensure a writing order of data written to storage, the method comprising:
invoking at least one order-guaranteed write request supporting a write order guarantee in the storage with respect to at least one block data that is data corresponding to the updated data block;
calling a barrier-based synchronization command, which is a command to cause the at least one block data to be written to the storage before subsequent block data for which the order-guaranteed write request is called after the at least one order-guaranteed write request is called;
invoking a barrier-based write request supporting dummy data that is not written to the storage to ensure a write order in the storage and to set a breakpoint in the write order;
A method of transmitting a barrier command using a dummy input/output request, comprising:
호스트가 스토리지에 기록되는 데이터의 기록 순서를 보장하기 위하여 더미 입출력 요청을 이용하는 배리어 명령 전달 방법에 있어서,
갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 상기 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하는 단계;
상기 적어도 하나의 블록데이터가 상기 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 상기 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하는 단계;
쓰기 요청으로부터 쓰기 명령을 구성하기 위해 이용되는 IO 스케줄러 큐에 상기 적어도 하나의 순서 보장 쓰기 요청이 남아있는지 판단하는 단계; 및
상기 적어도 하나의 쓰기 요청이 남아있지 않으면, 상기 스토리지에 기록되지 않는 더미 데이터에 대하여 상기 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출하는 단계;
를 포함하는 것을 특징으로 하는 더미 입출력 요청을 이용한 배리어 명령 전달 방법.
A method for transmitting a barrier command using a dummy I/O request by a host to ensure a writing order of data written to storage, the method comprising:
invoking at least one order-guaranteed write request supporting a write order guarantee in the storage with respect to at least one block data that is data corresponding to the updated data block;
calling a barrier-based synchronization command, which is a command to cause the at least one block data to be written to the storage before subsequent block data for which the order-guaranteed write request is called after the at least one order-guaranteed write request is called;
determining whether the at least one order-guaranteed write request remains in an IO scheduler queue used to construct a write command from a write request; and
calling a barrier-based write request for guaranteeing a write order in the storage and setting a breakpoint of a write order for dummy data that is not written to the storage when the at least one write request does not remain;
A method of transmitting a barrier command using a dummy input/output request, comprising:
제2항에 있어서,
상기 적어도 하나의 쓰기 요청의 전부 또는 일부가 남아있으면, 상기 적어도 하나의 쓰기 요청 중 마지막으로 쓰기 명령으로 구성되는 쓰기 요청을 배리어 기반 쓰기 요청으로 변경하는 단계
를 더 포함하는 것을 특징으로 하는 더미 입출력 요청을 이용한 배리어 명령 전달 방법.
3. The method of claim 2,
changing a write request composed of a last write command among the at least one write request into a barrier-based write request when all or part of the at least one write request remains
A barrier command transmission method using a dummy input/output request, characterized in that it further comprises a.
기록 순서의 보장을 지원하는 파일 시스템을 운영하는 소프트웨어가 탑재된 스토리지; 및
상기 스토리지에 탑재된 소프트웨어를 운영하는 프로세서를 포함하고,
상기 프로세서는
갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 상기 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하고,
상기 적어도 하나의 블록데이터가 상기 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 상기 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하고,
쓰기 요청으로부터 쓰기 명령을 구성하기 위해 이용되는 IO 스케줄러 큐에 상기 적어도 하나의 순서 보장 쓰기 요청이 남아있는지 판단하고,
상기 적어도 하나의 쓰기 요청이 남아있지 않으면, 상기 스토리지에 기록되지 않는 더미 데이터에 대하여 상기 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출하는 것을 특징으로 하는 더미 입출력 요청을 이용하여 배리어 명령을 전달하는 컴퓨팅 장치.
storage with software operating a file system that supports the guarantee of writing order; and
A processor for operating software mounted on the storage;
the processor
Calling at least one order-guaranteed write request supporting the guarantee of the write order in the storage for at least one block data that is data corresponding to the updated data block,
Invoking a barrier-based synchronization command, which is a command such that the at least one block data is written to the storage before subsequent block data for which an order guarantee write request is called after the at least one order guarantee write request is called,
determining whether the at least one order-guaranteed write request remains in an IO scheduler queue used to construct a write command from a write request;
If the at least one write request does not remain, calling a barrier-based write request supporting the guarantee of the write order in the storage and the setting of a breakpoint of the write order for the dummy data that is not written to the storage A computing device that passes barrier commands using dummy I/O requests.
제4항에 있어서,
상기 프로세서는
상기 적어도 하나의 쓰기 요청의 전부 또는 일부가 남아있으면, 상기 적어도 하나의 쓰기 요청 중 마지막으로 쓰기 명령으로 구성되는 쓰기 요청을 배리어 기반 쓰기 요청으로 변경하는 것을 특징으로 하는 더미 입출력 요청을 이용하여 배리어 명령을 전달하는 컴퓨팅 장치.
5. The method of claim 4,
the processor
A barrier command using a dummy input/output request, characterized in that when all or part of the at least one write request remains, a write request composed of a last write command among the at least one write request is changed to a barrier-based write request. A computing device that delivers
KR1020190015743A 2018-02-09 2019-02-11 Method and apparatus for sending barrier command using dummy io request KR102262209B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020180016578 2018-02-09
KR20180016578 2018-02-09

Publications (2)

Publication Number Publication Date
KR20190096838A KR20190096838A (en) 2019-08-20
KR102262209B1 true KR102262209B1 (en) 2021-06-09

Family

ID=67807628

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190015743A KR102262209B1 (en) 2018-02-09 2019-02-11 Method and apparatus for sending barrier command using dummy io request

Country Status (1)

Country Link
KR (1) KR102262209B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102226184B1 (en) * 2020-02-25 2021-03-10 한국과학기술원 Method for processing a cache barrier commend for a disk array and device for the same

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090006787A1 (en) 2007-06-27 2009-01-01 Jorge Campello De Souza Storage device with write barrier sensitive write commands and write barrier insensitive commands
US20140033209A1 (en) 2012-07-27 2014-01-30 Futurewei Technologies, Inc. Handling of Barrier Commands for Computing Systems
US20140059270A1 (en) 2012-08-23 2014-02-27 Etai Zaltsman Efficient enforcement of command execution order in solid state drives
JP2014153851A (en) * 2013-02-07 2014-08-25 Nec Computertechno Ltd Instruction execution control device, instruction execution control system, instruction execution control method, and instruction execution control program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7243200B2 (en) * 2004-07-15 2007-07-10 International Business Machines Corporation Establishing command order in an out of order DMA command queue
US7725618B2 (en) * 2004-07-29 2010-05-25 International Business Machines Corporation Memory barriers primitives in an asymmetric heterogeneous multiprocessor environment
GB2474446A (en) * 2009-10-13 2011-04-20 Advanced Risc Mach Ltd Barrier requests to maintain transaction order in an interconnect with multiple paths
US8880819B2 (en) * 2011-12-13 2014-11-04 Micron Technology, Inc. Memory apparatuses, computer systems and methods for ordering memory responses
US20160092118A1 (en) * 2014-09-26 2016-03-31 Intel Corporation Memory write management in a computer system
KR102646724B1 (en) * 2018-01-12 2024-03-14 삼성전자주식회사 Storage device storing data in order based on barrier command

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090006787A1 (en) 2007-06-27 2009-01-01 Jorge Campello De Souza Storage device with write barrier sensitive write commands and write barrier insensitive commands
US20140033209A1 (en) 2012-07-27 2014-01-30 Futurewei Technologies, Inc. Handling of Barrier Commands for Computing Systems
US20140059270A1 (en) 2012-08-23 2014-02-27 Etai Zaltsman Efficient enforcement of command execution order in solid state drives
JP2014153851A (en) * 2013-02-07 2014-08-25 Nec Computertechno Ltd Instruction execution control device, instruction execution control system, instruction execution control method, and instruction execution control program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YoujipWon. 외 6인."Barrier Enabled IO Stack for Flash Storage".Cornell University Library(Operating Systems),URL: arXiv:1711.02258,.2017.11.07.,(제1면 내지 제15면)*
이원종 외 2인."트랜잭션을 사용하는 파일시스템에서 저널 충돌 분석".2018년 한국소프트웨어종합학술대회 논문집.2018.12.19.,(제1352면 내지 제1354면)

Also Published As

Publication number Publication date
KR20190096838A (en) 2019-08-20

Similar Documents

Publication Publication Date Title
US7716430B2 (en) Separate handling of read and write of read-modify-write
US7181581B2 (en) Method and apparatus for mirroring data stored in a mass storage system
US7383290B2 (en) Transaction processing systems and methods utilizing non-disk persistent memory
US7228399B2 (en) Control method for storage device controller system, and storage device controller system
US7234004B2 (en) Method, apparatus and program product for low latency I/O adapter queuing in a computer system
US20050114592A1 (en) Storage system and data caching method in the system
US9411519B2 (en) Implementing enhanced performance flash memory devices
US20140052906A1 (en) Memory controller responsive to latency-sensitive applications and mixed-granularity access requests
US20130111103A1 (en) High-speed synchronous writes to persistent storage
JP2015520425A (en) Computer system and control method thereof
CN110457261A (en) Data access method, device and server
US7650476B2 (en) System, method and computer program product for generating a consistent point in time copy of data
CN109213439A (en) System and method for reducing write-in delay
KR102262209B1 (en) Method and apparatus for sending barrier command using dummy io request
US10007467B2 (en) Storage system
US8239634B2 (en) Input/output control based on information specifying input/output issuing source and input/output priority
US7127478B1 (en) Data base for persistent data
US20120311236A1 (en) Memory system, data control method, and data controller
KR102132387B1 (en) Method and apparatus for logging based on barrier
KR20200044646A (en) Method and apparatus for dual mode journaling
KR102254501B1 (en) Partially order preserving i/o scheduler and method thereof
US20050223180A1 (en) Accelerating the execution of I/O operations in a storage system
JPH0484215A (en) Data dual writing method for disk controller
KR101881039B1 (en) Method for asynchronous atomic update of memory mapped files stored in non-volatile memory and control apparatus thereof
CN118113461A (en) CXL memory expansion device, atomic operation method and atomic operation system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
X091 Application refused [patent]
AMND Amendment
X701 Decision to grant (after re-examination)
GRNT Written decision to grant