KR20190096838A - 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
KR20190096838A
KR20190096838A KR1020190015743A KR20190015743A KR20190096838A KR 20190096838 A KR20190096838 A KR 20190096838A KR 1020190015743 A KR1020190015743 A KR 1020190015743A KR 20190015743 A KR20190015743 A KR 20190015743A KR 20190096838 A KR20190096838 A KR 20190096838A
Authority
KR
South Korea
Prior art keywords
write
order
write request
storage
barrier
Prior art date
Application number
KR1020190015743A
Other languages
Korean (ko)
Other versions
KR102262209B1 (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 for transferring a barrier command using a dummy IO request. According to one embodiment of the present invention, the method which allows a host to guarantee a recording order of data recorded in a storage comprises the steps of: calling at least one order guaranteeing write request for supporting the guarantee of the recording order in the storage for at least one piece of block data, which is data corresponding to an updated data block; calling a barrier-based synchronization command of recording the block data in the storage before subsequent block data requested for the order guaranteeing write after the calling of the order guaranteeing write request; and calling a barrier-based write request for supporting the guarantee of the recording order in the storage and breakpoint setting of the recording order for dummy data.

Description

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

본 발명은 더미 입출력 요청을 이용하여 데이터가 스토리지에 기록되는 순서를 보장하기 위한 배리어 명령을 전달하는 방법 및 그 방법이 적용된 컴퓨팅 장치에 관한 것이다.The present invention relates to a method of delivering a barrier command for guaranteeing an 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 an operating system and performs an operation corresponding to the command. For example, to send a command to flash memory-based storage, the Linux kernel must allocate an I / O request, set a command to pass to the I / O request, and pass it to that storage. Thus, the only way the host can send commands to the storage is through these I / O commands. The exception is that a flush, a command for storing data in a cache in a storage device in a persistent storage device, may be delivered without a specific input / output request for the storage.

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

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

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

관련 선행기술로는 대한민국 공개특허공보 제10-2017-0141184호(발명의 명칭 : 로깅 장치 및 로깅 방법)가 있다.Related prior arts include Korean Laid-Open Patent Publication No. 10-2017-0141184 (name of the invention: a logging device and a logging method).

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

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

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

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

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

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

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

본 발명은 호스트가 더미 입출력 요청을 이용하여 배리어 명령을 스토리지에 전달함으로써, 스토리지에 기록해야 할 데이터가 없는 경우에도 배리어 명령을 스토리지에 전달할 수 있는 효과가 있다.According to the present invention, the barrier command is transmitted to the storage using a dummy input / output request, so that the barrier command can be delivered 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 illustrating a data input / output process between a host and a storage device according to the related art.
FIG. 2 is a diagram illustrating 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 describing an order-guaranteed input and output stack according to an embodiment of the present invention.
4 is a flowchart illustrating a barrier command transfer method using a dummy input / output request according to an embodiment of the present invention.
5 is a flowchart illustrating a barrier command transfer method using a dummy input / output request according to another embodiment of the present invention.
6 is a diagram illustrating a barrier command transfer method using a dummy input / output request according to another embodiment of the present invention.
7 is a block diagram illustrating a computing device for transferring a barrier command using a dummy input / output request according to an embodiment of the present invention.

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

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

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

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprise" or "have" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination 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. Terms such as those defined in the commonly used dictionaries should be construed as having meanings consistent with the meanings in the context of the related art and shall not be construed in ideal or excessively formal meanings unless expressly defined in this application. Do not.

도 1은 종래의 기술에 따른 호스트와 스토리지 간의 데이터 입출력 과정을 설명하기 위한 도면이다.1 is a diagram illustrating a data input / output process between a host and a storage device 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 by a host inputs a write request to an IO scheduler queue. The block device driver then removes one or more write requests from the IO scheduler queue and constructs a write command therefrom. The block device driver then delivers the write command to the storage device when possible. At this time, if the command queue of the storage device is not full, this may be the case. In addition, the storage controller removes the transferred write command from the command queue, receives the data related to the write command from the host, and stores the data 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 explicit request from the host.

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

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

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

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

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

도 2는 종래의 기술에 따른 EXT4 파일시스템의 동기화 명령인 fsync()의 동작 과정을 설명하기 위한 도면이다.FIG. 2 is a diagram illustrating 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)하기 전에, 저널안에 생성되는 변경사항을 추적하여 기록하는 파일 시스템이다. 이를 통해, 시스템 충돌이나 전원 문제가 발생할 때 초래될 수 있는 시스템의 손상을 최소화할 수 있는 효과가 있다.Extended file system 4 (EXT4) is Linux's leading journaling file system, 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 them to the file system. Through this, it is possible to minimize the damage of the system that can be caused when a system crash or power problems occur.

EXT4 파일 시스템에서는 기록 순서를 제어하기 위하여 fsync() 함수를 이용한다. Ordered모드(default)에서는 데이터 블록(D)이 저널 트랜잭션에 앞서 기록된다.The EXT4 file system uses the fsync () function to control the recording order. In 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 enters a write request for the data block (D). In this case, the data block D may be a plurality of blocks for other files. The application thread then waits for the DMA transfer to complete. When the DMA transfer is complete, the application thread runs the JBD thread to reflect the journal transaction. After that, the application thread goes back to sleep, and after the JBD thread has recorded all the journal transactions, it returns.

보다 구체적으로, 저널 트랜잭션은 두개의 쓰기 요청을 통해 반영될 수 있다. 이는, 저널 디스크립터 블록 및 로그 블록(JD)과 커밋 블록(JC)이다. 또한, 저널 트랜잭션을 반영하는 과정에서, JBD 쓰레드는 단일 트랜잭션 내부에서, 그리고 트랜잭션들 간에서 그 기록 순서를 유지할 필요가 있다. More specifically, the journal transaction can be reflected through two write requests. These are journal descriptor blocks and log blocks (JD) and commit blocks (JC). Also, in the course of reflecting journal transactions, JBD threads need to maintain their write 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. In other words, JBD threads can use the Transfer-and-Flush technique so that JDs are written before JC. In this case, the Transfer-and-Flush technique waits while data about JD is transferred through DMA, is written to storage, and then data about JC is transferred through DMA, and the storage is performed. In order to be flushed, the order of writing is kept.

또한, 트랜잭션들 간에는, JBD 쓰레드가 저널 트랜잭션의 요청 순서에 따라서 그 트랜잭션들이 기록되도록 해야 할 필요가 있다.In addition, between transactions, the JBD thread needs to ensure that the transactions are recorded in the order of the journal transaction's request.

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

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

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

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

또한, 순서 보장 쓰기 요청의 집합으로, 그 집합 내부에서는 기록 순서가 변경가능한 단위가 에포크이다. 또한, 순서 보장 쓰기 요청에 대응되는 순서 보장 쓰기 명령 중에서 특별한 하나의 타입이 배리어 기반 쓰기 명령이다. 즉, 배리어 기반 쓰기 명령은 에포크를 분류하기 위하여 이용되며, 그 전후의 순서 보장 쓰기 명령 간의 스토리지에서의 기록 순서가 보장된다.Also, a set of order-guaranteed write requests, in which the units whose recording order can be changed are epochs. In addition, one special type of order guaranteed write commands corresponding to the order guaranteed write request is a barrier-based write command. That is, barrier-based write commands are used to classify epochs, and the write order in storage between the order-safe write commands before and after it 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-safe 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 barrier command transfer method 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 guarantee write request for guaranteeing the write order in the storage for at least one block data which is data corresponding to the updated data block.

이때, 호스트의 쓰기 요청은 순서 보장이 가능한 순서 보장 쓰기 요청과 순서 보장이 되지 않는 순서 없는 쓰기 요청으로 구분될 수 있다. 호스트는 데이터의 기록 순서에 관한 보장이 필요한 경우에, 순서 보장 쓰기 요청을 호출하여 그 기록 순서를 보장받을 수 있다.In this case, the write request of the host may be classified into an order guarantee write request capable of order guarantee and an unordered write request that does not guarantee order. If a host needs to guarantee the order of writing of data, it can call the order-safe write request to ensure that writing order.

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

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

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

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

예컨대, 호스트는 A 파일을 스토리지에 기록한 이후에, B 파일을 스토리지에 기록하기 위하여, 적어도 하나의 순서 보장 쓰기 요청(write(A))을 호출한 뒤, 배리어 기반 동기화 명령(fbarrier(A))을 호출할 수 있다. 그리고, 호스트는 또다시 적어도 하나의 순서 보장 쓰기 요청(write(B))을 호출하여 A 파일이 B 파일보다 먼저 스토리지에 기록되도록 할 수 있다.For example, after the host has written the A file to storage, the host invokes at least one order-guaranteed write request write (A) to write the B file to the storage, followed by a barrier-based synchronization command fbarrier (A). Can be called. In addition, the host may call at least one order guarantee 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 invokes a barrier-based write request for supporting dummy data and guaranteeing a writing order in storage and setting a break point of the writing order.

즉, 호스트는 실질적으로 파일에 기록되지 않는 더미 데이터에 대하여 배리어 기반 쓰기 요청을 호출함으로써, 배리어 기반 쓰기 요청의 이전과 이후에 쓰기 요청된 데이터가 스토리지 상에서 기록 순서를 보장할 수 있다. 이때, 호스트는 IO 스케줄러 큐에 적어도 하나의 순서 보장 쓰기 요청이 남아있는 지와 무관하게 배리어 기반 쓰기 요청을 호출할 수 있다.That is, the host may call a barrier-based write request for dummy data that is not substantially written to a file, thereby ensuring that the data requested for writing before and after the barrier-based write request is written on storage. In this case, 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, previously written request data of the barrier based write request forms a single epoch. In addition, the host cannot guarantee the recording order between a plurality of order-guaranteed write requests included in a single epoch through a barrier-based write request. However, the host completes the formation of the epoch while guaranteeing the recording order between epochs, and thus is a break point of the write order. Can be set.

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

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

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

도 5는 본 발명의 다른 실시예에 따른 더미 입출력 요청을 이용한 배리어 명령 전달 방법을 설명하기 위한 흐름도이다.5 is a flowchart illustrating a barrier command transfer method 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 guarantee write request that supports the guarantee of the recording order in the storage for at least one block data which is data corresponding to the updated data block.

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

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

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

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

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

예컨대, 호스트의 프로세서에서 동작하는 다른 프로세스에 의해 그 적어도 하나의 순서 보장 쓰기 요청에 대응되는 적어도 하나의 순서 보장 쓰기 명령이 스토리지에 전달된 경우, IO 스케줄러 큐에는 그 적어도 하나의 쓰기 요청이 남아있지 않을 수 있다.For example, if at least one ordered write command corresponding to the at least one ordered write request is delivered 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. You may not.

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

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

만일, IO 스케줄러 큐에는 그 적어도 하나의 쓰기 요청 중 전부 또는 일부가 남아있으면, 호스트는 그 적어도 하나의 쓰기 요청 중에서 마지막으로 쓰기 명령으로 구성되는 쓰기 요청을 배리어 기반 쓰기 요청으로 변경(S550)하여 배리어 기반 쓰기 명령을 구성하고, 스토리지에 전송할 수 있다.If all or some of the at least one write request remain in the IO scheduler queue, the host changes the write request consisting of the last write command among the at least one write request to a barrier-based write request (S550). You can configure base write commands and send them 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, referring to FIG. 6, a barrier command transfer method using a dummy input / output request according to another embodiment of the present invention will be described.

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

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

도 7은 본 발명의 일 실시예에 따른 더미 입출력 요청을 이용하여 배리어 명령을 전달하는 컴퓨팅 장치를 설명하기 위한 블록도이다.7 is a block diagram illustrating a computing device for transferring 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 equipped with software for operating a file system that supports the guarantee of the recording order.

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

이때, 프로세서(720)는 갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 스토리지(710)에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하고, 그 적어도 하나의 블록데이터가 그 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 스토리지(710)에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하고, 쓰기 요청으로부터 쓰기 명령을 구성하기 위해 이용되는 IO 스케줄러 큐에 그 적어도 하나의 순서 보장 쓰기 요청이 남아있는지 판단하고, 그 적어도 하나의 쓰기 요청이 남아있지 않으면, 더미 데이터에 대하여 스토리지(710)에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출한다.In this case, the processor 720 calls at least one order-guaranteed write request that supports 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 at least the Invoke a barrier-based synchronization command, which is a command that causes one block data to be written to storage 710 before the subsequent block data called after the at least one ordered write request is invoked, and from the write request. Determine if there is at least one order-guaranteed write request left in the IO scheduler queue used to construct the write command, and if the at least one write request is not left, the write order in the storage 710 for the dummy data. Invokes a barrier-based write request that supports the establishment of breakpoints in guarantee and 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 consisting of the last write command among the at least one write request into a barrier-based write request.

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

Claims (5)

호스트가 스토리지에 기록되는 데이터의 기록 순서를 보장하는 방법에 있어서,
갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 상기 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하는 단계;
상기 적어도 하나의 블록데이터가 상기 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 상기 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하는 단계;
더미 데이터에 대하여 상기 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출하는 단계;
를 포함하는 것을 특징으로 하는 더미 입출력 요청을 이용한 배리어 명령 전달 방법.
A method for guaranteeing a recording order of data written to storage by a host, the method comprising:
Invoking at least one order guarantee write request for guaranteeing a write order in the storage, for at least one block data that is data corresponding to an updated data block;
Invoking a barrier-based synchronization command which is a command to cause the at least one block data to be written to the storage prior to subsequent block data called after the at least one ordered write request is invoked;
Invoking a barrier-based write request for dummy data to support guaranteeing a write order in the storage and setting breakpoints in the write order;
Barrier command delivery method using a dummy input and output request comprising a.
호스트가 스토리지에 기록되는 데이터의 기록 순서를 보장하는 방법에 있어서,
갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 상기 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하는 단계;
상기 적어도 하나의 블록데이터가 상기 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 상기 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하는 단계;
쓰기 요청으로부터 쓰기 명령을 구성하기 위해 이용되는 IO 스케줄러 큐에 상기 적어도 하나의 순서 보장 쓰기 요청이 남아있는지 판단하는 단계; 및
상기 적어도 하나의 쓰기 요청이 남아있지 않으면, 더미 데이터에 대하여 상기 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출하는 단계;
를 포함하는 것을 특징으로 하는 더미 입출력 요청을 이용한 배리어 명령 전달 방법.
A method for guaranteeing a recording order of data written to storage by a host, the method comprising:
Invoking at least one order guarantee write request for guaranteeing a write order in the storage, for at least one block data that is data corresponding to an updated data block;
Invoking a barrier-based synchronization command which is a command to cause the at least one block data to be written to the storage prior to subsequent block data called after the at least one ordered write request is invoked;
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
If the at least one write request remains, invoking a barrier-based write request for dummy data to support guaranteeing the write order in the storage and setting breakpoints in the write order;
Barrier command delivery method using a dummy input and output request comprising a.
제2항에 있어서,
상기 적어도 하나의 쓰기 요청의 전부 또는 일부가 남아있으면, 상기 적어도 하나의 쓰기 요청 중 마지막으로 쓰기 명령으로 구성되는 쓰기 요청을 배리어 기반 쓰기 요청으로 변경하는 단계
를 더 포함하는 것을 특징으로 하는 더미 입출력 요청을 이용한 배리어 명령 전달 방법.
The method of claim 2,
If all or part of the at least one write request remains, changing a write request consisting of the last write command of the at least one write request to a barrier-based write request
Barrier command delivery method using a dummy input and output request characterized in that it further comprises.
기록 순서의 보장을 지원하는 파일 시스템을 운영하는 소프트웨어가 탑재된 스토리지; 및
상기 스토리지에 탑재된 소프트웨어를 운영하는 프로세서를 포함하고,
상기 프로세서는
갱신된 데이터 블록에 해당하는 데이터인 적어도 하나의 블록데이터에 대하여, 상기 스토리지에서의 기록 순서의 보장을 지원하는 적어도 하나의 순서 보장 쓰기 요청을 호출하고,
상기 적어도 하나의 블록데이터가 상기 적어도 하나의 순서 보장 쓰기 요청의 호출 이후에 순서 보장 쓰기 요청이 호출된 후속블록데이터보다 먼저 상기 스토리지에 기록되도록 하는 명령인 배리어 기반 동기화 명령을 호출하고,
쓰기 요청으로부터 쓰기 명령을 구성하기 위해 이용되는 IO 스케줄러 큐에 상기 적어도 하나의 순서 보장 쓰기 요청이 남아있는지 판단하고,
상기 적어도 하나의 쓰기 요청이 남아있지 않으면, 더미 데이터에 대하여 상기 스토리지에서의 기록 순서의 보장 및 기록 순서의 구분점 설정을 지원하는 배리어 기반 쓰기 요청을 호출하는 것을 특징으로 하는 더미 입출력 요청을 이용하여 배리어 명령을 전달하는 컴퓨팅 장치.
Storage incorporating software for operating a file system supporting guarantee of recording order; And
A processor for operating software mounted on the storage;
The processor is
Calling at least one order guarantee write request for guaranteeing the write order in the storage, for at least one block data that is data corresponding to an updated data block,
Invoking a barrier-based synchronization command that is a command that causes the at least one block data to be written to the storage prior to subsequent block data called after the at least one ordered write request is invoked,
Determine if 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, a dummy input / output request is characterized in that it calls a barrier-based write request for guaranteeing the write order in the storage and setting a break point of the write order for the dummy data. A computing device that carries barrier commands.
제4항에 있어서,
상기 프로세서는
상기 적어도 하나의 쓰기 요청의 전부 또는 일부가 남아있으면, 상기 적어도 하나의 쓰기 요청 중 마지막으로 쓰기 명령으로 구성되는 쓰기 요청을 배리어 기반 쓰기 요청으로 변경하는 것을 특징으로 하는 더미 입출력 요청을 이용하여 배리어 명령을 전달하는 컴퓨팅 장치.
The method of claim 4, wherein
The processor is
If all or part of the at least one write request remains, the barrier command using the dummy input / output request may be changed into a barrier-based write request. Computing device to deliver.
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
KR20180016578 2018-02-09
KR1020180016578 2018-02-09

Publications (2)

Publication Number Publication Date
KR20190096838A true KR20190096838A (en) 2019-08-20
KR102262209B1 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)

Cited By (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 (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060132856A (en) * 2004-07-15 2006-12-22 가부시키가이샤 소니 컴퓨터 엔터테인먼트 Establishing command order in an out of order dma command queue
KR20070038518A (en) * 2004-07-29 2007-04-10 가부시키가이샤 소니 컴퓨터 엔터테인먼트 Memory barriers primitives in an asymmetric heterogeneous multiprocessor environment
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
KR20120095872A (en) * 2009-10-13 2012-08-29 에이알엠 리미티드 Barrier transactions in interconnects
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
KR20140102738A (en) * 2011-12-13 2014-08-22 마이크론 테크놀로지, 인크. Memory apparatuses, computer systems and methods for ordering memory responses
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
KR20170034424A (en) * 2014-09-26 2017-03-28 인텔 코포레이션 Memory write management in a computer system
KR20190086341A (en) * 2018-01-12 2019-07-22 삼성전자주식회사 Storage device storing data in order based on barrier command

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060132856A (en) * 2004-07-15 2006-12-22 가부시키가이샤 소니 컴퓨터 엔터테인먼트 Establishing command order in an out of order dma command queue
KR20070038518A (en) * 2004-07-29 2007-04-10 가부시키가이샤 소니 컴퓨터 엔터테인먼트 Memory barriers primitives in an asymmetric heterogeneous multiprocessor environment
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
KR20120095872A (en) * 2009-10-13 2012-08-29 에이알엠 리미티드 Barrier transactions in interconnects
KR20140102738A (en) * 2011-12-13 2014-08-22 마이크론 테크놀로지, 인크. Memory apparatuses, computer systems and methods for ordering memory responses
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
KR20170034424A (en) * 2014-09-26 2017-03-28 인텔 코포레이션 Memory write management in a computer system
KR20190086341A (en) * 2018-01-12 2019-07-22 삼성전자주식회사 Storage device storing data in order based on barrier command

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면) *

Cited By (3)

* 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
WO2021172708A1 (en) * 2020-02-25 2021-09-02 한국과학기술원 Method for processing cache barrier command for disk array, and device therefor
US11947843B2 (en) 2020-02-25 2024-04-02 Korea Advanced Institute Of Science And Technology Method for processing a cache barrier command for a disk array and device for the same

Also Published As

Publication number Publication date
KR102262209B1 (en) 2021-06-09

Similar Documents

Publication Publication Date Title
KR100524575B1 (en) Reordering a plurality of memory access request signals in a data processing system
US6493773B1 (en) Data validity measure for efficient implementation of first-in-first-out memories for multi-processor systems
US7337281B2 (en) Storage system and data caching method in the system
US8255591B2 (en) Method and system for managing cache injection in a multiprocessor system
US7234004B2 (en) Method, apparatus and program product for low latency I/O adapter queuing in a computer system
US20060277325A1 (en) Efficient data transmission system and method via direct memory access controller
US20130111103A1 (en) High-speed synchronous writes to persistent storage
CN108319430B (en) Method and device for processing IO (input/output) request
US20080183908A1 (en) Control of Data Transfer
US7650476B2 (en) System, method and computer program product for generating a consistent point in time copy of data
CN110457261A (en) Data access method, device and server
JP3266470B2 (en) Data processing system with per-request write-through cache in forced order
US9612756B1 (en) Data storage system with parallel handling of sub-I/O requests for individual host I/O requests
US6615296B2 (en) Efficient implementation of first-in-first-out memories for multi-processor systems
KR20200021867A (en) Embedded reference counter and special data pattern auto-detect
KR102262209B1 (en) Method and apparatus for sending barrier command using dummy io request
US10037289B1 (en) Data storage system with efficient processing of single mapping callback for host I/O requests
US8683161B2 (en) Method and apparatus for increasing file copy performance on solid state mass storage devices
US11960419B2 (en) Systems and methods for data prefetching for low latency data read from a remote server
US10154113B2 (en) Computer system
US20120311236A1 (en) Memory system, data control method, and data controller
KR102132387B1 (en) Method and apparatus for logging based on barrier
US20050223180A1 (en) Accelerating the execution of I/O operations in a storage system
KR102254501B1 (en) Partially order preserving i/o scheduler and method thereof
KR20200044646A (en) Method and apparatus for dual mode journaling

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