WO2022114900A1 - 다중 명령어 큐 스토리지에서 순서 보장 단위를 정하는 방법 및 장치 - Google Patents

다중 명령어 큐 스토리지에서 순서 보장 단위를 정하는 방법 및 장치 Download PDF

Info

Publication number
WO2022114900A1
WO2022114900A1 PCT/KR2021/017786 KR2021017786W WO2022114900A1 WO 2022114900 A1 WO2022114900 A1 WO 2022114900A1 KR 2021017786 W KR2021017786 W KR 2021017786W WO 2022114900 A1 WO2022114900 A1 WO 2022114900A1
Authority
WO
WIPO (PCT)
Prior art keywords
stream
write command
epoch
write
storage device
Prior art date
Application number
PCT/KR2021/017786
Other languages
English (en)
French (fr)
Inventor
원유집
김지은
Original Assignee
한국과학기술원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국과학기술원 filed Critical 한국과학기술원
Priority to US18/255,560 priority Critical patent/US20240094954A1/en
Publication of WO2022114900A1 publication Critical patent/WO2022114900A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • G06F13/161Handling requests for interconnection or transfer for access to memory bus based on arbitration with latency improvement
    • G06F13/1621Handling requests for interconnection or transfer for access to memory bus based on arbitration with latency improvement by maintaining request order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • G06F13/1642Handling requests for interconnection or transfer for access to memory bus based on arbitration with request queuing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1865Transactional file systems
    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • 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/064Management of blocks
    • 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/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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • 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]

Definitions

  • the present invention relates to computing technology, and to a technology for ensuring the execution order of commands transmitted through the transport channels when a plurality of transport channels exist between a host and a storage device.
  • epoch ID when the host transmits write commands to the storage device, a value called an epoch ID may be included in each write command.
  • the storage device may determine the execution order of each write command according to the priority among epoch IDs included in each write command.
  • the storage device when the host determines the epoch IDs included in the write commands of the first group and the write commands of the second group using only one global variable, that is, one epoch counter, the storage device There is a problem in that the execution priority is unnecessarily determined even when there is no priority between the write commands of the first group and the write commands of the second group.
  • An object of the present invention is to provide a technique for determining an order guarantee unit in multi-command queue storage in order to solve the above problem.
  • FIG. 1 shows the I/O requests arriving at the NVMe device over time and the epoch ID of each I/O request when two threads call fdatasync() on different files at the same time.
  • A1 and A2 denote write commands for file A
  • B1 and B2 denote write commands for file B.
  • the first command from the left (A1), the second command (B1), and the second command from the right (A2) represent write commands that must ensure the write order
  • the first command from the right (A3) and the third command from the right (B2) indicate a barrier write command.
  • fdatasync() does not perform journaling when it is not an allocation write in which the size of a file is changed. Therefore, fdatasync() dispatches a write request for the data block of the file passed as an input argument, and includes a barrier flag in the write request for the last dispatched data block to ensure the order between fdatasync() in one thread. Send as barrier-write.
  • Multiple threads operating in the file system share the same epoch counter, and the method in which an ID is assigned to an I/O request generated by each thread as the corresponding epoch counter has two problems in a multi-threaded environment.
  • the first problem is that unnecessary write sequences occur between different processes.
  • the first thread T1 and the second thread T2 call fdatasync() for different files. It is not necessary to guarantee the persistent write order between the data blocks A1, A2, and A3 belonging to the first file A and the data blocks B1 and B2 belonging to the second file B. Since the first thread T1 and the second thread T2 share the same epoch counter, in FIG. 1 , B1 and B2 are given an epoch ID '0', and A2 and A3 are given an epoch ID '1'. Due to this, unnecessary write order restrictions occur between the data blocks B1 and B2 and the data blocks A2 and A3 belonging to the independent epochs.
  • the second problem is that we have to guarantee unnecessary write order within the same thread.
  • the write order of the write requests for the data blocks A1 , A2 , and A3 generated by the first thread T1 may be changed.
  • write commands belonging to the same epoch may have different epoch values.
  • an unnecessary write order is guaranteed between write commands belonging to the same epoch.
  • the write request of data blocks A1, A2, and A3 should belong to the same epoch, but the epoch counter is increased by the barrier write (B2) caused by fdatasync() called by the second thread, so that A1 is different from A2 and A3. It has an epoch ID value. Due to this, unnecessary order guarantee occurs between write requests for data blocks A1, A2, and A3 belonging to the same epoch.
  • a 'stream' is defined.
  • a stream is a flow of epochs generated in the block input/output layer.
  • write order must be guaranteed in the order in which the epochs are created.
  • Epochs created in the same thread belong to the same stream.
  • the storage guarantees the write order between epochs in the epochs belonging to the same stream.
  • a stream ID is given to all write commands.
  • the corresponding stream ID is transmitted along with the write command to the storage.
  • the stream ID of the write command is given in the block I/O layer.
  • Each thread has its own stream. Therefore, the pid (process ID) of the thread can be used for the stream ID created by the thread.
  • a stream ID may be specified in a part of the NVMe command structure. And each stream has its own epoch counter.
  • an epoch counter is added to a task struct representing a thread.
  • the epoch counter When a thread is created, the epoch counter is initialized to 0. When a write command is created, the epoch ID of the write command is assigned as the epoch counter value that exists in the current kernel. The thread increments the epoch counter by one whenever a barrier-write is generated. The epoch ID of barrier-write is given as the value before incrementing the epoch counter by 1.
  • a barrier-write is a write request located at the end of an epoch and has the same epoch ID value as write requests belonging to the same epoch.
  • An order-preserving write request created after a barrier write belongs to a new epoch.
  • the corresponding write request is given an epoch counter value incremented by 1 as the epoch ID when the barrier-write request of the previous epoch is created.
  • Consecutive epochs have a contiguous epoch ID.
  • FIG. 2 is a diagram illustrating input/output arriving at a storage device over time when the stream ID allocation algorithm and the epoch ID allocation algorithm provided according to an aspect of the present invention are applied.
  • the stream ID and epoch ID of the input/output request are displayed together.
  • a dual stream write has two stream IDs and two epoch IDs. That is, dual stream writing is a pair of stream ID and epoch ID for the first stream ⁇ first stream ID, first epoch ID ⁇ , and stream ID and epoch ID for the second stream ⁇ second stream ID, second epoch ID ⁇ ID ⁇ .
  • the present invention proposes the concept of 'double stream write'.
  • a double-stream write is a special form of 'write'.
  • a typical 'write' has its own stream ID and epoch ID.
  • a dual-stream write belongs to two streams at the same time. Therefore, it has two stream IDs and two epoch IDs.
  • Double-stream writes must ensure the 'write' order in both streams to which they belong.
  • Dual-stream writes are used when one thread must wait for a write from another thread before proceeding.
  • Journaling in EXT4 is an example.
  • the application thread writes the changed page (dirty page) of the file to the write buffer of the disk and wakes up the journaling thread.
  • EXT4 separately allocates a thread that records changed metadata, that is, a journaling thread.
  • the journaling thread records the changed metadata and journal commit blocks in the journal area of the disk.
  • the journal commit block must be written to the disk after all of the changed file pages (dirty pages) and the changed metadata are written to the disk. After writing of the changed file block and writing of the changed metadata are finished, writing of the commit block should be terminated.
  • the writing of the changed file block, the writing of the changed metadata block, and the writing of the commit block are W(D), W(M), and W(C), respectively.
  • the order of W(D) ⁇ W(C) and W(M) ⁇ W(C) must be guaranteed.
  • the journaling thread is responsible for writing the changed metadata and writing the commit block. Therefore, the order guarantee of W(M) ⁇ W(C) is possible using the epoch ID and the stream ID because two writes belong to the same stream because they are created in the same thread. However, the order guarantee for W(D) ⁇ W(C) is different.
  • W(D) is created by the application thread and W(C) is created by the journaling thread. Since these two writes are created by different threads, they have different stream IDs. Since the streams that generate each write request are different, there is a problem that there is no way to force the write order between the two.
  • the dirty page write request (hereinafter W(D)) generated by the application thread is set as a dual stream write that belongs to the stream of the application thread and also belongs to the stream of the journaling thread.
  • Dual stream writing has two stream IDs (hereinafter, first stream ID and second stream ID) and two epoch IDs (hereinafter, first epoch ID and second epoch ID).
  • first stream ID and second stream ID two stream IDs
  • first epoch ID and second epoch ID two epoch IDs
  • the stream ID of the application thread is assigned as the first stream ID
  • the epoch counter value of the application thread is given as the first epoch ID.
  • the file system assigns the stream ID of the currently running journal thread as the second stream ID to the dirty page, and assigns the epoch counter value of the journal thread as the second epoch ID.
  • the file system may specify order information in the application thread stream that created W(D) through the first stream ID and first epoch ID of W(D).
  • the file system provides order information in the journaling thread stream of W(D) ( ⁇ W(D), W(M) ⁇ ⁇ ⁇ W(C) ⁇ ) can be specified.
  • the first stream ID, the second stream ID, the first epoch ID, and the second epoch ID of writing may be specified in a part of the command structure transferred to the storage.
  • 3 shows an example in which the application thread T1 calls fsync() on file A in the EXT4 sequential journaling mode. 3 shows the first and second stream IDs and the first epoch ID and the second epoch ID included in the write command arriving at the storage in chronological order.
  • the application thread (T1) calls fsync()
  • the application thread constructs and dispatches a dirty page write (W(D)).
  • W(D) dirty page write
  • the file system assigns the process ID '2062' of the application thread to the first stream ID of W(D) and the epoch counter value '51' of the application thread to the first epoch ID.
  • journaling thread configures the journal metadata block (W(M)) to write.
  • Journal metadata blocks are configured as barrier-write because they must be written to disk before journal commit blocks to be created later.
  • the file system assigns the stream ID '1995' of the journal thread and the epoch counter value '10' to W(M) as the first stream ID and the first epoch ID, respectively. Since W(M) is a single stream write, the 2nd stream ID and 2nd epoch ID are not given, so the value is 0.
  • the journaling thread configures and dispatches the journal commit block (W(C)) as writes. Since the epoch counter value of the journaling thread is increased by '1' by W(M), the first epoch ID of W(C) is '11', which is '1' greater than W(M).
  • the order constraint ⁇ W(M) ⁇ ⁇ ⁇ W(C) ⁇ can be guaranteed with the first stream ID and first epoch ID of each write.
  • ⁇ W(D), W(M) ⁇ ⁇ ⁇ W(C) ⁇ The order restrictions are the ID of the second stream of W(D), the ID of the second epoch, and the ID of the first stream of W(M), W(C). , order can be guaranteed through the first epoch ID. Since the second epoch ID of W(D) is always given the same value as the first epoch ID of W(M), there is no order restriction between W(D) and W(M).
  • journal commit occurs due to an application thread's fsync() call in a situation in which changes to multiple files are configured in compound transactions
  • the write order can be guaranteed by double-stream writing.
  • FIG. 4 is an example in which the first thread (T1) and the second thread (T2) call fsync() on file A and file B, respectively, when the metadata changes of file A and file B are configured in the same transaction.
  • FIG. 4 assumes that the first thread T1 calls fsync( ) on the file A before the second thread T2.
  • the dirty page write request (A1) of the file A generated by the first thread is dispatched as a double stream write.
  • the first thread wakes up the journal thread.
  • the journaling thread configures and dispatches the dirty page of the file included in the compound transaction as a write request before writing to the journal transaction.
  • file B's metadata is included in the transaction, the JBD thread consists of a write request to file B's dirty page (B1).
  • File B's dirty page write request (B1) is a single write belonging to the journal thread stream, not a dual stream write because it is generated by the journal thread.
  • the journal thread dispatches the corresponding write request and then configures the journal transaction as a write request and dispatches it.
  • the second thread calling fsync() on file B does not generate a write request because the dirty page (B1) of file B has already been configured and dispatched as a write request by the journal thread.
  • All dirty page write requests for files included in the compound transaction are single writes belonging to the stream of the journal thread. Only dirty page write requests generated by the calling thread consist of a journal thread and an order-constrained dual-stream write.
  • more than one dual stream write order constraint can occur at the same time.
  • two threads call fsync() at the same time.
  • fsync() When fsync() is called, the modified file (D), the modified metadata (M), and the journal commit block (C) should be saved in order.
  • writes generated by the first thread will be referred to as W(D1), W(M), and W(C).
  • the context is switched to the second thread T2.
  • the JBD thread is woken up.
  • the awakened JBD thread belongs to two streams, the second thread T2 and the JBD thread.
  • the JBD thread executes the modified metadata and write commands for the commit block in order.
  • an order guarantee condition of ⁇ W(D2), W(M) ⁇ ⁇ W(C) is created.
  • W(D1) generated by the first thread becomes a write independent of them, and can be processed after W(C) is processed.
  • the order guarantee condition is not satisfied.
  • the most primitive way to solve this is the introduction of 'multiple' writes.
  • the size of the comment structure delivered to the storage is limited, so the number of streams that can be recorded in the limited area is also limited.
  • the command structure of the NVMe standard has 16 bytes of free space that is not currently used. This free space can be used to store the stream ID and epoch ID.
  • 5 is an example of the above. 5 illustrates a situation in which multiple writes occur because the first thread T1 and the second thread T2 simultaneously call fsync().
  • the first thread generates and dispatches a dirty page write request W(D1).
  • the file system configures W(D1) as a dual stream write belonging to both T1 (process ID '2062') and journaling thread (process ID '1995'). Context switching occurs and the second thread configures a dirty page for file B as a write request (W(D2)) and dispatches it.
  • W(D2) configures W(D2) as a dual stream write belonging to both T2 (process ID '2063') and journaling thread (process ID '1995').
  • journaling thread T2 wakes up the journaling thread, and the journaling thread configures the journal metadata block (W(M)) and the journal commit block (W(C)) for writing and dispatches them.
  • W(M) and W(C) generated by the journaling thread belong only to the journaling thread stream. ⁇ W(D1), W(D2), W(M) ⁇ ⁇ ⁇ W(C) ⁇ order can be guaranteed.
  • dual stream write or double write means a case in which two thread IDs are included in one write request
  • single stream write or single write means a case in which only one thread ID is included in one write request. can do.
  • the storage device determines the execution order between the received first write command 701 and the second write command 702, and according to the determined execution order, the first write command and the second write command 2
  • a write method including a step of executing a write command may be provided.
  • the first write command includes eleventh stream identification information 711 having ⁇ first stream ID, first epoch ID ⁇ .
  • the storage device converts the execution order to the first epoch ID and the The value of the second epoch ID is determined according to a rule that does not use the result of comparing each other.
  • the storage device may change the execution order to the first epoch ID and the third epoch ID.
  • the value of the epoch ID may be determined according to a rule for comparing each other.
  • the first write command may further include the twenty-fourth stream identification information 724 having ⁇ second stream ID, fourth epoch ID ⁇ .
  • the storage device if the 15th stream identification information 715 having ⁇ first stream ID, 5th epoch ID ⁇ is included in the second write command, the fifth epoch ID is higher than the first epoch ID. If the priority is high, the first write command may be executed later than the second write command.
  • the first write command may further include the twenty-fourth stream identification information 724 having ⁇ second stream ID, fourth epoch ID ⁇ .
  • the storage device if the 15th stream identification information 715 having ⁇ first stream ID, 5th epoch ID ⁇ is included in the second write command, the fifth epoch ID is higher than the first epoch ID. If the priority is low, the first write command may be executed before the second write command.
  • the 11th stream identification information and the second stream identification information are The first write command and the second write command may be generated by different threads generated by a host that has transmitted the second write command to the storage device.
  • the first epoch ID and the second epoch ID are the first write command and different variables used by different threads created by a host that has transmitted the second write command to the storage device.
  • the writing method may include: generating a first thread having the first stream ID and a second thread having the second stream ID; generating, by the first thread, a first write request having the first stream ID and the first epoch ID and transmitting the first write request to the block layer of the host; generating, by the second thread, a second write request having the second stream ID and the second epoch ID and transmitting the second write request to the block layer of the host; and generating, by the block layer, the first write command or the second write command based on the first write request and the second write request, and transmitting the first write command or the second write command to the storage device.
  • the host that transmits the first write command to the storage device and the storage device may be connected to each other through a plurality of transmission channels.
  • the first write command and the second write command may be transmitted through different transport channels among the plurality of transport channels, or may be transmitted through the same single transport channel.
  • the host that transmits the first write command to the storage device and the storage device may be connected to each other through a plurality of transmission channels.
  • all write commands having a specific ⁇ stream ID, epoch ID ⁇ may be transmitted through only one of the plurality of transport channels.
  • the host that transmits the write command to the storage device and the storage device may be connected to each other through a plurality of transmission channels.
  • the storage device receives a sixth write command 706 of ⁇ first stream ID, 7th epoch ID ⁇ through a specific transmission channel
  • the storage device sends the sixth write command 706
  • a write command (703, 704, or 705) having ⁇ 1st stream ID, 6th epoch ID ⁇ is executed through another transmission channel between the received first time point and the second time point, which is a time before the predetermined timeout time. It may be configured to execute the sixth write command only when not received.
  • the sixth epoch ID may have a higher writing priority than the seventh epoch ID.
  • the host that transmits the write command to the storage device and the storage device may be connected to each other through a plurality of transmission channels.
  • the storage device may include a timeout control unit for executing a time count using a timer.
  • the time count of the timer is reset to a predetermined value, driving a timer; and when the storage device receives a sixth write command 706 having ⁇ 1st stream ID, 7th epoch ID ⁇ through the second transmission channel 32, it is determined that the time count has reached the reference value. and executing the sixth write command only when it is confirmed.
  • the storage device when receiving another write command having ⁇ first stream ID, 6th epoch ID ⁇ through the first transmission channel 31 after the step of driving the timer, the storage device counts the time of the timer Reset to the predetermined value may be configured to restart the timer.
  • the storage device determines an execution order between the received first write command and the second write command, and executes the first write command and the second write command according to the determined execution order.
  • the execution order is determined without using a result of comparing the first epoch ID with the second epoch ID may be made to do.
  • the execution order may be determined using a result of comparing the first epoch ID with the second epoch ID.
  • the first write command further includes third stream identification information having ⁇ second stream ID, third epoch ID ⁇ , and when the first stream ID and the second stream ID are different from each other, the An execution order between the first write command and the second write command may be dependent on a priority between the third epoch ID and the second epoch ID.
  • the executing may include determining an execution order between the first write command, the second write command, and the third write command, and the first write command, the second write command, and the third write command are executed according to an execution order, wherein the third write command is a fourth stream having ⁇ first stream ID, fourth epoch ID ⁇ Including identification information, when the first stream ID and the second stream ID are different from each other, the execution order between the first write command and the third write command is the fourth epoch ID and the first epoch ID It may be characterized in that it is dependent on the priority between the two.
  • the first stream identification information is a first stream ID that is executed by a host that has transmitted the first write command and the second write command to the storage device. It may be generated by one thread, and the second stream identification information may be generated by a second thread executed in the host.
  • the first epoch ID is generated by the first epoch counter referenced by the first thread
  • the second epoch ID is the second epoch ID. It may be generated by the second epoch counter referenced by 2 threads.
  • the writing method may include, before the executing step, executing, by a host that has transmitted the first write command and the second write command to the storage device, a first thread and a second thread;
  • the first thread generates a first write request having the first stream ID and the first epoch ID and transmits it to the block layer of the host, and the second thread generates the second stream ID and the second epoch ID generating a second write request with and the block layer generates the first write command based on the first write request and transmits it to the storage device, and generates and transmits the second write command based on the second write request to the storage device
  • It may further include the step of
  • the host transmitting the first write command to the storage device and the storage device are connected through a plurality of transport channels, and all write commands having a specific ⁇ stream ID, epoch ID ⁇ are performed among the plurality of transport channels. It may be characterized in that it is transmitted through only one transmission channel.
  • a host that transmits a write command to the storage device and the storage device are connected through a plurality of transmission channels, and the storage device includes a timeout controller using a timer, and the storage device performs the first transmission driving the timer by resetting a time count of the timer to a predetermined value when receiving a third write command having ⁇ first stream ID, sixth epoch ID ⁇ through a channel;
  • the storage device receives the fourth write command having ⁇ first stream ID, 7th epoch ID ⁇ through the second transport channel, it is confirmed that the time count reaches a predetermined reference value only 4 may include executing a write command.
  • the storage device when receiving another write command having ⁇ first stream ID, 6th epoch ID ⁇ through the first transmission channel after the step of driving the timer, the storage device sets the timer time count to the predetermined It may be configured to restart the timer by resetting it to a value.
  • the host transmitting the write command to the storage device and the storage device are connected through a plurality of transport channels, and the storage device has ⁇ first stream ID, 7th epoch ID ⁇ through the first transport channel.
  • the storage device transmits ⁇ first time through the second transmission channel between the first time point at which the fourth write command is received and a second time point that is before a predetermined timeout time.
  • the third write command is executed only when a third write command having a stream ID and 6th epoch ID is not received, and the sixth epoch ID is a value having a higher write priority than the 7th epoch ID.
  • the last write command among the set of write commands having the ⁇ first stream ID, first epoch ID ⁇ may be a barrier command.
  • a controller determines an execution order between the first write command and the second write command received by the storage device, and executes the first write command and the second write command according to the determined execution order, , the first write command includes first stream identification information having ⁇ first stream ID, first epoch ID ⁇ , and the second write command includes second stream ID information having ⁇ second stream ID, second epoch ID ⁇ and stream identification information, and when the first stream ID and the second stream ID are different from each other, the execution order is determined without using a result of comparing the first epoch ID and the second epoch ID. may have been
  • the execution order may be determined using a result of comparing the first epoch ID with the second epoch ID.
  • the first write command further includes third stream identification information having ⁇ second stream ID, third epoch ID ⁇ , and when the first stream ID and the second stream ID are different from each other, the An execution order between the first write command and the second write command may be dependent on a priority between the third epoch ID and the second epoch ID.
  • the first epoch ID is a first thread executed by the host that has transmitted the first write command and the second write command to the storage device. may be generated by a first epoch counter referenced by , and the second epoch ID may be generated by a second epoch counter referenced by a second thread executing in the host.
  • a host that transmits a write command to the storage device and the storage device are connected through a plurality of transmission channels, and the storage device includes a timeout controller using a timer, and the storage device performs the first transmission and when receiving a third write command having ⁇ first stream ID, sixth epoch ID ⁇ through a channel, resetting a time count of the timer to a predetermined value to drive the timer, and
  • the storage device receives the fourth write command having ⁇ 1st stream ID, 7th epoch ID ⁇ through the second transmission channel, the fourth write command is confirmed only when it is confirmed that the time count has reached a predetermined reference value. It may be configured to execute a step of executing a write command.
  • a controller determines the execution order among the received first write command, the second write command, and the third write command, and according to the determined execution order, the first write command, the second write command, and the and executing a third write command, wherein the first write command includes first stream identification information having ⁇ first stream ID, first epoch ID ⁇ and ⁇ second stream ID, third epoch ID ⁇ , wherein the second write command includes second stream identification information having ⁇ second stream ID, second epoch ID ⁇ , and the third write command includes ⁇ first stream ID , fourth epoch ID ⁇ , wherein the execution order between the third write command and the second write command includes a priority between the third epoch ID and the second epoch ID, and the It may be determined by the priority between the first epoch ID and the fourth epoch ID.
  • the priority of the first epoch ID and the third epoch ID may be the same.
  • FIG. 2 is a diagram illustrating input/output arriving at a storage device over time when the stream ID allocation algorithm and the epoch ID allocation algorithm provided according to an aspect of the present invention are applied.
  • FIG. 3 is a diagram illustrating input/output arriving at a storage device over time when an application thread calls fsync() when the stream ID and epoch ID allocation algorithm of dual stream write provided according to an aspect of the present invention is applied. .
  • FIG. 4 is a graph showing I/O arriving at a storage device over time when modifications of several files are included in a compound transaction when the dual stream write command provided by the present invention is applied.
  • FIG. 5 is a diagram illustrating input/output commands arriving to a storage device when multiple application threads simultaneously call fsync() when the stream ID and epoch ID allocation algorithm of dual stream write provided according to an aspect of the present invention is applied. is shown accordingly.
  • FIG. 6 is a diagram illustrating a method of executing a write command received from a host in a storage device provided according to an embodiment of the present invention.
  • FIG. 7 and 8 show examples in which stream identification information having ⁇ first stream ID, third epoch ID ⁇ is included in the second write command.
  • FIG. 9 is a diagram for describing a writing method when a write command transmitted through a transport channel includes two stream identification information according to an embodiment of the present invention.
  • FIG. 10 is for explaining a writing method when a write command transmitted through a transport channel includes two stream identification information according to another embodiment of the present invention.
  • FIG. 11 is a diagram for explaining a writing method when a write command transmitted through a transport channel includes two stream identification information according to another embodiment of the present invention.
  • FIG. 12 is a diagram for describing a writing method when a write command transmitted through a transport channel includes two stream identification information according to another embodiment of the present invention.
  • FIG 13 illustrates an example in which write commands belonging to different streams are transmitted through one transport channel according to an embodiment of the present invention.
  • FIG. 14 illustrates a method of transmitting a plurality of write commands having the same epoch ID in one stream according to an embodiment of the present invention.
  • FIG. 15 shows a comparative example compared to the method shown in FIG. 14 .
  • 16 is a diagram for describing a method of determining an order of executing write commands belonging to one stream, according to an embodiment of the present invention.
  • FIG. 17 is a diagram illustrating a situation that may occur in an embodiment of the present invention described in FIG. 16 .
  • FIG. 18 illustrates another situation that may occur in the embodiment of the present invention described in FIG. 16 .
  • FIG. 19 is a block diagram illustrating a configuration of a computing device including a host and a storage device provided according to an embodiment of the present invention.
  • 20 and 21 are diagrams illustrating a process of generating a write command by a host provided according to an embodiment of the present invention.
  • FIG. 6 is a diagram illustrating a method of executing a write command received from a host in a storage device provided according to an embodiment of the present invention.
  • the storage device 20 may be, for example, a RAID storage device.
  • the storage device 20 may include a RAID controller and a plurality of disks.
  • the raid controller may be simply referred to as a controller.
  • the plurality of disks may be referred to as non-volatile memory.
  • the storage device 20 may further include a volatile memory.
  • the volatile memory and the non-volatile memory may be collectively referred to as a memory.
  • the host 10 may be a device that transmits various commands and data including a write command to the storage device 20 .
  • the host 10 and the storage device 20 may be connected by a plurality of transport channels including a first transport channel 31 and a second transport channel 32 .
  • the host 10 and the storage device 20 may be functional modules included in one computing device. In another embodiment, the host 10 and the storage device 20 may be provided as separate computing devices each having an independent power source.
  • the storage device 10 determines an execution order between the first write command 701 and the second write command 702 received from the host 10, and according to the determined execution order, the first write command ( 701) and the second write command 702 may be executed.
  • the host 10 may create and manage different threads. Each thread can create one stream.
  • a 'stream' may mean a set of instructions generated by a corresponding thread according to the passage of time.
  • the different streams may be generated by different threads managed by the host 10 . Different streams can be distinguished by a parameter called a stream ID.
  • the write command may be a single stream write command or a dual stream write command.
  • Two spaces in which two pieces of stream identification information are to be stored may be provided in the write command.
  • a first space of the two spaces may include stream identification information regarding a specific stream
  • a second space of the two spaces may include invalid information or null information.
  • stream identification information on a specific stream is included in a first space of the two spaces, and stream identification information about a stream different from the specific stream in a second space of the two spaces may contain
  • the first write command 701 may include eleventh stream identification information 711 having ⁇ first stream ID, first epoch ID ⁇ .
  • the stream ID and the epoch ID included in ' ⁇ ⁇ ' are paired information that are combined with each other.
  • 'k-th epoch ID' may be expressed as 'E-ID[#k]'.
  • One stream identification information may be information used to determine the execution order of one command received by the storage device 20 .
  • One write command may include one or two or more of the above-described stream identification information.
  • the write command may mean a command transmitted from the host 10 to the storage device 20 through the transport channel.
  • One write command may be associated with only one stream, or may be associated with two streams.
  • a write command related to only one stream is a single stream write command, and a write command related to two streams is a dual stream write command.
  • one write command may include one stream identification information having a first stream ID.
  • Such a write command may be referred to as a single stream write command or a single stream write command.
  • one write command may include one stream identification information having a first stream ID and one stream identification information having a second stream ID, respectively.
  • Such a write command may be referred to as a dual stream write command or a dual stream write command.
  • Each stream identification information belonging to one stream may include one epoch ID.
  • the execution order may be arbitrarily determined by the storage device 20 .
  • a priority may exist between different epoch IDs.
  • the storage device 20 executes a first write command having ⁇ first stream ID, first epoch ID ⁇ and a second write command having ⁇ first stream ID, second epoch ID ⁇
  • the storage device Reference numeral 20 may determine an execution order between the first write command and the second write command based on the priority between the first epoch ID and the second epoch ID.
  • priority may not exist between epoch IDs belonging to different streams.
  • the storage device 20 executes a first write command having ⁇ first stream ID, first epoch ID ⁇ and a second write command having ⁇ second stream ID, second epoch ID ⁇
  • the storage device Reference numeral 20 arbitrarily determines the execution order between the first write command and the second write command.
  • the storage device includes, in the first single stream write command, an execution order between a first single stream write command related only to a first stream and a second single stream write command related only to the first stream The determination may be made based on a result of comparing the epoch ID with the epoch ID included in the second single stream write command.
  • the storage device may arbitrarily determine the execution order between the first single stream write command associated only with the first stream and the second single stream write command associated with only the second stream. That is, there is no restriction on the execution order between the first single stream write command and the second single stream write command.
  • the storage device the execution order between the first single stream write command associated only with the first stream and the second dual stream write command associated with both the first stream and the second stream, The determination may be made based on a result of comparing the epoch ID associated with the first stream included in the one-single stream write command with the epoch ID associated with the first stream included in the second dual stream write command. In this case, the storage device sets the execution order between the third single stream write command related only to the second stream and the second dual stream write command related to both the first stream and the second stream to the third single stream write command.
  • It may be determined based on a result of comparing the included epoch ID associated with the second stream with the epoch ID associated with the second stream included in the second dual stream write command. By doing so, the priority of the execution order may eventually occur between the write command related to the first stream and the write command related to the second stream.
  • the eleventh stream identification information 711 having ⁇ first stream ID, first epoch ID ⁇ is included in the first write command 701
  • ⁇ second stream ID ⁇ is included in the second write command 702
  • second epoch ID ⁇ shows an example in which the 22nd stream identification information 722 is included.
  • the storage device 20 performs the first write command
  • the execution priority between 701 and the second write command 702 may be determined according to a rule not to use a result of comparing the values of the first epoch ID and the second epoch ID.
  • the second stream ID is different from the first stream ID. 6 illustrates an example in which the first stream ID (S-ID) is 1 and the second stream ID (S-ID) is 2.
  • the 22nd stream identification information 722 having ⁇ second stream ID, second epoch ID ⁇ is included in the second write command 702, and the first epoch ID (E-ID[#1]) is included. Even if has a value of '3' and the second epoch ID (E-ID[#2]) has a value different from '3', the first write command 701 and the second write command The execution order between 702 is not determined by the value of the first epoch ID (E-ID[#1]) and the value of the second epoch ID (E-ID[#2]).
  • the storage device ( 20) is configured to determine the execution priority between the first write command 701 and the second write command 702 according to a rule comparing the values of the first epoch ID and the third epoch ID with each other.
  • the execution priority between the first write command 701 and the second write command 702 is may be determined by the epoch ID. This will be described with reference to FIGS. 7 and 8 .
  • FIG. 7 and 8 show examples in which stream identification information 713 having ⁇ first stream ID, third epoch ID ⁇ is included in the second write command 702, respectively.
  • the thirteenth stream identification information 713 having ⁇ first stream ID, third epoch ID ⁇ is included in the second write command 702, and the first epoch ID (E-ID[#1]) has a value of '3' and the third epoch ID (E-ID[#3]) is equal to '3', the execution priority between the first write command 701 and the second write command 702
  • the ranking can be freely determined by the storage device 20 .
  • the thirteenth stream identification information 713 having ⁇ first stream ID, third epoch ID ⁇ is included in the second write command 702, and the first epoch ID (E-ID[#1]) is included. ) has a value of '3' and the third epoch ID (E-ID[#3]) has a value of '5', the first write command 701 and the second write command 702 ) may be determined according to the priority between the values of the first epoch ID and the third epoch ID.
  • 6 and 7 show examples in which the first write command 701 and the second write command 702 are transmitted through different transmission channels.
  • FIG 8 shows an example in which the first write command 701 and the second write command 702 are transmitted through the same transmission channel.
  • FIG. 9 is a diagram for describing a writing method when one write command transmitted through a transport channel includes two stream identification information according to an embodiment of the present invention.
  • the storage device 10 determines an execution priority between the first write command 701 and the second write command 702 received from the host 10, and according to the determined execution priority, the first write A command 701 and the second write command 702 are executed.
  • the first write command 701 may include eleventh stream identification information 711 having ⁇ first stream ID, first epoch ID ⁇ .
  • the first write command 701 may further include 24th stream identification information 724 having ⁇ second stream ID, fourth epoch ID ⁇ .
  • the ⁇ first stream ID, first epoch ID ⁇ and the ⁇ second stream ID, fourth epoch ID ⁇ may be recorded in a part of the NVMe command structure. That is, in an embodiment of the present invention, two stream identification information included in one write command may be recorded in a part of the NVMe command structure.
  • a write command including two stream identification information belonging to two different streams may be referred to as a dual stream write command.
  • the 15th stream identification information 715 having ⁇ first stream ID, fifth epoch ID ⁇ is included in the second write command 702
  • the fifth epoch ID (E) -ID[#5]) has a higher priority than the first epoch ID (E-ID[#1])
  • the first write command 701 is executed later than the second write command 702 there may be
  • the fifth epoch ID E-ID[#5] has a value of '1' and the first epoch ID E-ID[#1] has a value of '2'.
  • '1' has a higher priority than '2'.
  • the first write command 701 may be executed later than the second write command 702 .
  • FIG. 10 is for explaining a writing method when a write command transmitted through a transport channel includes two stream identification information according to another embodiment of the present invention.
  • FIG. 10 shows an example in which the first write command 701 and the second write command 702 are transmitted through the same first transmission channel 31 .
  • FIG. 9 shows an example in which the first write command 701 and the second write command 702 are transmitted through different transmission channels 31 and 32 . Except for this point, the embodiment shown in Fig. 10 is the same as the embodiment shown in Fig. 9 .
  • FIG. 11 is a diagram for explaining a writing method when a write command transmitted through a transport channel includes two stream identification information according to another embodiment of the present invention.
  • FIG. 11 is the same as the embodiment shown in FIG. 9 except for some differences. Hereinafter, only some of the above differences will be described.
  • the storage device 20 may confirm that the fifteenth stream identification information 715 having ⁇ first stream ID, fifth epoch ID ⁇ is included in the second write command 702 . At this time, if the fifth epoch ID has a lower priority than the first epoch ID, the storage device 20 executes the first write command 701 before the second write command 702. can
  • FIG. 12 is a diagram for describing a writing method when a write command transmitted through a transport channel includes two stream identification information according to another embodiment of the present invention.
  • FIG. 12 shows an example in which the first write command 701 and the second write command 702 are transmitted through the same first transmission channel 31 .
  • FIG. 11 shows an example in which the first write command 701 and the second write command 702 are transmitted through different transmission channels 31 and 32 .
  • the embodiment shown in Fig. 12 is the same as the embodiment shown in Fig. 11 .
  • FIG 13 illustrates an example in which write commands belonging to different streams are transmitted through one transport channel according to an embodiment of the present invention.
  • FIG. 13 shows an example in which the first write command 701 and the second write command 702 are transmitted through the same first transmission channel 31 .
  • FIG. 6 shows an example in which the first write command 701 and the second write command 702 are transmitted through different transmission channels 31 and 32 . Except for this point, the embodiment shown in Fig. 13 is the same as the embodiment shown in Fig. 6 .
  • FIG. 14 illustrates a method of transmitting a plurality of single stream write commands having the same stream ID and the same epoch ID according to an embodiment of the present invention.
  • the embodiment shown in FIG. 14 may be used when the host 10 that transmits write commands to the storage device 20 and the storage device 20 are connected to each other through a plurality of transmission channels 31 and 32.
  • the storage device 20 may provide a plurality of queues corresponding to the number of the transport channels. Commands (write commands) received through a specific transport channel may be stored in a specific queue corresponding thereto, and then processed by the storage device 20 .
  • the storage device 20 generates a first queue composed of commands received through the first transmission channel 31 and a second queue composed of commands received through the second transmission channel 32.
  • all write commands having a specific ⁇ stream ID, epoch ID ⁇ may be transmitted through only one of the plurality of transport channels. Such a concept may be referred to as queue-pinning in the present invention.
  • FIG. 15 shows a comparative example compared to the method shown in FIG. 14 .
  • write commands having a specific ⁇ stream ID, epoch ID ⁇ are distributed and transmitted on two or more transport channels among the plurality of transport channels.
  • some write commands 704 among the write commands 703 to 705 having the epoch ID E-ID[#6] among the write commands having the stream ID S-ID of 1 are performed on the first transmission channel 31 ), and other write commands 703 and 705 are transmitted through the second transmission channel 32 .
  • the fourth write command 704 having the epoch ID E-ID[#6] arrives later in the storage device 20 than the sixth write command 706 having the epoch ID E-ID[#7]. is in one state
  • the storage device 20 has an epoch ID E-ID[#6] in the second queue consisting of commands received through the second transmission channel 32. It can be confirmed that there is a sixth write command 706 having the epoch ID E-ID[#7] following the fifth write command 705 .
  • the storage device 20 may determine that the fifth write command 705 is the last command among the write commands having the epoch ID E-ID[#6].
  • the storage device 20 sends a sixth write command 706 having an epoch ID E-ID[#7], a fourth write command 706 that arrives later in the storage device 20 than the sixth write command 706 . It can be executed before the write command 704 . So an error occurs. This is because the epoch ID E-ID[#6] of the fourth write command 704 has a higher priority than the epoch ID E-ID[#7] of the sixth write command 706 .
  • the storage device 20 stores the first write command having the epoch ID E-ID[#7], the sixth write command.
  • Checking the command 706 may confirm that the last command with the epoch ID E-ID[#6] has already been delivered. This is because the write commands with the epoch ID E-ID[#6] were already being transmitted through the second transmission channel 32, so that another write command with the epoch ID E-ID[#6] is transmitted through the other transmission channel ( 31) because the storage device 20 can know that it will not be transmitted. Accordingly, even if the storage device 20 executes the sixth write command 706 immediately after confirming the sixth write command 706, an error as shown in FIG. 15 does not occur.
  • the 'write command' presented in the above description with reference to FIGS. 14 and 15 may mean the above-described 'single stream write command'.
  • the last of the set of write commands is generated
  • the write command may be a barrier-command having the epoch ID. That is, when receiving a barrier-command having a specific stream ID and a specific epoch ID, the storage device 20 may determine that transmission of a set of write commands having a specific stream ID and a specific epoch ID is terminated.
  • 16 is a diagram for describing a method of determining an order of executing write commands belonging to one stream, according to an embodiment of the present invention.
  • the embodiment shown in FIG. 16 may be usefully used when the host 10 that transmits a write command to the storage device 20 and the storage device 20 are connected through a plurality of transmission channels.
  • the storage device 20 sends a first (first) write command ( When the first write command 706 is received, it can be determined whether to execute the first write command 706 immediately or after waiting a predetermined time.
  • the first write command having ⁇ first stream ID, 7th epoch ID ⁇ is presented as a sixth write command 706 .
  • the storage device 20 stores a different transmission channel between a first time point at which the sixth write command 706 is received and a second time point that is before a predetermined timeout time.
  • the sixth write command may be executed only when the write command 703 , 704 , or 705 having ⁇ first stream ID, sixth epoch ID ⁇ is not received through .
  • FIG. 17 is a diagram illustrating a situation that may occur in an embodiment of the present invention described in FIG. 16 .
  • FIG. 18 illustrates another situation that may occur in the embodiment of the present invention described in FIG. 16 .
  • the horizontal axis represents time, and as it moves to the right, it represents the first time.
  • the storage device 20 stores a second time point T2 that is a time before a predetermined timeout time DT from a first time point T1 at which the sixth write command 706 is received. ), a write command 704 having ⁇ 1st stream ID, 6th epoch ID ⁇ is received through another transmission channel 31 . Therefore, even if the storage device 20 confirms the sixth write command 706 , it immediately waits without executing the sixth write command 706 .
  • the fourth write command 704 At the third time point T3 when the write command 704 is received, the timer is reset and the timer is driven. In addition, the timer timeout is performed at a fourth time point T4 when the predetermined timeout time DT has elapsed. At the first time point T1, since the timeout has not yet been performed, the sixth write command 706 is not executed at the first time point T1. And only when a timeout occurs at the fourth time point T4, the sixth write command 706 can be executed.
  • the storage device 20 stores a second time point T2 that is a time before a predetermined timeout time DT from a first time point T1 at which the sixth write command 706 is received. ), no write command with ⁇ 1st stream ID, 6th epoch ID ⁇ is received. Accordingly, the storage device 20 may immediately execute the sixth write command 706 after confirming that a timeout has occurred at a first time point T1 at which the sixth write command 706 is confirmed.
  • the storage device 20 transmits a fifth write command 705 having ⁇ first stream ID, sixth epoch ID ⁇ at a third time point T3 before the second time point T2. ) was received. If the storage device 20 cannot know that the fifth write command 705 is the last write command having the sixth epoch ID, the third time point T3 when the fifth write command 705 is received. ) to reset the timer and start the timer. The timeout is performed at a fourth time point T4 when the predetermined timeout time DT has elapsed. A timeout occurred at the first time point T1. Accordingly, at the fourth time point T4 , the storage device 20 may execute the sixth write command 706 .
  • the concept of the present invention described with reference to FIGS. 16 to 18 may be referred to as a cue-pinning timeout.
  • the cue-pinning timeout is based on the concept of the cue-pinning described in FIG. 14 .
  • the time interval between two write commands adjacent to each other on the time axis is set in advance. It uses the expectation that it will be less than the determined timeout time DT.
  • the storage device 20 may include a timer.
  • the storage device 20 may perform the following steps.
  • step S510 when receiving a write command having ⁇ first stream ID, 6th epoch ID ⁇ through the first transmission channel 31, the storage device 20 resets the timer to drive the timer.
  • step S520 when receiving the sixth write command 706 having ⁇ first stream ID, 7th epoch ID ⁇ through the second transmission channel 32, the storage device 20 receives the timer It is possible to execute the sixth write command only when it is confirmed that the time-out of .
  • the storage device 20 sets the timer The timer can be re-driven by resetting again.
  • the seventh epoch ID has a lower priority than the sixth epoch ID.
  • the storage device 20 receives a specific write command with ⁇ specific stream ID, specific epoch ID ⁇ and a series of write commands with the ⁇ specific stream ID, specific epoch ID ⁇ It can be usefully used when it is unknown whether it is the last write command among them.
  • FIG. 19 is a block diagram illustrating a configuration of a computing device including a host and a storage device provided according to an embodiment of the present invention.
  • the computing device 1 may include a host 10 and a storage device 20 .
  • the storage device 20 may include a controller 210 and one or a plurality of disks 221 to 224 .
  • the controller 210 may include the timer 211 .
  • the storage device 20 may be a RAID storage device.
  • the controller 210 may be a raid controller.
  • the host 10 and the storage device 20 may be connected to a plurality of transport channels (ex: 31 to 33).
  • 20 and 21 are diagrams illustrating a process of generating a write command by a host provided according to an embodiment of the present invention.
  • the host 10 may generate a first thread and a second thread.
  • the first stream identification information and the second stream identification information having different stream IDs may be generated by different threads generated by the host 10 .
  • the eleventh stream identification information 711 having the first stream ID is generated by the first thread generated by the host 10
  • the 24th stream identification information 724 having the second stream ID is generated by the host 10 . It may be created by the second thread created by (10).
  • the first epoch ID included in the 11th stream identification information 711 is generated by the first variable used by the first thread
  • the fourth epoch ID included in the 24th stream identification information 724 is It may be generated by a second variable used by the second thread.
  • the first variable and the second variable are different variables, and may be independently managed by the first thread and the second thread, respectively.
  • the first variable and the second variable may be referred to as a first epoch counter and a second epoch counter, respectively.
  • the first thread may transmit a first write request including stream identification information having a first stream ID to the block layer 11 .
  • the epoch ID included in each stream identification information is generated by the first thread using the first variable, and may be, for example, a first epoch ID.
  • the second thread may transmit a second write request including stream identification information having a second stream ID to the block layer 11 .
  • the epoch ID included in each stream identification information is generated by the second thread using the second variable, and may be, for example, a fourth epoch ID.
  • the block layer 11 generates eleventh stream identification information 711 having ⁇ first stream ID, first epoch ID ⁇ based on the first write request, and The first write command 701 including the eleventh stream identification information may be generated and transmitted to the storage device 20 .
  • the block layer 11 generates 24th stream identification information 724 having ⁇ second stream ID, 4th epoch ID ⁇ based on the second write request, and includes the 24th stream identification information.
  • a second write command 702 may be generated and transmitted to the storage device 20 .
  • each of the first write command 701 and the second write command 702 is a single stream write command.
  • the block layer 11 generates eleventh stream identification information having ⁇ first stream ID, first epoch ID ⁇ and ⁇
  • the first write command 701 including the 24th stream identification information having the second stream ID and the fourth epoch ID ⁇ may be generated and transmitted to the storage device 20 .
  • the first write command 701 is a dual stream write command.
  • a write command including only one stream identification information such as the second write command 702 of FIG. 20
  • a write command including two stream identification information belonging to two different streams such as the first write command 701 of FIG. 21
  • a dual stream write command may be referred to as a write command including two stream identification information belonging to two different streams.
  • the present invention was created with the support of the following research project.

Landscapes

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

Abstract

저장장치가, 수신된 제1쓰기명령과 제2쓰기명령 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령과 상기 제2쓰기명령을 실행하는 단계를 포함하는 쓰기 방법을 공개한다. 상기 제1쓰기명령은 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제1스트림 식별정보를 포함하고, 상기 제2쓰기명령은 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제2스트림 식별정보를 포함하며, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에는, 상기 실행순서는 상기 제1에포크 아이디와 상기 제2에포크 아이디를 서로 비교한 결과를 이용하지 않고 결정하도록 되어 있다.

Description

다중 명령어 큐 스토리지에서 순서 보장 단위를 정하는 방법 및 장치
본 발명은 컴퓨팅 기술에 관한 것으로서 호스트와 저장장치 간에 복수 개의 전송채널들이 존재하는 경우 상기 전송채널들을 통해 전송되는 명령어의 실행순서를 보장하는 기술에 관한 것이다.
종래기술에 따르면, 호스트에서 저장장치에게 쓰기명령들을 전송할 때에, 각 쓰기명령에 에포크 아이디라는 값을 포함시킬 수 있다. 저장장치는 각 쓰기명령에 포함된 에포크 아이디들 간의 우선순위에 따라 각 쓰기명령의 실행순서를 결정할 수 있다. 호스트에서 복수 개의 스레드를 생성하는 경우, 제1스레드에 의해 생성되는 제1그룹의 쓰기명령들과 제2스레드에 의해 생성되는 제2그룹의 쓰기명령들 간에는 우선순위가 존재하지 않는다. 그러나 호스트가 상기 제1그룹의 쓰기명령들과 상기 제2그룹의 쓰기명령들에 각각 포함된 에포크 아이디들을 단 한 개의 전역변수, 즉 한 개의 에포크 카운터만을 이용하여 결정하는 경우, 저장장치가 상기 제1그룹의 쓰기명령들과 상기 제2그룹의 쓰기명령들 간에 우선순위가 존재하지 않는 경우에도 불필요하게 실행 우선순위를 판단한다는 문제가 있다.
또한, 호스트와 저장장치 간에 복수 개의 명령어 전송채널들이 제공된 환경에서는, 쓰기명령들 간의 실행우선순위를 결정하는 과정에서 비효율이 발생할 수 있다는 문제가 있다.
본 발명은 상술한 문제를 해결하기 위하여 다중 명령어 큐 스토리지에서 순서 보장 단위를 정하는 기술을 제공하고자 한다.
<스트림(Stream)의 정의와 새로운 에포크 아이디(epoch id) 할당 알고리즘>
도 1은 스레드 2개가 서로 다른 파일에 대해 fdatasync()를 동시에 호출한 경우 시간에 따라 NVMe 디바이스에 도착하는 입출력 요청과 각 입출력 요청의 에포크 아이디를 표시한 것이다. 여기서 A1, A2는 파일 A의 쓰기명령을 나타내고, B1, B2는 파일 B의 쓰기명령을 나타낸다. 도 1에서, 스토리지가 수신한 5개의 쓰기명령들 중 좌측에서 첫 번째 명령(A1), 두 번째 명령(B1) 및 우측에서 두 번째 명령(A2)은 쓰기 순서를 보장해야 하는 쓰기명령을 나타내며, 우측에서 첫 번째 명령(A3) 및 우측에서 세 번째 명령(B2)은 배리어 쓰기(barrier write) 명령을 나타낸다.
상기 fdatasync()는 fsync()와 다르게, 파일의 크기가 변경되는 얼로케이팅(allocationg) 쓰기가 아닌 경우에는 저널링을 수행하지 않는다. 따라서 fdatasync()는 입력 인자로 전달받은 파일의 데이터 블록에 대한 쓰기요청을 디스패치하고, 한 스레드에서 fdatasync() 간의 순서를 보장하기 위해 마지막으로 디스패치되는 데이터 블록에 대한 쓰기요청에 배리어 플래그를 포함 시켜 배리어-쓰기(barrier-write)로 보낸다. 파일 시스템에서 동작하는 여러 스레드가 동일한 에포크 카운터를 공유하고, 각 스레드에서 생성하는 입출력 요청에 해당 에포크 카운터로 아이디를 부여하는 방식은 멀티 스레드 환경에서 두 가지 문제점이 있다.
첫 번째 문제점은, 서로 다른 프로세스 간 불필요한 쓰기 순서가 발생하는 것이다. 도 1에서, 제1스레드(T1)와 제2스레드(T2)는 서로 다른 파일에 대해 fdatasync()를 호출하였다. 제1파일(A)에 속한 데이터 블록(A1, A2, A3)과 제2파일(B)에 속한 데이터 블록(B1, B2) 사이의 영속성 쓰기 순서는 보장할 필요가 없다. 제1스레드(T1)과 제2 스레드(T2)가 동일한 에포크 카운터를 공유하기 때문에 도 1에서 B1, B2는 에포크 아이디 '0'을 부여받고 A2, A3은 에포크 아이디 '1'을 부여 받는다. 이로 인해 독립된 에포크에 속하는 데이터 블록(B1, B2), 데이터 블록(A2, A3)사이에 불필요한 쓰기 순서 제약이 발생한다.
두 번째 문제점은, 동일한 스레드 내에서 불필요한 쓰기 순서를 보장해야 한다는 것이다. 제1스레드(T1)이 생성하는 데이터 블록(A1, A2, A3)에 대한 쓰기요청들은 상호 간에 쓰기 순서가 변경되어도 된다. 하지만, 제1스레드(T1)와 제2스레드(T2)가 동일한 에포크 카운터를 공유하기 때문에 같은 에포크에 속한 쓰기명령어들이 서로 다른 에포크 값을 가지는 경우가 발생할 수 있다. 이 경우 동일한 에포크에 속한 쓰기명령들 간에 불필요한 쓰기 순서의 보장이 발생한다. 도 1에서 데이터 블록 A1, A2, A3의 쓰기요청은 본래 같은 에포크에 속해야 하지만 제2스레드가 호출한 fdatasync()로 인한 배리어 쓰기(B2)에 의해 에포크 카운터가 증가해 A1은 A2, A3와 다른 에포크 아이디 값을 가진다. 이로 인해 같은 에포크에 속하는 데이터 블록 A1, A2, 및 A3들에 대한 쓰기요청 사이에 불필요한 순서 보장이 발생한다.
상술한 문제들을 해결하기 위해 본 발명에서는, '스트림'을 정의한다. 스트림이란 블록 입출력 계층에서 생성되는 에포크들의 흐름이다. 동일한 스트림에 속하는 에포크들은 에포크가 생성되는 순서대로 쓰기 순서가 보장되어야 한다. 이에 비하여, 서로 다른 스트림에 속하는 에포크들 간에는 쓰기 순서를 보장할 필요가 없다.
동일한 스레드에서 생성된 에포크들은 같은 스트림에 속한다. 스토리지는 같은 스트림에 속한 에포크들에 있어서 에포크들 간의 쓰기 순서를 보장한다.
본 발명에서는, 모든 쓰기명령에 스트림 아이디를 부여한다. 해당 스트림 아이디는 쓰기명령을 스토리지에 전달할 때 함께 전달된다. 쓰기명령의 스트림 아이디는 블록 입출력 계층에서 부여된다.
각 스레드는 자신의 고유 스트림을 갖는다. 따라서, 해당 스레드가 생성하는 스트림 아이디에는 해당 스레드의 pid (프로세스 아이디)를 사용할 수 있다. 본 발명의 일 실시예에서, NVMe 커맨드 구조체의 일부분에 스트림 아이디를 명시할 수 있다. 그리고 각 스트림은 고유의 에포크 카운터를 갖는다.
본 발명의 일 실시예에서 스레드를 나타내는 태스크 구조체(task struct)에 에포크 카운터를 추가한다.
스레드 생성시 에포크 카운터는 0으로 초기화된다. 쓰기명령어가 생성될 때 해당 쓰기명령어의 에포크 아이디는 현재 커널에 존재하는 에포크 카운터 값으로 부여한다. 스레드가 배리어-쓰기가 생성될 때마다 에포크 카운터를 1만큼 증가시킨다. 배리어-쓰기의 에포크 아이디는 에포크 카운터를 1 만큼 증가시키기 전의 값으로 부여한다. 배리어-쓰기는 에포크의 마지막에 위치하는 쓰기요청이며 같은 에포크에 속하는 쓰기요청들과 동일한 에포크 아이디 값을 가진다.
배리어 쓰기 이후에 생성된 order-preserving 쓰기요청은 새로운 에포크에 속한다. 해당 쓰기요청은 이전 에포크의 배리어-쓰기요청 생성 시에 1 증가된 에포크 카운터 값을 에포크 아이디로 부여받는다. 연속된 에포크들은 연속된 에포크 아이디를 가진다.
도 2는 본 발명의 일 관점에 따라 제공되는 스트림 아이디 할당 알고리즘 및 에포크 아이디 할당 알고리즘을 적용했을 때에, 스토리지 디바이스에 도착하는 입출력을 시간에 따라 나타낸 것이다. 입출력 요청의 스트림 아이디와 에포크 아이디를 함께 표시하였다.
데이터 블록(A1, A2, A3)과 데이터 블록(B1, B2)에 대한 쓰기요청은 서로 다른 스트림 아이디를 가지므로, 데이터 블록(B1, B2)과 데이터 블록(A2, A3) 사이 불필요한 영속성 순서 제약이 사라진 것을 확인할 수 있다. 그리고 에포크 아이디 역시 제1스레드(T1) 및 제2스레드(T2)에서 독립적으로 할당이 되는 것을 확인할 수 있다.
<이중 스트림 쓰기>
일반적으로 서로 다른 스트림에 속한 쓰기들 간에는 순서를 보장해 줄 필요가 없다. 그러나 파일시스템의 설계특성으로 인하여, 두 개의 스트림 간에 순서를 보장해 줄 필요가 있을 경우에, 이를 지원하는 기술을 개발하였다. 이를 위하여 우리는 두 개의 스트림에 속한 쓰기들 간에 순서를 보장하는 방법을 개발하였다. 이를 이중 스트림 쓰기라 칭한다. 이중 스트림 쓰기는 두 개의 스트림 아이디와 두 개의 에포크 아이디를 갖는다. 즉, 이중 스트림 쓰기는 제1스트림에 대한 스트림 아이디와 에포크 아이디의 쌍인 {제1스트림 아이디, 제1에포크 아이디}, 그리고 제2스트림에 대한 스트림 아이디와 에포크 아이디 {제2스트림 아이디, 제2에포크 아이디}를 갖는다.
예컨대, 다음과 같은 상황을 가정할 수 있다. 첫째, 두 개의 스트림 S1, S2가 존재한다. 둘째, S1은 w11, w12, w13의 쓰기를 갖는다. 셋째, S2는 w21, w22, w23의 쓰기들로 구성되어 있다. 넷째, 여기서 각 스트림에 속한 쓰기들은 순서가 보장되어야 한다. 즉 S1에 대해서 w11 → w12, w12 → w13의 쓰기 순서가 보장되어야 하고, S2에 대해서도 동일하게 w21 → w22, w22 → w23의 쓰기순서가 보장되어야 한다. 다섯째, 이런 상황에서 w13 → w22의 쓰기 순서보장이 필요한 경우가 있다. 즉, 상기 제1스트림의 쓰기 w13와 상기 제2스트림의 쓰기 w22 간에 쓰기 순서가 보장되어야 한다. 즉, w13 쓰기가 완료된 이후에 w22 쓰기가 완료되어야 한다.
이렇게 서로 다른 두 개의 스트림에 속한 쓰기 명령어 간에 순서를 보장하기 위해 본 발명에서는 '이중 스트림 쓰기'라는 개념을 제안한다.
이중 스트림 쓰기는 '쓰기'의 특수한 형태이다. 일반적인 '쓰기'는 자신의 스트림 아이디와 에포크 아이디를 갖는다. 이중 스트림 쓰기는 동시에 두 개의 스트림에 속한다. 따라서 두 개의 스트림 아이디와 두 개의 에포크 아이디를 갖는다.
이중 스트림 쓰기는 자신이 속한 두 개의 스트림에서 모두 '쓰기' 순서를 보장해야 한다.
이중 스트림 쓰기는 하나의 스레드가, 다른 스레드에서 발생한 쓰기를 대기한 후에 진행해야 하는 경우에 사용된다. EXT4의 저널링이 그 예이다. EXT4 파일 시스템의 순차 저널링 모드에서 fsync 호출 시, 서로 다른 두 개의 스트림에 속한 쓰기 명령어 간에 순서를 보장해야 하는 상황이 발생한다. 이 경우에 이중 스트림 쓰기로 해당 쓰기 순서를 보장할 수 있다. EXT4 파일 시스템은 fsync() 호출 시, 응용 스레드는 파일의 변경된 페이지(더티 페이지)를 디스크의 쓰기 버퍼에 기록하고 저널링 스레드를 깨운다. EXT4는 변경된 메타데이타를 기록하는 스레드, 즉 저널링 스레드를 별도로 할당하고 있다. 저널링 스레드는 변경된 메타데이타 그리고 저널 커밋 블럭들을 디스크의 저널영역에 기록한다. 저널 커밋 블럭은 변경된 파일 페이지(더티 페이지)들과 변경된 메타데이타들이 모두 디스크에 기록된 후에, 디스크에 기록되어야 한다. 변경된 파일 블럭의 쓰기, 변경된 메타데이타의 쓰기가 종료된 후에 커밋 블럭의 쓰기가 종료되어야 한다.
변경된 파일 블럭의 쓰기, 변경된 메타데이타 블럭의 쓰기, 커밋 블럭의 쓰기를 각각 W(D), W(M), W(C) 이라고 가정할 수 있다. 이때, W(D) → W(C), 그리고 W(M) → W(C)의 순서가 보장되어야 한다. 저널링 스레드가 변경된 메타데이타의 쓰기, 커밋 블럭의 쓰기를 담당한다. 따라서, W(M) → W(C)의 순서보장은 두 개의 쓰기가 같은 스레드에서 생성되었기 때문에 동일 스트림에 속하므로, 에포크 아이디와 스트림 아이디를 이용하여 가능하다. 그러나 W(D) → W(C)에 대한 순서보장은 상황이 다르다. EXT4 파일 시스템에서 fsync() 호출 시 W(D)는 응용 스레드가 생성하고 W(C)는 저널링 스레드가 생성한다. 이 두 개의 쓰기는 각각 다른 스레드에 의해서 생성되므로 다른 스트림 아이디를 갖는다. 각 쓰기 요청을 생성하는 스트림이 서로 다르기 때문에 둘 사이의 쓰기 순서를 강제할 수 있는 방안이 없다는 문제점이 있다.
상술한 문제는 본 발명에서 제안하는 이중 스트림 쓰기로 해결할 수 있다.
EXT4 파일 시스템에서 fsync() 호출 시 {W(D), W(M)} → {W(C)}의 순서 제약이 있다. {W(M)} → {W(C)}는 동일한 저널링 스레드 스트림에 속하기 때문에 저널링 스레드의 스트림 아이디와 에포크 아이디로 순서 보장이 가능하다. {W(D)} → {W(C)}의 순서 제약은 W(D)를 이중 스트림 쓰기로 설정하면 순서 보장이 가능하다. 본 발명은 EXT4 파일 시스템에서 fsync() 호출 시, 응용 스레드가 생성하는 더티 페이지 쓰기 요청 (이하 W(D))를 응용 스레드의 스트림에도 속하고 동시에 저널링 스레드 스트림에도 속하는 이중 스트림 쓰기로 설정한다. 이중 스트림 쓰기는 두개의 스트림 아이디 (이하, 제1스트림 아이디, 제2스트림 아이디)와 두 개의 에포크 아이디(이하, 제1에포크 아이디, 제2에포크 아이디)를 갖는다. 본 발명의 일 실시예에서, 파일 시스템은 fsync 호출 시 더티 페이지에 대한 bio를 생성할 때 응용 스레드의 스트림 아이디를 제1스트림 아이디로 부여하고 응용 스레드의 에포크 카운터 값을 제1에포크 아이디로 부여한다. 또한 본 발명의 일 실시예에서, 파일 시스템은 해당 더티 페이지에 현재 동작 중인 저널 스레드의 스트림 아이디를 제2스트림 아이디로 부여하고 저널 스레드의 에포크 카운터 값을 제2에포크 아이디로 부여한다. 파일 시스템은 W(D)의 제1스트림 아이디와 제1에포크 아이디를 통해 W(D)를 생성한 응용 스레드 스트림 내에서 순서 정보를 명시할 수 있다. 동시에 파일 시스템은 W(D)의 제2스트림 아이디와 제2에포크 아이디를 통해 W(D)의 저널링 스레드 스트림 내에서 순서 정보 ({W(D), W(M)} → {W(C)})를 명시할 수 있다.
본 발명의 일 실시예에서, 스토리지로 전달되는 콤맨드 구조체의 일부분에 쓰기의 제1스트림 아이디, 제2스트림 아이디, 제1에포크 아이디, 제2에포크 아이디를 명시할 수 있다.
도 3은 EXT4 순차 저널링 모드에서 응용 스레드(T1)가 파일 A에 대해 fsync()를 호출한 일례를 보여준다. 도 3은 스토리지에 도착하는 쓰기 커맨드에 포함된 제1스트림 아이디 및 제2스트림 아이디와 제1에포크 아이디 및 제2에포크 아이디를 시간 순서대로 보여준다. 응용 스레드(T1)가 fsync()를 호출하면 응용 스레드는 더티 페이지 쓰기(W(D))를 구성하여 디스패치 한다. 파일 시스템은 W(D)의 제1스트림 아이디에 응용 스레드의 프로세스 아이디 '2062'를, 제1에포크 아이디에 응용 스레드의 에포크 카운터 값 '51'을 부여한다. 또한 파일 시스템은 W(D)가 fsync() 호출로 인해 생성된 더티 페이지 쓰기 요청이기 때문에 W(D)의 제2스트림 아이디에 현재 동작 중인 저널 스레드의 프로세스 아이디 '1995'를, 제2에포크 아이디에 저널 스레드의 에포크 카운터 값 '10'을 부여한다. 응용 스레드가 W(D)를 디스패치 한 뒤에 저널링 스레드(JBD)를 깨우면 저널링 스레드는 저널 메타데이터 블록(W(M))을 쓰기로 구성한다. 저널 메타데이터 블록은 추후에 생성될 저널 커밋 블록보다 먼저 디스크에 기록되어야 하기 때문에 베리어-쓰기로 구성된다. 파일 시스템은 W(M)에 저널 스레드의 스트림 아이디 '1995'와 에포크 카운터 값 '10'을 각각 제1스트림 아이디와 제1에포크 아이디로 부여한다. W(M)은 단일 스트림 쓰기이므로 제2스트림 아이디와 제2에포크 아이디는 부여되지 않아 값이 0이다. 저널링 스레드는 저널 커밋 블록(W(C))을 쓰기로 구성하여 디스패치한다. W(M)에 의해 저널링 스레드의 에포크 카운터 값이 '1' 증가하므로, W(C)의 제1에포크 아이디는 W(M)보다 '1' 큰 값 '11'이다. 순서 제약 {W(M)} → {W(C)}는 각 쓰기의 제1스트림 아이디와 제1에포크 아이디로 순서 보장이 가능하다. {W(D), W(M)} → {W(C)} 순서 제약은 W(D)의 제2스트림 아이디, 제2에포크 아이디와 W(M), W(C)의 제1스트림 아이디, 제1에포크 아이디를 통해 순서 보장이 가능하다. W(D)의 제2에포크 아이디는 W(M)의 제1에포크 아이디와 항상 동일한 값으로 부여되므로 W(D)와 W(M) 사이에는 순서 제약이 발생하지 않는다. 반면 W(D)의 제2에포크 아이디와 W(M)의 제1에포크 아이디는 W(C)의 제1에포크 아이디보다 항상 1만큼 작은 값이 부여되므로 {W(D), W(M)} → {W(C)}의 순서가 보장된다.
본 발명의 일 실시예에서, 여러 파일의 변경 사항이 컴파운드 트랜잭션으로 구성되어 있는 상황에서 응용 스레드의 fsync() 호출로 인해 저널 커밋이 발생하는 경우에도 이중 스트림 쓰기로 쓰기 순서를 보장할 수 있다.
도 4는 파일 A 및 파일 B의 메타데이터 변경 사항이 동일한 트랜잭션으로 구성돼 있을 때 제1스레드(T1)와 제2스레드(T2)가 각각 파일 A와 파일 B에 대해 fsync()를 호출한 일례를 보여준다. 도 4는 제1스레드(T1)가 제2스레드(T2) 보다 먼저 파일 A에 대해 fsync()를 호출한 상황을 가정하고 있다. 제1스레드가 생성한 파일 A의 더티 페이지 쓰기 요청(A1)은 이중 스트림 쓰기로 구성되어 디스패치 된다. 제1스레드는 저널 스레드를 깨운다. EXT4 파일 시스템의 순차 저널링 모드에서 저널링 스레드는 저널 트랜잭션에 대한 쓰기를 수행하기 전에, 컴파운드 트랜잭션에 포함된 파일의 더티 페이지를 쓰기 요청으로 구성하여 디스패치 한다. 파일 B의 메타데이터가 트랜잭션에 포함되어 있으므로, JBD 스레드는 파일 B의 더티 페이지(B1)를 쓰기 요청으로 구성된다. 파일 B의 더티 페이지 쓰기 요청 (B1)은 저널 스레드가 생성하기 때문에 이중 스트림 쓰기가 아닌 저널 스레드 스트림에 속하는 단일 쓰기이다. 저널 스레드는 해당 쓰기 요청을 디스패치 한 뒤 저널 트랜잭션을 쓰기 요청으로 구성하여 디스패치 한다. 파일 B에 대해 fsync()를 호출한 제2스레드는 파일 B의 더티 페이지(B1)가 저널 스레드에 의해 이미 쓰기 요청으로 구성되어 디스패치 되었기 때문에 쓰기 요청을 생성하지 않는다. 컴파운드 트랜잭션에 포함된 파일들의 더티 페이지 쓰기 요청들은 모두 저널 스레드의 스트림에 속하는 단일 쓰기이다. 호출 스레드에 의해 생성되는 더티 페이지 쓰기 요청만 저널 스레드와 순서 제약을 가지는 이중 스트림 쓰기로 구성된다.
EXT4 저널링에서 동시에 두 개 이상의 이중 스트림 쓰기 순서 제약이 발생할 수 있다. 두 개의 스레드가 fsync()를 동시에 호출하는 경우를 예로 들겠다. fsync()를 호출하면, 수정된 파일(D), 수정된 메타데이타(M), 저널 커밋 블럭(C)이 순서대로 저장되어야 한다. 제1스레드가 발생시키는 쓰기들을 W(D1), W(M), W(C)라 지칭하겠다. 제2스레드가 fsync호출로 인해 발생시키는 쓰기들을 W(D2), W(M), W(C)라 지칭하겠다. 제1스레드와 제2스레드는 거의 동시에 fsync()를 호출한다고 가정할 수 있다. 이때 다음과 같은 시나리오를 고려할 수 있다. 제1스레드(T1)가 W(D1)를 디스패치한 후에 제2스레드(T2)로 문맥이 전환되었다. 제2스레드(T2)가 W(D2) 명령어를 디스패치 한 후에 JBD 스레드를 깨운다. 깨어난 JBD 스레드는 제2스레드(T2)와 JBD 스레드 두 개의 스트림에 속하게 된다. JBD 스레드는 수정된 메타데이타와 커밋 블럭에 대한 쓰기 명령어를 순서대로 실행한다. 이 경우, {W(D2), W(M)} → W(C)의 순서보장조건이 생성된다. 그러나, 제1스레드가 생성한 W(D1)은 이들과는 독립적인 쓰기가 되어, W(C)가 처리된 이후에, 처리될 수 있다. 순서 보장조건이 성립하지 않게 된다. 이를 해결할 수 있는 가장 원시적인 방법은 '다중' 쓰기의 도입이다. 하나의 쓰기가 세 개 이상의 스트림에 중복해서 속할 수 있도록 하는 것이다. 그러나 이 기법은 실질적 구현하는 것이 쉽지 않다. 스토리지로 전달되는 커멘트 구조체는 영역의 크기가 제한되어 있어, 제한된 영역에 기록할 수 있는 스트림의 개수 역시 제한된다. 예를 들어, NVMe 표준의 커멘드 구조체에는 현재 사용되지 않는 16바이트의 여유공간이 있다. 이 여유공간을 스트림 아이디, 에포크 아이디를 저장하는데 사용할 수 있다.
도 5는 위의 예시이다. 도 5는 제1스레드(T1)와 제2스레드(T2)가 동시에 fsync()를 호출하여 다중쓰기가 발생한 상황을 나타낸다. 제1스레드가 더티 페이지 쓰기 요청(W(D1))을 생성하고 디스패치 한다. 파일 시스템은 W(D1)를 T1(프로세스 아이디 '2062')과 저널링 스레드(프로세스 아이디 '1995')에 모두 속한 이중 스트림 쓰기로 구성한다. 컨텍스트 스위칭이 발생하여 제2스레드가 파일 B에 대한 더티 페이지를 쓰기 요청(W(D2))으로 구성하여 디스패치 한다. 파일 시스템은 W(D2)를 T2(프로세스 아이디 '2063')과 저널링 스레드(프로세스 아이디 '1995')에 모두 속한 이중 스트림 쓰기로 구성한다. 이후, 스레드 T2가 저널링 스레드를 깨워 저널링 스레드가 저널 메타데이터 블록 (W(M))과 저널 커밋 블록 (W(C))을 쓰기로 구성하여 디스패치 한다. 저널링 스레드가 생성하는 W(M)과 W(C)는 모두 저널링 스레드 스트림에만 속한다. fsync() 호출 시 응용 스레드가 발생시키는 모든 파일의 쓰기를 응용 스레드와 저널 스레드에 속한 이중쓰기로 표현하여 {W(D1), W(D2), W(M)} → {W(C)}의 순서 보장이 가능하다.
본 명세서에서 이중 스트림 쓰기 또는 이중 쓰기는 한 개의 쓰기요청에 두 개의 스레드 아이디들이 포함된 경우를 의미하고, 단일 스트림 쓰기 또는 단일 쓰기는 한 개의 쓰기요청에 한 개의 스레드 아이디만이 포함된 경우를 의미할 수 있다.
본 발명의 일 관점에 따라, 저장장치가, 수신한 제1쓰기명령(701)과 제2쓰기명령(702) 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령과 상기 제2쓰기명령을 실행하는 단계;를 포함하는 쓰기 방법이 제공될 수 있다. 이때, 상기 제1쓰기명령은 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제11스트림 식별정보(711)를 포함한다.
이때, 상기 저장장치는, 상기 제2쓰기명령에 {제2스트림 아이디, 제2에포크 아이디}를 갖는 스트림 식별정보(722)가 포함되어 있는 경우에, 상기 실행순서를 상기 제1에포크 아이디와 상기 제2에포크 아이디의 값을 서로 비교한 결과를 이용하지 않는 규칙에 따라 결정하도록 되어 있다.
이때, 상기 저장장치는, 상기 제2쓰기명령에 {제1스트림 아이디, 제3에포크 아이디}를 갖는 스트림 식별정보(713)가 포함되어 있다면, 상기 실행순서를 상기 제1에포크 아이디와 상기 제3에포크 아이디의 값을 서로 비교하는 규칙에 따라 결정하도록 되어 있을 수 있다.
이때, 상기 제1쓰기명령은 {제2스트림 아이디, 제4에포크 아이디}를 갖는 제24스트림 식별정보(724)를 더 포함할 수 있다. 그리고 상기 저장장치는, 상기 제2쓰기명령에 {제1스트림 아이디, 제5에포크 아이디}를 갖는 제15스트림 식별정보(715)가 포함되어 있다면, 상기 제5에포크 아이디가 상기 제1에포크 아이디보다 우선순위가 높으면, 상기 제1쓰기명령을 상기 제2쓰기명령보다 나중에 실행하도록 되어 있을 수 있다.
이때, 상기 제1쓰기명령은 {제2스트림 아이디, 제4에포크 아이디}를 갖는 제24스트림 식별정보(724)를 더 포함할 수 있다. 그리고 상기 저장장치는, 상기 제2쓰기명령에 {제1스트림 아이디, 제5에포크 아이디}를 갖는 제15스트림 식별정보(715)가 포함되어 있다면, 상기 제5에포크 아이디가 상기 제1에포크 아이디보다 우선순위가 낮으면, 상기 제1쓰기명령을 상기 제2쓰기명령보다 먼저 실행하도록 되어 있을 수 있다.
이때, 상기 제2쓰기명령에 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제22스트림 식별정보(722)가 포함되어 있다면, 상기 제11스트림 식별정보와 상기 제2스트림 식별정보는, 상기 제1쓰기명령과 상기 제2쓰기명령을 상기 저장장치에게 전송한 호스트가 생성한 서로 다른 스레드들에 의해 생성된 것일 수 있다.
이때, 상기 제2쓰기명령에 {제2스트림 아이디, 제2에포크 아이디}를 갖는 스트림 식별정보(722)가 포함되어 있다면, 상기 제1에포크 아이디와 상기 제2에포크 아이디는, 상기 제1쓰기명령과 상기 제2쓰기명령을 상기 저장장치에게 전송한 호스트가 생성한 서로 다른 스레드들이 사용하는 서로 다른 변수들에 의해 각각 생성된 것일 수 있다.
이때, 상기 제2쓰기명령에 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제22스트림 식별정보(722)가 포함되어 있다면, 상기 쓰기 방법은, 상기 실행하는 단계 이전에, 상기 호스트가, 상기 제1스트림 아이디를 갖는 제1스레드 및 상기 제2스트림 아이디를 갖는 제2스레드를 생성하는 단계; 상기 제1스레드가, 상기 제1스트림 아이디와 상기 제1에포크 아이디를 갖는 제1쓰기요청을 생성하여 상기 호스트의 블록계층에 전달하는 단계; 상기 제2스레드가, 상기 제2스트림 아이디와 상기 제2에포크 아이디를 갖는 제2쓰기요청을 생성하여 상기 호스트의 블록계층에 전달하는 단계; 및 상기 블록계층이, 상기 제1쓰기요청 및 상기 제2쓰기요청을 기초로 상기 제1쓰기명령 또는 상기 제2쓰기명령을 생성하여 상기 저장장치에 전송하는 단계;를 더 포함할 수 있다. 이때, 상기 제1스레드가 상기 제1에포크 아이디를 생성하기 위해 이용하는 변수(=제1에포크 카운터)와 상기 제2스레드가 상기 제2에포크 아이디를 생성하기 위해 이용하는 변수(=제2에포크 카운터)는 서로 다를 수 있다.
이때, 상기 제1쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있을 수 있다. 그리고 상기 제1쓰기명령 및 상기 제2쓰기명령은 각각 상기 복수 개의 전송채널 중 서로 다른 전송채널을 통해 전송되거나, 또는 동일한 한 개의 전송채널을 통해 전송될 수 있다.
이때, 상기 제1쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있을 수 있다. 그리고 특정 {스트림 아이디, 에포크 아이디}를 갖는 모든 쓰기명령들은 상기 복수 개의 전송채널들 중 어느 하나의 전송채널만을 통해 전송될 수 있다.
이때, 쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있을 수 있다. 이때, 상기 저장장치가, 특정 전송채널을 통해 {제1스트림 아이디, 제7에포크 아이디}를 제6쓰기명령(706)을 수신한 경우, 상기 저장장치는, 상기 제6쓰기명령(706)을 수신한 제1시점으로부터 미리 결정된 타임아웃 시간 이전의 시각인 제2시점 사이에, 다른 전송채널을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 쓰기명령(703, 704, or 705)을 수신하지 않은 경우에만 상기 제6쓰기명령을 실행하도록 되어 있을 수 있다. 그리고 상기 제6에포크 아이디는 상기 제7에포크 아이디보다 쓰기 우선순위가 높은 값을 가질 수 있다.
이때, 쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있을 수 있다. 그리고 상기 저장장치는 타이머를 이용하여 타임 카운트를 실행하는 타임아웃 제어부를 포함할 수 있다. 그리고 상기 쓰기 방법은, 상기 저장장치가, 제1전송채널(31)을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 쓰기명령을 수신하면, 타이머의 타임 카운트를 미리 결정된 값으로 리셋하여 타이머를 구동하는 단계; 및 상기 저장장치가, 제2전송채널(32)을 통해 {제1스트림 아이디, 제7에포크 아이디}를 갖는 제6쓰기명령(706)을 수신하였을 때에, 상기 타임 카운트가 상기 기준값에 도달한 것이 확인된 경우에만 상기 제6쓰기명령을 실행하는 단계;를 포함할 수 있다.
이때, 상기 저장장치는, 상기 타이머를 구동하는 단계 이후에 제1전송채널(31)을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 다른 쓰기명령을 수신하면, 상기 타이머의 타임 카운트를 상기 미리 결정된 값으로 리셋하여 타이머를 재구동하도록 되어 있을 수 있다.
본 발명의 다른 관점에 따라 저장장치가, 수신된 제1쓰기명령과 제2쓰기명령 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령과 상기 제2쓰기명령을 실행하는 단계를 포함하는 쓰기방법이 제공될 수 있다. 이때, 상기 제1쓰기명령은 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제1스트림 식별정보를 포함하고, 상기 제2쓰기명령은 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제2스트림 식별정보를 포함하고, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에는, 상기 실행순서는 상기 제1에포크 아이디와 상기 제2에포크 아이디를 서로 비교한 결과를 이용하지 않고 결정하도록 되어 있을 수 있다.
이때, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 동일한 경우에는, 상기 실행순서는 상기 제1에포크 아이디와 상기 제2에포크 아이디를 서로 비교한 결과를 이용하여 결정되도록 되어 있을 수 있다.
이때, 상기 제1쓰기명령은 {제2스트림 아이디, 제3에포크 아이디}를 갖는 제3스트림 식별정보를 더 포함하고, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에, 상기 제1쓰기명령과 상기 제2쓰기명령 간의 실행순서는, 상기 제3에포크 아이디와 상기 제2에포크 아이디 간의 우선순위에 종속되는 것을 특징으로 할 수 있다.
이때, 상기 저장장치가 제3쓰기명령을 더 수신하는 경우에, 상기 실행하는 단계는, 상기 제1쓰기명령, 상기 제2쓰기명령, 및 상기 제3쓰기명령 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령, 상기 제2쓰기명령, 및 상기 제3쓰기명령을 실행하도록 되어 있고, 상기 제3쓰기명령은 {제1스트림 아이디, 제4에포크 아이디}를 갖는 제4스트림 식별정보를 포함하고, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에, 상기 제1쓰기명령과 상기 제3쓰기명령 간의 실행순서는, 상기 제4에포크 아이디와 상기 제1에포크 아이디 간의 우선순위에 종속되는 것을 특징으로 할 수 있다.
이때, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에, 상기 제1스트림 식별정보는, 상기 제1쓰기명령과 상기 제2쓰기명령을 상기 저장장치에게 전송한 호스트에서 실행되는 제1스레드에 의해 생성된 것이고, 상기 제2스트림 식별정보는, 상기 호스트에서 실행되는 제2스레드에 의해 생성된 것일 수 있다.
이때, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에, 상기 제1에포크 아이디는 상기 제1스레드가 참조하는 제1에포크 카운터에 의해 생성된 것이고, 상기 제2에포크 아이디는 상기 제2스레드가 참조하는 제2에포크 카운터에 의해 생성된 것일 수 있다.
이때, 상기 쓰기 방법은, 상기 실행하는 단계 이전에, 상기 제1쓰기명령과 상기 제2쓰기명령을 상기 저장장치에게 전송한 호스트가, 제1스레드 및 제2스레드를 실행하는 단계; 상기 제1스레드가 상기 제1스트림 아이디와 상기 제1에포크 아이디를 갖는 제1쓰기요청을 생성하여 상기 호스트의 블록계층에 전달하고, 상기 제2스레드가 상기 제2스트림 아이디와 상기 제2에포크 아이디를 갖는 제2쓰기요청을 생성하여 상기 호스트의 블록계층에 전달하는 단계; 및 상기 블록계층이, 상기 제1쓰기요청을 기초로 상기 제1쓰기명령을 생성하여 상기 저장장치에 전송하고, 상기 제2쓰기요청을 기초로 상기 제2쓰기명령을 생성하여 상기 저장장치에 전송하는 단계를 더 포함할 수 있다.
이때, 상기 제1쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있고, 특정 {스트림 아이디, 에포크 아이디}를 갖는 모든 쓰기명령들은 상기 복수 개의 전송채널들 중 어느 하나의 전송채널만을 통해 전송되는 것을 특징으로 할 수 있다.
이때, 쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있고, 상기 저장장치는, 타이머를 이용하여 타임아웃 제어부를 포함하며, 상기 저장장치가, 제1전송채널을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 제3쓰기명령을 수신하면, 상기 타이머의 타임카운트를 미리 결정된 값으로 리셋하여 상기 타이머를 구동하는 단계; 상기 저장장치가, 제2전송채널을 통해 {제1스트림 아이디, 제7에포크 아이디}를 갖는 제4쓰기명령을 수신하였을 때에, 상기 타임카운트가 소정의 기준값에 도달한 것이 확인된 경우에만 상기 제4쓰기명령을 실행하는 단계를 포함할 수 있다.
이때, 상기 저장장치는, 상기 타이머를 구동하는 단계 이후에 제1전송채널을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 다른 쓰기명령을 수신하면, 상기 타이머의 타임 카운트를 상기 미리 결정된 값으로 리셋하여 타이머를 재구동하도록 되어 있을 수 있다.
이때, 쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있고, 상기 저장장치가, 제1전송채널을 통해 {제1스트림 아이디, 제7에포크 아이디}를 갖는 제4쓰기명령을 수신한 경우, 상기 저장장치는, 상기 제4쓰기명령을 수신한 제1시점으로부터 미리 결정된 타임아웃 시간 이전의 시각인 제2시점 사이에, 제2전송채널을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 제3쓰기명령을 수신하지 않은 경우에만 상기 제3쓰기명령을 실행하도록 되어 있고, 상기 제6에포크 아이디는 상기 제7에포크 아이디보다 쓰기 우선순위가 높은 값을 가질 수 있다.
이때, 상기 {제1스트림 아이디, 제1에포크 아이디}를 갖는 한 세트의 쓰기명령들 중에서 가장 마지막에 발생한 쓰기명령은 배리어-명령인 것을 특징으로 할 수 있다.
본 발명의 다른 관점에 따라 콘트롤러; 및 메모리를 포함하는 저장장치가 제공될 수 있다. 이때, 상기 콘트롤러는, 상기 저장장치가 수신한 제1쓰기명령과 제2쓰기명령 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령과 상기 제2쓰기명령을 실행하도록 되어 있고, 상기 제1쓰기명령은 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제1스트림 식별정보를 포함하고, 상기 제2쓰기명령은 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제2스트림 식별정보를 포함하고, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에는, 상기 실행순서는 상기 제1에포크 아이디와 상기 제2에포크 아이디를 서로 비교한 결과를 이용하지 않고 결정하도록 되어 있을 수 있다.
이때, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 동일한 경우에는, 상기 실행순서는 상기 제1에포크 아이디와 상기 제2에포크 아이디를 서로 비교한 결과를 이용하여 결정되도록 되어 있을 수 있다.
이때, 상기 제1쓰기명령은 {제2스트림 아이디, 제3에포크 아이디}를 갖는 제3스트림 식별정보를 더 포함하고, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에, 상기 제1쓰기명령과 상기 제2쓰기명령 간의 실행순서는, 상기 제3에포크 아이디와 상기 제2에포크 아이디 간의 우선순위에 종속되는 것을 특징으로 할 수 있다.
이때, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에, 상기 제1에포크 아이디는 상기 제1쓰기명령과 상기 제2쓰기명령을 상기 저장장치에게 전송한 호스트에서 실행되는 제1스레드가 참조하는 제1에포크 카운터에 의해 생성된 것이고, 상기 제2에포크 아이디는 상기 호스트에서 실행되는 제2스레드가 참조하는 제2에포크 카운터에 의해 생성된 것일 수 있다.
이때, 쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있고, 상기 저장장치는, 타이머를 이용하여 타임아웃 제어부를 포함하며, 상기 저장장치가, 제1전송채널을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 제3쓰기명령을 수신하면, 상기 타이머의 타임카운트를 미리 결정된 값으로 리셋하여 상기 타이머를 구동하는 단계를 실행하도록 되어 있고, 그리고 상기 저장장치가, 제2전송채널을 통해 {제1스트림 아이디, 제7에포크 아이디}를 갖는 제4쓰기명령을 수신하였을 때에, 상기 타임카운트가 소정의 기준값에 도달한 것이 확인된 경우에만 상기 제4쓰기명령을 실행하는 단계를 실행하도록 되어 있을 수 있다.
본 발명의 또 다른 관점에 따라 콘트롤러; 및 메모리를 포함하는 저장장치가 제공될 수 있다. 이때, 상기 콘트롤러는, 수신된 제1쓰기명령, 제2쓰기명령, 및 제3쓰기명령 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령, 상기 제2쓰기명령, 및 상기 제3쓰기명령을 실행하는 단계를 실행하도록 되어 있으며, 상기 제1쓰기명령은 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제1스트림 식별정보 및 {제2스트림 아이디, 제3에포크 아이디}를 갖는 제3스트림 식별정보를 포함하고, 상기 제2쓰기명령은 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제2스트림 식별정보를 포함하고, 상기 제3쓰기명령은 {제1스트림 아이디, 제4에포크 아이디}를 갖는 제4스트림 식별정보를 포함하며, 상기 제3쓰기명령과 상기 제2쓰기명령간의 실행순서는, 상기 제3에포크 아이디와 상기 제2에포크 아이디 간의 우선순위, 그리고 상기 제1에포크 아이디와 상기 제4에포크 아이디 간의 우선순위에 의해 결정될 수 있다.
이때, 상기 제1에포크 아이디와 상기 제3에포크 아이디의 우선순위는 서로 동일할 수 있다.
본 발명에 따르면 다중 명령어 큐 스토리지에서 순서 보장 단위를 정하는 기술을 제공할 수 있다.
도 1은 스레드 2개가 서로 다른 파일에 대해 fdatasync()를 동시에 호출한 경우 시간에 따라 NVMe 디바이스에 도착하는 입출력 요청과 각 입출력 요청의 에포크 아이디를 표시한 것이다.
도 2는 본 발명의 일 관점에 따라 제공되는 스트림 아이디 할당 알고리즘 및 에포크 아이디 할당 알고리즘을 적용했을 때에, 스토리지 디바이스에 도착하는 입출력을 시간에 따라 나타낸 것이다.
도 3은 본 발명의 일 관점에 따라 제공되는 이중 스트림 쓰기의 스트림 아이디와 에포크 아이디 할당 알고리즘을 적용했을 때, 응용 쓰레드가 fsync()를 호출한 경우 스토리지 디바이스에 도착하는 입출력을 시간에 따라 나타낸 것이다.
도 4는 본 발명이 제공하는 이중 스트림 쓰기명령을 적용했을 때, 여러 파일의 수정 사항이 컴파운드 트랜잭션에 포함된 경우, 스토리지 디바이스에 도착하는 입출력을 시간에 따라 나타낸 것이다.
도 5는 본 발명의 일 관점에 따라 제공되는 이중 스트림 쓰기의 스트림 아이디와 에포크 아이디 할당 알고리즘을 적용했을 때, 여러 응용 쓰레드가 동시에 fsync()를 호출한 경우 스토리지 디바이스로 도착하는 입출력 명령을 시간에 따라 나타낸 것이다.
도 6은 본 발명의 일 실시예에 따라 제공되는 저장장치에서 호스트로부터 수신한 쓰기명령을 수행하는 방법을 나타낸 다이어그램이다.
도 7 및 도 8은 제2쓰기명령에 {제1스트림 아이디, 제3에포크 아이디}를 갖는 스트림 식별정보가 포함되어 있는 예를 나타낸 것이다.
도 9는 본 발명의 일 실시예에 따라 전송채널을 통해 전달되는 쓰기명령이 2개의 스트림 식별정보들을 포함하는 경우의 쓰기 방법을 설명하기 위한 것이다.
도 10은 본 발명의 다른 실시예에 따라 전송채널을 통해 전달되는 쓰기명령이 2개의 스트림 식별정보들을 포함하는 경우의 쓰기 방법을 설명하기 위한 것이다.
도 11은 본 발명의 또 다른 실시예에 따라 전송채널을 통해 전달되는 쓰기명령이 2개의 스트림 식별정보들을 포함하는 경우의 쓰기 방법을 설명하기 위한 것이다.
도 12는 본 발명의 또 다른 실시예에 따라 전송채널을 통해 전달되는 쓰기명령이 2개의 스트림 식별정보들을 포함하는 경우의 쓰기 방법을 설명하기 위한 것이다.
도 13은 발명의 일 실시예에 따라, 한 개의 전송채널을 통해 서로 다른 스트림에 속한 쓰기명령들이 전달되는 예를 나타낸 것이다.
도 14는 본 발명의 일 실시예에 따라 한 개의 스트림 내에서 동일한 에포크 아이디를 갖는 복수 개의 쓰기명령들을 전송하는 방법을 나타낸 것이다.
도 15는 도 14에 제시한 방법과 비교되는 비교 실시예를 나타낸 것이다.
도 16은 본 발명의 일 실시예에 따라, 하나의 스트림에 속한 쓰기명령들을 실행하는 순서를 결정하는 방법을 설명하기 위한 것이다.
도 17은 도 16에서 설명하는 본 발명의 일 실시예에서 발생할 수 있는 하나의 상황을 나타낸 것이다.
도 18은 도 16에서 설명하는 본 발명의 일 실시예에서 발생할 수 있는 다른 하나의 상황을 나타낸 것이다.
도 19는 본 발명의 일 실시예에 따라 제공되는 호스트와 저장장치를 포함하는 컴퓨팅 장치의 구성을 나타낸 블록도이다.
도 20 및 도 21은 본 발명의 일 실시예에 의해 제공되는 호스트가 쓰기명령을 생성하는 과정을 나타낸 것이다.
이하, 본 발명의 실시예를 첨부한 도면을 참고하여 설명한다. 그러나 본 발명은 본 명세서에서 설명하는 실시예에 한정되지 않으며 여러 가지 다른 형태로 구현될 수 있다. 본 명세서에서 사용되는 용어는 실시예의 이해를 돕기 위한 것이며, 본 발명의 범위를 한정하고자 의도된 것이 아니다. 또한, 이하에서 사용되는 단수 형태들은 문구들이 이와 명백히 반대의 의미를 나타내지 않는 한 복수 형태들도 포함한다.
도 6은 본 발명의 일 실시예에 따라 제공되는 저장장치에서 호스트로부터 수신한 쓰기명령을 수행하는 방법을 나타낸 다이어그램이다.
저장장치(20)는 예컨대 레이드 저장장치일 수 있다. 상기 저장장치(20)는 레이드 콘트롤러 및 복수 개의 디스크들을 포함할 수 있다.
상기 레이드 콘트롤러는 간단히 콘트롤러라고 지칭될 수 있다. 그리고 상기 복수 개의 디스크들은 비휘발성 메모리로 지칭될 수 있다. 그리고 상기 저장장치(20)는 휘발성 메모리를 더 포함할 수 있다. 상기 휘발성 메모리와 상기 비휘발성 메모리를 통칭하여 메모리라고 지칭할 수 있다.
호스트(10)는 상기 저장장치(20)에 쓰기명령을 포함하는 각종 명령 및 데이터를 전송하는 장치일 수 있다.
상기 호스트(10)와 상기 저장장치(20)는 제1전송채널(31) 및 제2전송채널(32)을 포함하는 복수 개의 전송채널들에 의해 연결되어 있을 수 있다.
일 실시예에서, 상기 호스트(10)와 상기 저장장치(20)는 한 개의 컴퓨팅 장치 내에 포함되어 있는 기능 모듈들일 수 있다. 다른 실시예에서, 상기 호스트(10)와 상기 저장장치(20)는 각각 독립적인 전원을 갖는 별개의 컴퓨팅 장치로 제공될 수 있다.
상기 저장장치(10)는, 상기 호스트(10)로부터 수신한 제1쓰기명령(701)과 제2쓰기명령(702) 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령(701)과 상기 제2쓰기명령(702)을 실행하는 단계를 실행하도록 되어 있을 수 있다.
상기 호스트(10)는 서로 다른 스레드를 생성하여 관리할 수 있다. 각 스레드는 한 개의 스트림을 생성할 수 있다. '스트림'은, 이에 대응하는 스레드에 의해 생성된 명령어들의 시간의 흐름에 따른 집합을 의미하는 것일 수 있다. 서로 다른 스트림은 상기 호스트(10)에서 관리하는 서로 다른 스레드에 의해 생성된 것일 수 있다. 서로 다른 스트림은 스트림 아이디라고 하는 파라미터에 의해 구분될 수 있다.
본 발명의 일 실시예에서, 쓰기명령은 단일 스트림 쓰기명령이거나 또는 이중 스트림 쓰기명령일 수 있다. 상기 쓰기명령에는 2개의 스트림 식별정보가 저장될 두 개의 공간이 제공되어 있을 수 있다. 상기 단일 스트림 쓰기명령의 경우, 상기 두 개의 공간 중 제1공간에는 특정 스트림에 관한 스트림 식별정보가 포함되어 있고, 상기 두 개의 공간 중 제2공간에는 무효인 정보 또는 널 정보가 포함되어 있을 수 있다. 상기 이중 스트림 쓰기명령의 경우, 상기 두 개의 공간 중 제1공간에는 특정 스트림에 관한 스트림 식별정보가 포함되어 있고, 상기 두 개의 공간 중 제2공간에는 상기 특정 스트림과는 다른 스트림에 관한 스트림 식별정보가 포함되어 있을 수 있다.
상기 제1쓰기명령(701)은 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제11스트림 식별정보(711)를 포함할 수 있다. 본 명세서에서 '{ }' 안에 포함된 스트림 아이디 및 에포크 아이디는 서로 결합되어 있는 쌍 정보이다.
본 명세서 및 도면에서 '제k에포크 아이디'는 'E-ID[#k]'로 표기될 수 있다.
한 개의 스트림 식별정보는 저장장치(20)가 수신한 한 개의 명령의 실행순서를 결정하는 데에 이용되는 정보일 수 있다.
한 개의 쓰기명령에는 상술한 스트림 식별정보가 1개 또는 2개 이상 포함되어 있을 수 있다. 상기 쓰기명령은 상기 호스트(10)로부터 상기 저장장치(20)에게 상기 전송채널을 통해 전달되는 명령을 의미할 수 있다.
한 개의 쓰기명령은 한 개의 스트림에만 연관되어 있거나, 또는 2개의 스트림들에 연관되어 있을 수 있다. 한 개의 스트림에만 연관되어 있는 쓰기명령은 단일 스트림 쓰기명령이고, 두 개의 스트림들에 연관되어 있는 쓰기명령은 이중 스트림 쓰기명령이다.
예컨대, 한 개의 쓰기명령에는 제1스트림 아이디를 갖는 스트림 식별정보가 1개 포함되어 있을 수 있다. 이러한 쓰기명령을 단일 스트림 쓰기명령 또는 단일 스트림 쓰기라고 지칭할 수도 있다.
또는, 한 개의 쓰기명령에는 제1스트림 아이디를 갖는 스트림 식별정보와 제2스트림 아이디를 갖는 스트림 식별정보가 각각 1개씩 포함되어 있을 수 있다. 이러한 쓰기명령을 이중 스트림 쓰기명령 또는 이중 스트림 쓰기라고 지칭할 수도 있다.
한 개의 스트림에 속한 각각의 스트림 식별정보는 한 개의 에포크 아이디를 포함할 수 있다.
상기 저장장치(20)가 동일한 스트림 아이디와 동일한 에포크 아이디를 갖는 스트림 식별정보를 포함하는 서로 다른 쓰기명령들을 실행할 때에, 그 실행순서는 상기 저장장치(20)가 임의의 결정할 수 있다.
한 개의 스트림 내에서, 서로 다른 에포크 아이디들 간에는 우선순위가 존재할 수 있다. 상기 저장장치(20)가 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제1쓰기명령과, {제1스트림 아이디, 제2에포크 아이디}를 갖는 제2쓰기명령을 실행할 때에, 상기 저장장치(20)는 상기 제1에포크 아이디와 상기 제2에포크 아이디 간의 우선순위를 기초로 상기 제1쓰기명령과 상기 제2쓰기명령 간의 실행순서를 결정할 수 있다.
본 발명의 일 실시예에서, 서로 다른 스트림에 속한 에포크 아이디들 간에는 우선순위가 존재하지 않을 수 있다. 상기 저장장치(20)가 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제1쓰기명령과, {제2스트림 아이디, 제2에포크 아이디}를 갖는 제2쓰기명령을 실행할 때에, 상기 저장장치(20)는 상기 제1쓰기명령과 상기 제2쓰기명령 간의 실행순서를 임의로 결정할 수 있다.
본 발명의 일 실시예에서, 상기 저장장치는, 제1스트림에만 연관된 제1단일 스트림 쓰기명령과 상기 제1스트림에만 연관된 제2단일 스트림 쓰기명령 간의 실행순서를 상기 제1단일 스트림 쓰기명령에 포함된 에포크 아이디와 상기 제2단일 스트림 쓰기명령에 포함된 에포크 아이디를 비교한 결과를 기초로 결정할 수 있다.
그리고 본 발명의 일 실시예에서, 상기 저장장치는, 제1스트림에만 연관된 제1단일 스트림 쓰기명령과 제2스트림에만 연관된 제2단일 스트림 쓰기명령 간의 실행순서를 임의로 결정할 수 있다. 즉, 상기 제1단일 스트림 쓰기명령과 상기 제2단일 스트림 쓰기명령 간의 실행순서에는 제약이 없다.
그리고 본 발명의 일 실시예에서, 상기 저장장치는, 제1스트림에만 연관된 제1단일 스트림 쓰기명령과 상기 제1스트림 및 제2스트림에 모두 연관된 제2이중 스트림 쓰기명령 간의 실행순서를, 상기 제1단일 스트림 쓰기명령에 포함된 상기 제1스트림에 연관된 에포크 아이디와 상기 제2이중 스트림 쓰기명령에 포함된 상기 제1스트림에 연관된 에포크 아이디를 서로 비교한 결과를 기초로 결정할 수 있다. 이때, 상기 저장장치는, 제2스트림에만 연관된 제3단일 스트림 쓰기명령과 상기 제1스트림 및 제2스트림에 모두 연관된 상기 제2이중 스트림 쓰기명령 간의 실행순서를, 상기 제3단일 스트림 쓰기명령에 포함된 상기 제2스트림에 연관된 에포크 아이디와 상기 제2이중 스트림 쓰기명령에 포함된 상기 제2스트림에 연관된 에포크 아이디를 서로 비교한 결과를 기초로 결정할 수 있다. 이렇게 함으로써, 결국 제1스트림에 연관된 쓰기명령과 제2스트림에 연관된 쓰기명령 사이에도 그 실행순서의 우선순위가 발생할 수 있다.
도 6은 제1쓰기명령(701)에 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제11스트림 식별정보(711)가 포함되어 있고, 제2쓰기명령(702)에 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제22스트림 식별정보(722)가 포함되어 있는 예를 나타낸 것이다.
만일, 상기 제2쓰기명령(702)에 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제22스트림 식별정보(722)가 포함되어 있다면, 상기 저장장치(20)는, 상기 제1쓰기명령(701)과 상기 제2쓰기명령(702) 간의 실행 우선순위를 상기 제1에포크 아이디와 상기 제2에포크 아이디의 값을 서로 비교한 결과를 이용하지 않는 규칙에 따라 결정하도록 되어 있을 수 있다. 여기서 상기 제2스트림 아이디는 상기 제1스트림 아이디와는 다른 값이다. 도 6은 상기 제1스트림 아이디(S-ID)는 1이고, 상기 제2스트림 아이디(S-ID)는 2인 예를 나타낸 것이다.
예컨대, 제2쓰기명령(702)에 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제22스트림 식별정보(722)가 포함되어 있고, 상기 제1에포크 아이디(E-ID[#1])가 '3'의 값을 갖고 상기 제2에포크 아이디(E-ID[#2])가 상기 '3'과 다른 값을 갖는다고 하더라도, 상상기 제1쓰기명령(701)과 상기 제2쓰기명령(702) 간의 실행 순서는 상기 제1에포크 아이디(E-ID[#1])의 값과 상기 제2에포크 아이디(E-ID[#2])의 값에 의해 결정되지는 않는다.
이와 달리, 즉, 도 6에 예시한 것과 달리, 상기 제2쓰기명령(702)에 {제1스트림 아이디, 제3에포크 아이디}를 갖는 스트림 식별정보(713)가 포함되어 있다면, 상기 저장장치(20)는, 상기 제1쓰기명령(701)과 상기 제2쓰기명령(702) 간의 실행 우선순위를 상기 제1에포크 아이디와 상기 제3에포크 아이디의 값을 서로 비교하는 규칙에 따라 결정하도록 되어 있을 수 있다. 즉, 상기 제11스트림 식별정보(711)와 상기 제22스트림 식별정보(722) 모두가 동일한 스트림을 나타내는 것이므로, 상기 제1쓰기명령(701)과 상기 제2쓰기명령(702) 간의 실행 우선순위가 에포크 아이디에 의해 결정될 수 있다. 이를 도 7 및 도 8을 참조하여 설명한다.
도 7 및 도 8은 각각, 제2쓰기명령(702)에 {제1스트림 아이디, 제3에포크 아이디}를 갖는 스트림 식별정보(713)가 포함되어 있는 예를 나타낸 것이다.
예컨대, 제2쓰기명령(702)에 {제1스트림 아이디, 제3에포크 아이디}를 갖는 제13스트림 식별정보(713)가 포함되어 있고, 상기 제1에포크 아이디(E-ID[#1])가 '3'의 값을 갖고 상기 제3에포크 아이디(E-ID[#3])가 상기 '3'과 같다면 상기 제1쓰기명령(701)과 상기 제2쓰기명령(702) 간의 실행 우선순위는 상기 저장장치(20)가 자유롭게 결정할 수 있다.
이와 달리, 제2쓰기명령(702)에 {제1스트림 아이디, 제3에포크 아이디}를 갖는 제13스트림 식별정보(713)가 포함되어 있고, 상기 제1에포크 아이디(E-ID[#1])가 '3'의 값을 갖고 상기 제3에포크 아이디(E-ID[#3])가 '5'의 값을 갖는다면, 상기 상기 제1쓰기명령(701)과 상기 제2쓰기명령(702) 간의 실행 우선순위는 상기 제1에포크 아이디와 상기 제3에포크 아이디의 값 간의 우선순위에 따라 결정될 수 있다.
도 6 및 도 7은 제1쓰기명령(701)과 제2쓰기명령(702)이 서로 다른 전송채널들을 통해 전송되는 예를 나타낸 것이다.
도 8은 제1쓰기명령(701)과 제2쓰기명령(702)이 동일한 전송채널을 통해 전송되는 예를 나타낸 것이다.
도 9는 본 발명의 일 실시예에 따라 전송채널을 통해 전달되는 한 개의 쓰기명령이 2개의 스트림 식별정보들을 포함하는 경우의 쓰기 방법을 설명하기 위한 것이다.
상기 저장장치(10)는, 상기 호스트(10)로부터 수신한 제1쓰기명령(701)과 제2쓰기명령(702) 간의 실행 우선순위를 결정하여, 상기 결정된 실행 우선순위에 따라 상기 제1쓰기명령(701)과 상기 제2쓰기명령(702)을 실행하도록 되어 있다.
상기 제1쓰기명령(701)은 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제11스트림 식별정보(711)를 포함할 수 있다.
또한, 상기 제1쓰기명령(701)은 {제2스트림 아이디, 제4에포크 아이디}를 갖는 제24스트림 식별정보(724)를 더 포함할 수 있다.
이때, 상기 {제1스트림 아이디, 제1에포크 아이디} 및 상기 {제2스트림 아이디, 제4에포크 아이디}는 NVMe 콤멘드 구조체의 일부분에 기록될 수 있다. 즉, 본 발명의 일 실시예에서 한 개의 쓰기명령에 포함되는 두 개의 스트림 식별정보들은 NVMe 콤멘드 구조체의 일부분에 기록될 수 있다.
상기 제1쓰기명령(701)과 같이, 서로 다른 두 개의 스트림에 속한 두 개의 스트림 식별정보들을 포함하는 쓰기명령을 이중 스트림 쓰기명령이라고 지칭할 수 있다. 상기 저장장치(20)는, 상기 제2쓰기명령(702)에 {제1스트림 아이디, 제5에포크 아이디}를 갖는 제15스트림 식별정보(715)가 포함되어 있다면, 상기 제5에포크 아이디(E-ID[#5])가 상기 제1에포크 아이디(E-ID[#1])보다 우선순위가 높으면, 상기 제1쓰기명령(701)을 상기 제2쓰기명령(702)보다 나중에 실행하도록 되어 있을 수 있다.
예컨대, 상기 제5에포크 아이디 E-ID[#5]가 '1'라는 값을 갖고, 상기 제1에포크 아이디 E-ID[#1]이 '2'이라는 값을 갖는 경우를 가정할 수 있다. 그리고 이때 '1'이 '2'보다 더 높은 우선순위를 갖는다고 가정할 수 있다. 이 경우, 상기 제1쓰기명령(701)을 상기 제2쓰기명령(702)보다 나중에 실행하도록 되어 있을 수 있다.
도 10은 본 발명의 다른 실시예에 따라 전송채널을 통해 전달되는 쓰기명령이 2개의 스트림 식별정보들을 포함하는 경우의 쓰기 방법을 설명하기 위한 것이다.
도 10은 제1쓰기명령(701)과 제2쓰기명령(702)이 동일한 제1전송채널(31)을 통해 전송되는 예를 나타낸 것이다. 이와 비교하여, 도 9는 제1쓰기명령(701)과 제2쓰기명령(702)이 서로 다른 전송채널들(31, 32)을 통해 전송되는 예를 나타낸 것이다. 이 점을 제외하고, 도 10에 나타낸 실시예는 도 9에 나타낸 실시예와 동일하다.
도 11은 본 발명의 또 다른 실시예에 따라 전송채널을 통해 전달되는 쓰기명령이 2개의 스트림 식별정보들을 포함하는 경우의 쓰기 방법을 설명하기 위한 것이다.
도 11에 제시한 실시예는 도 9에 제시한 실시예와 일부 차이점만을 제외하고는 동일하다. 이하 상기 일부 차이점만을 설명한다.
상기 저장장치(20)는, 상기 제2쓰기명령(702)에 {제1스트림 아이디, 제5에포크 아이디}를 갖는 제15스트림 식별정보(715)가 포함되어 있는 것을 확인할 수 있다. 이때, 상기 제5에포크 아이디가 상기 제1에포크 아이디보다 우선순위가 낮으면, 상기 저장장치(20)는 상기 제1쓰기명령(701)을 상기 제2쓰기명령(702)보다 먼저 실행하도록 되어 있을 수 있다.
도 12는 본 발명의 또 다른 실시예에 따라 전송채널을 통해 전달되는 쓰기명령이 2개의 스트림 식별정보들을 포함하는 경우의 쓰기 방법을 설명하기 위한 것이다.
도 12는 제1쓰기명령(701)과 제2쓰기명령(702)이 동일한 제1전송채널(31)을 통해 전송되는 예를 나타낸 것이다. 이와 비교하여, 도 11은 제1쓰기명령(701)과 제2쓰기명령(702)이 서로 다른 전송채널들(31, 32)을 통해 전송되는 예를 나타낸 것이다. 이 점을 제외하고, 도 12에 나타낸 실시예는 도 11에 나타낸 실시예와 동일하다.
도 13은 발명의 일 실시예에 따라, 한 개의 전송채널을 통해 서로 다른 스트림에 속한 쓰기명령들이 전달되는 예를 나타낸 것이다.
도 13은 제1쓰기명령(701)과 제2쓰기명령(702)이 동일한 제1전송채널(31)을 통해 전송되는 예를 나타낸 것이다. 이와 비교하여, 도 6은 제1쓰기명령(701)과 제2쓰기명령(702)이 서로 다른 전송채널들(31, 32)을 통해 전송되는 예를 나타낸 것이다. 이 점을 제외하고, 도 13에 나타낸 실시예는 도 6에 나타낸 실시예와 동일하다.
도 14는 본 발명의 일 실시예에 따라 동일 스트림 아이디 및 동일 에포크 아이디를 갖는 복수 개의 단일 스트림 쓰기명령들을 전송하는 방법을 나타낸 것이다.
도 14에 나타낸 실시예는 쓰기명령들을 상기 저장장치(20)에게 전송하는 호스트(10)와 상기 저장장치(20)가 서로 복수 개의 전송채널들(31, 32)로 연결되어 있는 경우에 이용될 수 있다.
상기 저장장치(20)는 상기 전송채널들의 개수에 대응하는 복수 개의 큐(queue)들을 제공할 수 있다. 특정 전송채널을 통해 수신된 명령(쓰기명령)들은 이에 대응하는 특정 큐에 저장되었다가 상기 저장장치(20)에 의해 처리될 수 있다.
상기 저장장치(20)은 제1전송채널(31)을 통해 수신한 명령들로 이루어지는 제1큐를 생성하고, 제2전송채널(32)을 통해 수신한 명령들로 이루어지는 제2큐를 생성할 수 있다.
본 발명의 일 실시예에서, 특정 {스트림 아이디, 에포크 아이디}를 갖는 모든 쓰기명령들은 상기 복수 개의 전송채널들 중 어느 하나의 전송채널만을 통해서만 전송될 수 있다. 이와 같은 개념은, 본 발명에서는 큐-피닝(queue-pinning)이라고 지칭할 수 있다.
예컨대, 도 14에서 {스트림 아이디(S-ID=1), 에포크 아이디(E-ID[#6])}라는 스트림 식별정보를 갖는 모든 쓰기명령들(703~705)은 한 개의 특정 전송채널(32)을 통해서만 전달될 수 있다.
도 15는 도 14에 제시한 방법과 비교되는 비교 실시예를 나타낸 것이다.
도 15에 나타낸 비교 실시예에서, 특정 {스트림 아이디, 에포크 아이디}를 갖는 쓰기명령들이 상기 복수 개의 전송채널들 중 2개 이상의 전송채널 상에 분산되어 전송된다.
예컨대, 도 15에서 스트림 아이디 S-ID가 1인 쓰기명령들 중 에포크 아이디 E-ID[#6]를 갖는 쓰기명령들(703~705) 중 일부 쓰기명령(704)은 제1전송채널(31)을 통해 전송되고, 다른 쓰기명령들(703, 705)은 제2전송채널(32)을 통해서 전달된다. 이때, 에포크 아이디 E-ID[#6]을 갖는 제4쓰기명령(704)이, 에포크 아이디 E-ID[#7]을 갖는 제6쓰기명령(706)보다 상기 저장장치(20)에 늦게 도달한 상태이다. 여기서, 에포크 아이디 E-ID[#6]가 에포크 아이디 E-ID[#7]보다 더 높은 우선순위를 갖는다고 가정할 수 있다.
만일 도 15와 같은 비교 실시예를 이용한다면, 상기 저장장치(20)는 상기 제2전송채널(32)을 통해 수신한 명령들로 이루어지는 제2큐에서 에포크 아이디 E-ID[#6]를 갖는 제5쓰기명령(705)에 뒤이어 에포크 아이디 E-ID[#7]을 갖는 제6쓰기명령(706)이 존재하는 것을 확인할 수 있다. 그리고 상기 저장장치(20)는 상기 제5쓰기명령(705)이 상기 에포크 아이디 E-ID[#6]를 갖는 쓰기명령들 중 마지막 명령이라고 판단할 수 있다. 그리고 상기 저장장치(20)는 에포크 아이디 E-ID[#7]을 갖는 제6쓰기명령(706)을, 상기 제6쓰기명령(706)보다 상기 저장장치(20)에 더 늦게 도달한 제4쓰기명령(704)보다 먼저 실행할 수 있다. 따라서 오류가 발생한다. 제4쓰기명령(704)의 에포크 아이디 E-ID[#6]가 제6쓰기명령(706)의 에포크 아이디 E-ID[#7]보다 우선순위가 높기 때문이다.
이와 비교하여, 도 14에 제시한 본 발명의 일 실시예에 따른 큐-피닝을 이용하면, 상기 저장장치(20)는 에포크 아이디 E-ID[#7]을 갖는 첫 번째 쓰기명령인 제6쓰기명령(706)을 확인하면, 에포크 아이디 E-ID[#6]을 갖는 마지막 명령이 이미 전달되었다고 확정할 수 있다. 이는, 에포크 아이디 E-ID[#6]을 갖는 쓰기명령들이 이미 제2전송채널(32)을 통해 전송되고 있었기 때문에, 에포크 아이디 E-ID[#6]을 갖는 다른 쓰기명령이 다른 전송채널(31)을 전송되지 않을 것이라는 것을 상기 저장장치(20)가 알 수 있기 때문이다. 따라서 상기 저장장치(20)가 상기 제6쓰기명령(706)을 확인한 순간 상기 제6쓰기명령(706)을 실행하더라도 도 15와 같은 오류가 발생하지 않는다는 효과가 있다.
일 실시예에서, 도 14 및 도 15와 관련된 위의 설명에서 제시한 '쓰기명령'은 상술한 '단일 스트림 쓰기명령'을 의미하는 것일 수 있다.
한편, 본 발명의 일 실시예에서, 특정 {스트림 아이디, 에포크 아이디}를 갖는 한 세트의 쓰기명령들이 특정 채널을 통해 호스트로부터 저장장치에게 전송될 때에, 상기 한 세트의 쓰기명령들 중 마지막에 발생한 쓰기명령은 상기 에포크 아이디를 갖는 베리어-명령일 수 있다. 즉, 저장장치(20)는, 특정 스트림 아이디와 특정 에포크 아이디를 갖는 베리어-명령을 수신하면, 특정 스트림 아이디와 특정 에포크 아이디를 갖는 한 세트의 쓰기명령들의 전송이 종료되었다고 판단할 수 있다.
도 16은 본 발명의 일 실시예에 따라, 하나의 스트림에 속한 쓰기명령들을 실행하는 순서를 결정하는 방법을 설명하기 위한 것이다.
도 16에 제시한 실시예는, 쓰기명령을 상기 저장장치(20)에게 전송하는 호스트(10)와 상기 저장장치(20)가 복수 개의 전송채널로 연결된 경우에 유용하게 사용될 수 있다.
도 16에 제시한 실시예에 따르면, 상기 저장장치(20)가, 특정 전송채널(ex: 32)을 통해 {제1스트림 아이디, 제7에포크 아이디}를 갖는 첫 번째(최초의) 쓰기명령(706)을 최초로 수신한 경우에, 상기 첫 번째 쓰기명령(706)을 곧 바로 실행할지 아니면 소정 시간 기다린 이후에 실행할지를 결정할 수 있다.
이때, {제1스트림 아이디, 제6에포크 아이디}를 갖는 쓰기명령을 다른 전송채널(ex: 31)을 통해 이미 수신하고 있는 상황을 전제로 한다. 이때, 상기 제6에포크 아이디는 상기 제7에포크 아이디보다 쓰기 우선순위가 1만큼 높은 값을 갖는다.
도 16의 예에서, {제1스트림 아이디, 제7에포크 아이디}를 갖는 첫 번째 쓰기명령은 제6쓰기명령(706)으로 제시되어 있다.
본 발명의 바람직한 일 실시예에서, 상기 저장장치(20)는, 상기 제6쓰기명령(706)을 수신한 제1시점으로부터 미리 결정된 타임아웃 시간 이전의 시각인 제2시점 사이에, 다른 전송채널을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 쓰기명령(703, 704, or 705)을 수신하지 않은 경우에만 상기 제6쓰기명령을 실행하도록 되어 있을 수 있다.
도 17은 도 16에서 설명하는 본 발명의 일 실시예에서 발생할 수 있는 하나의 상황을 나타낸 것이다.
도 18은 도 16에서 설명하는 본 발명의 일 실시예에서 발생할 수 있는 다른 하나의 상황을 나타낸 것이다.
도 17 및 도 18에서 가로축은 시간을 나타내며, 오른쪽으로 갈수록 먼저 발생한 시간을 나타낸다.
도 17에 나타낸 예에서, 상기 저장장치(20)는, 상기 제6쓰기명령(706)을 수신한 제1시점(T1)으로부터 미리 결정된 타임아웃 시간(DT) 이전의 시각인 제2시점(T2) 사이에, 다른 전송채널(31)을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 쓰기명령(704)을 수신하였다. 따라서, 상기 저장장치(20)는 상기 제6쓰기명령(706)을 확인하더라도 곧 바로 상기 제6쓰기명령(706)을 실행하지 않고 기다린다.
상기 저장장치(20)는, {제1스트림 아이디, 제6에포크 아이디}를 갖는 제4쓰기명령(704)이, 상기 제6에포크 아이디를 갖는 마지막 쓰기명령이라는 사실을 알 수 없다면, 상기 제4쓰기명령(704)을 수신한 제3시점(T3)에 타이머를 리셋하고 타이머를 구동한다. 그리고 상기 타이머의 타임아웃은 상기 미리 결정된 타임아웃 시간(DT)이 경과한 제4시점(T4)에 이루어진다. 상기 제1시점(T1)에서는 아직 타임아웃이 이루어지지 않았으므로, 상기 제1시점(T1)에서는 상기 제6쓰기명령(706)을 실행하지 않는다. 그리고 상기 제4시점(T4)에 타임아웃이 이루어지면 비로소 상기 제6쓰기명령(706)을 실행할 수 있다.
도 18에 나타낸 예에서, 상기 저장장치(20)는, 상기 제6쓰기명령(706)을 수신한 제1시점(T1)으로부터 미리 결정된 타임아웃 시간(DT) 이전의 시각인 제2시점(T2) 사이에, {제1스트림 아이디, 제6에포크 아이디}를 갖는 쓰기명령을 아무것도 수신하지 않았다. 따라서, 상기 저장장치(20)는 상기 제6쓰기명령(706)을 확인한 제1시점(T1)에, 타임아웃이 이루어진 것을 확인하고 곧 바로 상기 제6쓰기명령(706)을 실행할 수 있다.
도 18의 예에서, 상기 저장장치(20)는, {제1스트림 아이디, 제6에포크 아이디}를 갖는 제5쓰기명령(705)을, 상기 제2시점(T2)보다 앞선 제3시점(T3)에 수신하였다. 상기 저장장치(20)이 상기 제5쓰기명령(705)이, 상기 제6에포크 아이디를 갖는 마지막 쓰기명령이라는 사실을 알 수 없다면, 상기 제5쓰기명령(705)을 수신한 제3시점(T3)에 타이머를 리셋하고 타이머를 구동한다. 그리고 타임아웃은 상기 미리 결정된 타임아웃 시간(DT)이 경과한 제4시점(T4)에 이루어진다. 상기 제1시점(T1)에서는 타임아웃이 이루어 졌다. 따라서 상기 제4시점(T4)에 상기 저장장치(20)는 상기 제6쓰기명령(706)을 실행할 수 있다.
도 16 내지 도 18을 통해 설명한 본 발명의 개념을 큐-피닝 타임아웃이라고 지칭할 수 있다. 상기 큐-피닝 타임아웃은 도 14에 설명한 큐-피닝의 개념을 전제로 한 것이다.
도 16 내지 도 18을 통해 설명한 본 발명의 개념은, {특정 스트림 아이디, 특정 에포크 아이디}를 포함하여 연속적으로 발생한 쓰기명령들에 대하여, 시간축에서 서로 인접한 두 개의 쓰기명령들 간의 시간 간격이 상기 미리 결정된 타임아웃 시간(DT)보다 작을 것이라는 기대를 이용한 것이다.
상술한 큐-피닝 타임아웃 개념을 구현하기 위하여, 상기 저장장치(20)는 타이머를 포함할 수 있다.
그리고 상기 저장장치(20)는 다음 단계들을 수행할 수 있다.
단계(S510)에서, 상기 저장장치(20)는 제1전송채널(31)을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 쓰기명령을 수신하면, 타이머를 리셋하여 상기 타이머를 구동할 수 있다.
단계(S520)에서, 상기 저장장치(20)는, 제2전송채널(32)을 통해 {제1스트림 아이디, 제7에포크 아이디}를 갖는 제6쓰기명령(706)을 수신하였을 때에, 상기 타이머가 타임 아웃된 것이 확인된 경우에만 상기 제6쓰기명령을 실행할 수 있다.
이때, 상기 저장장치(20)는, 상기 타이머를 구동하는 단계 이후에 제1전송채널(31)을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 다른 쓰기명령을 수신하면, 상기 타이머를 다시 리셋하여 상기 타이머를 재구동할 수 있다.
여기서 상기 제7에포크 아이디는 상기 제6에포크 아이디보다 낮은 우선순위를 갖는다.
도 17 및 도 18에 제시한 방법은, 상기 저장장치(20)가 {특정 스트림 아이디, 특정 에포크 아이디}를 갖는 특정 쓰기명령이, 상기 {특정 스트림 아이디, 특정 에포크 아이디}를 갖는 일련의 쓰기명령들 중에서 마지막으로 발생한 쓰기명령인지 여부를 알 수 없을 때에 유용하게 사용될 수 있다.
이와 달리, 상술한 바와 같이, 상기 {특정 스트림 아이디, 특정 에포크 아이디}를 갖는 일련의 쓰기명령들 중에서 마지막에 발생한 쓰기명령을 상기 특정 에포크 아이디를 갖는 베리어-명령으로 정의한다면, 도 17 및 도 18에 서술한 큐-피닝 타임아웃의 구성을 이용하지 않더라도 도 17 및 도 18에 설명한 것과 동일한 효과를 얻을 수 있다.
도 19는 본 발명의 일 실시예에 따라 제공되는 호스트와 저장장치를 포함하는 컴퓨팅 장치의 구성을 나타낸 블록도이다.
컴퓨팅 장치(1)는 호스트(10) 및 저장장치(20)를 포함할 수 있다.
상기 저장장치(20)는 콘트롤러(210) 및 한 개 또는 복수 개의 디스크들(221~224)를 포함할 수 있다. 상기 콘트롤러(210)는 상기 타이머(211)를 포함할 수 있다.
상기 저장장치(20)는 레이드 저장장치일 수 있다. 이때 상기 콘트롤러(210)는 레이드 콘트롤러일 수 있다.
상기 호스트(10)와 상기 저장장치(20)는 복수 개의 전송채널들(ex: 31~33)로 연결될 수 있다.
도 20 및 도 21은 본 발명의 일 실시예에 의해 제공되는 호스트가 쓰기명령을 생성하는 과정을 나타낸 것이다.
상기 호스트(10)는 제1스레드 및 제2스레드를 생성할 수 있다.
서로 다른 스트림 아이디를 갖는 제1스트림 식별정보 및 제2스트림 식별정보는, 상기 호스트(10)가 생성한 서로 다른 스레드들에 의해 생성된 것일 수 있다. 예컨대 제1스트림 아이디를 갖는 제11스트림 식별정보(711)는 상기 호스트(10)가 생성한 제1스레드에 의해 생성된 것이고, 제2스트림 아이디를 갖는 제24스트림 식별정보(724)는 상기 호스트(10)가 생성한 제2스레드에 의해 생성된 것일 수 있다.
이때, 제11스트림 식별정보(711)에 포함된 제1에포크 아이디는 상기 제1스레드가 사용하는 제1변수에 의해 생성된 것이고, 제24스트림 식별정보(724)에 포함된 제4에포크 아이디는 상기 제2스레드가 사용하는 제2변수에 의해 생성된 것일 수 있다. 상기 제1변수와 상기 제2변수는 서로 다른 변수이며, 각각 상기 제1스레드 및 상기 제2스레드에 의해 독립적으로 관리될 수 있다. 본 명세서에서 상기 제1변수 및 상기 제2변수는 각각 제1에포크 카운터 및 제2에포크 카운터라고 지칭될 수도 있다.
상기 제1스레드는 제1스트림 아이디를 갖는 스트림 식별정보들을 포함하는 제1쓰기요청을 블록계층(11)에 전달할 수 있다. 이때 각 스트림 식별정보에 포함된 에포크 아이디는 상기 제1스레드가 상기 제1변수를 이용하여 생성한 것이며, 예컨대 제1에포크 아이디일 수 있다.
상기 제2스레드는 제2스트림 아이디를 갖는 스트림 식별정보들을 포함하는 제2쓰기요청을 블록계층(11)에 전달할 수 있다. 이때 각 스트림 식별정보에 포함된 에포크 아이디는 상기 제2스레드가 상기 제2변수를 이용하여 생성한 것이며, 예컨대 제4에포크 아이디일 수 있다.
도 20에 제시한 것과 같이, 상기 블록계층(11)은, 상기 제1쓰기요청을 기초로 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제11스트림 식별정보(711)를 생성하고, 상기 제11스트림 식별정보를 포함하는 제1쓰기명령(701)을 생성하여 상기 저장장치(20)에게 전송할 수 있다. 그리고 상기 블록계층(11)은, 상기 제2쓰기요청을 기초로 {제2스트림 아이디, 제4에포크 아이디}를 갖는 제24스트림 식별정보(724)를 생성하고, 상기 제24스트림 식별정보를 포함하는 제2쓰기명령(702)을 생성하여 상기 저장장치(20)에게 전송할 수 있다. 도 20의 예에서 제1쓰기명령(701)과 제2쓰기명령(702)는 각각 단일 스트림 쓰기명령이다.
이와 달리 도 21에 제시한 것과 같이, 블록계층(11)은, 상기 제1쓰기요청 및 제2쓰기요청을 기초로 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제11스트림 식별정보와 {제2스트림 아이디, 제4에포크 아이디}를 갖는 제24스트림 식별정보를 포함하는 제1쓰기명령(701)을 생성하여 상기 저장장치(20)에게 전송할 수 있다. 도 21의 예에서, 상기 제1쓰기명령(701)은 이중 스트림 쓰기명령이다.
본 명세서에서, 도 20의 제2쓰기명령(702)과 같이 한 개의 스트림 식별정보만을 포함하는 쓰기명령은 단일 스트림 쓰기명령이라고 지칭할 수 있다. 그리고 도 21의 제1쓰기명령(701)과 같이 서로 다른 두 개의 스트림에 속한 두 개의 스트림 식별정보들을 포함하는 쓰기명령은 이중 스트림 쓰기명령이라고 지칭할 수 있다.
상술한 본 발명의 실시예들을 이용하여, 본 발명의 기술 분야에 속하는 자들은 본 발명의 본질적인 특성에서 벗어나지 않는 범위 내에 다양한 변경 및 수정을 용이하게 실시할 수 있을 것이다. 특허청구범위의 각 청구항의 내용은 본 명세서를 통해 이해할 수 있는 범위 내에서 인용관계가 없는 다른 청구항에 결합될 수 있다.
[사사]
본 발명은 다음 연구과제의 지원을 받아 창작된 것이다.
*과제고유번호: 2018900054
*과제번호: 20180005490031001
*부처명: 과학기술정보통신부
*연구관리전문기관: 정보통신기획평가원
*연구사업명: SW컴퓨팅산업원천기술개발사업
*연구과제명: 매니코어 초대용량 메모리를 위한 확장형 순서보장운영체제 개발
*과제수행기관명: 한국과학기술원
*연구기간: 2018.04.01.~2022.12.31

Claims (15)

  1. 저장장치가, 수신된 제1쓰기명령과 제2쓰기명령 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령과 상기 제2쓰기명령을 실행하는 단계;
    를 포함하며,
    상기 제1쓰기명령은 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제1스트림 식별정보를 포함하고,
    상기 제2쓰기명령은 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제2스트림 식별정보를 포함하고,
    상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에는, 상기 실행순서는 상기 제1에포크 아이디와 상기 제2에포크 아이디를 서로 비교한 결과를 이용하지 않고 결정하도록 되어 있는,
    쓰기 방법.
  2. 제1항에 있어서,
    상기 제1스트림 아이디와 상기 제2스트림 아이디가 동일한 경우에는, 상기 실행순서는 상기 제1에포크 아이디와 상기 제2에포크 아이디를 서로 비교한 결과를 이용하여 결정되도록 되어 있는,
    쓰기 방법.
  3. 제1항에 있어서,
    상기 제1쓰기명령은 {제2스트림 아이디, 제3에포크 아이디}를 갖는 제3스트림 식별정보를 더 포함하고,
    상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에, 상기 제1쓰기명령과 상기 제2쓰기명령 간의 실행순서는, 상기 제3에포크 아이디와 상기 제2에포크 아이디 간의 우선순위에 종속되는 것을 특징으로 하는,
    쓰기 방법.
  4. 제3항에 있어서,
    상기 저장장치가 제3쓰기명령을 더 수신하는 경우에, 상기 실행하는 단계는, 상기 제1쓰기명령, 상기 제2쓰기명령, 및 상기 제3쓰기명령 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령, 상기 제2쓰기명령, 및 상기 제3쓰기명령을 실행하도록 되어 있고,
    상기 제3쓰기명령은 {제1스트림 아이디, 제4에포크 아이디}를 갖는 제4스트림 식별정보를 포함하고,
    상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에,
    상기 제1쓰기명령과 상기 제3쓰기명령 간의 실행순서는, 상기 제4에포크 아이디와 상기 제1에포크 아이디 간의 우선순위에 종속되는 것을 특징으로 하는,
    쓰기 방법.
  5. 제1항에 있어서,
    상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에,
    상기 제1스트림 식별정보는, 상기 제1쓰기명령과 상기 제2쓰기명령을 상기 저장장치에게 전송한 호스트에서 실행되는 제1스레드에 의해 생성된 것이고,
    상기 제2스트림 식별정보는, 상기 호스트에서 실행되는 제2스레드에 의해 생성된 것인,
    쓰기 방법.
  6. 제1항에 있어서,
    상기 실행하는 단계 이전에,
    상기 제1쓰기명령과 상기 제2쓰기명령을 상기 저장장치에게 전송한 호스트가, 제1스레드 및 제2스레드를 실행하는 단계;
    상기 제1스레드가 상기 제1스트림 아이디와 상기 제1에포크 아이디를 갖는 제1쓰기요청을 생성하여 상기 호스트의 블록계층에 전달하고, 상기 제2스레드가 상기 제2스트림 아이디와 상기 제2에포크 아이디를 갖는 제2쓰기요청을 생성하여 상기 호스트의 블록계층에 전달하는 단계; 및
    상기 블록계층이, 상기 제1쓰기요청을 기초로 상기 제1쓰기명령을 생성하여 상기 저장장치에 전송하고, 상기 제2쓰기요청을 기초로 상기 제2쓰기명령을 생성하여 상기 저장장치에 전송하는 단계;
    를 더 포함하는,
    쓰기 방법.
  7. 제1항에 있어서,
    상기 제1쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있고,
    특정 {스트림 아이디, 에포크 아이디}를 갖는 모든 쓰기명령들은 상기 복수 개의 전송채널들 중 어느 하나의 전송채널만을 통해 전송되는 것을 특징으로 하는,
    쓰기 방법.
  8. 제1항에 있어서,
    쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있고,
    상기 저장장치는, 타이머를 이용하여 타임아웃 제어부를 포함하며,
    상기 저장장치가, 제1전송채널을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 제3쓰기명령을 수신하면, 상기 타이머의 타임카운트를 미리 결정된 값으로 리셋하여 상기 타이머를 구동하는 단계;
    상기 저장장치가, 제2전송채널을 통해 {제1스트림 아이디, 제7에포크 아이디}를 갖는 제4쓰기명령을 수신하였을 때에, 상기 타임카운트가 소정의 기준값에 도달한 것이 확인된 경우에만 상기 제4쓰기명령을 실행하는 단계;
    를 포함하는,
    쓰기 방법.
  9. 제8항에 있어서, 상기 저장장치는, 상기 타이머를 구동하는 단계 이후에 제1전송채널을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 다른 쓰기명령을 수신하면, 상기 타이머의 타임 카운트를 상기 미리 결정된 값으로 리셋하여 타이머를 재구동하도록 되어 있는, 쓰기 방법.
  10. 제1항에 있어서,
    쓰기명령을 상기 저장장치에게 전송하는 호스트와 상기 저장장치는 복수 개의 전송채널로 연결되어 있고,
    상기 저장장치가, 제1전송채널을 통해 {제1스트림 아이디, 제7에포크 아이디}를 갖는 제4쓰기명령을 수신한 경우,
    상기 저장장치는, 상기 제4쓰기명령을 수신한 제1시점으로부터 미리 결정된 타임아웃 시간 이전의 시각인 제2시점 사이에, 제2전송채널을 통해 {제1스트림 아이디, 제6에포크 아이디}를 갖는 제3쓰기명령을 수신하지 않은 경우에만 상기 제3쓰기명령을 실행하도록 되어 있고,
    상기 제6에포크 아이디는 상기 제7에포크 아이디보다 쓰기 우선순위가 높은 값을 갖는,
    쓰기 방법.
  11. 제1항에 있어서, 상기 {제1스트림 아이디, 제1에포크 아이디}를 갖는 한 세트의 쓰기명령들 중에서 가장 마지막에 발생한 쓰기명령은 배리어-명령인 것을 특징으로 하는, 쓰기 방법.
  12. 콘트롤러; 및 메모리를 포함하는 저장장치로서,
    상기 콘트롤러는, 상기 저장장치가 수신한 제1쓰기명령과 제2쓰기명령 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령과 상기 제2쓰기명령을 실행하도록 되어 있고,
    상기 제1쓰기명령은 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제1스트림 식별정보를 포함하고,
    상기 제2쓰기명령은 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제2스트림 식별정보를 포함하고,
    상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에는, 상기 실행순서는 상기 제1에포크 아이디와 상기 제2에포크 아이디를 서로 비교한 결과를 이용하지 않고 결정하도록 되어 있는,
    저장장치.
  13. 제12항에 있어서, 상기 제1스트림 아이디와 상기 제2스트림 아이디가 동일한 경우에는, 상기 실행순서는 상기 제1에포크 아이디와 상기 제2에포크 아이디를 서로 비교한 결과를 이용하여 결정되도록 되어 있는, 저장장치.
  14. 제12항에 있어서,
    상기 제1스트림 아이디와 상기 제2스트림 아이디가 서로 다른 경우에,
    상기 제1에포크 아이디는 상기 제1쓰기명령과 상기 제2쓰기명령을 상기 저장장치에게 전송한 호스트에서 실행되는 제1스레드가 참조하는 제1에포크 카운터에 의해 생성된 것이고,
    상기 제2에포크 아이디는 상기 호스트에서 실행되는 제2스레드가 참조하는 제2에포크 카운터에 의해 생성된 것인,
    저장장치.
  15. 콘트롤러; 및 메모리를 포함하며,
    상기 콘트롤러는, 수신된 제1쓰기명령, 제2쓰기명령, 및 제3쓰기명령 간의 실행순서를 결정하여, 상기 결정된 실행순서에 따라 상기 제1쓰기명령, 상기 제2쓰기명령, 및 상기 제3쓰기명령을 실행하는 단계를 실행하도록 되어 있으며,
    상기 제1쓰기명령은 {제1스트림 아이디, 제1에포크 아이디}를 갖는 제1스트림 식별정보 및 {제2스트림 아이디, 제3에포크 아이디}를 갖는 제3스트림 식별정보를 포함하고,
    상기 제2쓰기명령은 {제2스트림 아이디, 제2에포크 아이디}를 갖는 제2스트림 식별정보를 포함하고,
    상기 제3쓰기명령은 {제1스트림 아이디, 제4에포크 아이디}를 갖는 제4스트림 식별정보를 포함하며,
    상기 제3쓰기명령과 상기 제2쓰기명령간의 실행순서는, 상기 제3에포크 아이디와 상기 제2에포크 아이디 간의 우선순위, 그리고 상기 제1에포크 아이디와 상기 제4에포크 아이디 간의 우선순위에 의해 결정되는,
    저장장치.
PCT/KR2021/017786 2020-11-27 2021-11-29 다중 명령어 큐 스토리지에서 순서 보장 단위를 정하는 방법 및 장치 WO2022114900A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/255,560 US20240094954A1 (en) 2020-11-27 2021-11-29 Method and device for determining order guarantee unit in multi-instruction queue storage

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20200162262 2020-11-27
KR10-2020-0162262 2020-11-27

Publications (1)

Publication Number Publication Date
WO2022114900A1 true WO2022114900A1 (ko) 2022-06-02

Family

ID=81756222

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/017786 WO2022114900A1 (ko) 2020-11-27 2021-11-29 다중 명령어 큐 스토리지에서 순서 보장 단위를 정하는 방법 및 장치

Country Status (3)

Country Link
US (1) US20240094954A1 (ko)
KR (1) KR20220074805A (ko)
WO (1) WO2022114900A1 (ko)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140006701A1 (en) * 2008-10-24 2014-01-02 Microsoft Corporation Hardware and Operating System Support for Persistent Memory On A Memory Bus
WO2016071743A1 (en) * 2014-11-07 2016-05-12 Elliptic Technologies Inc. Integrity protection for data storage
KR20170026926A (ko) * 2015-08-31 2017-03-09 삼성전자주식회사 데이터 양에 기초하여 복수의 데이터 스트림을 관리하도록 구성되는 스토리지 장치

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140006701A1 (en) * 2008-10-24 2014-01-02 Microsoft Corporation Hardware and Operating System Support for Persistent Memory On A Memory Bus
WO2016071743A1 (en) * 2014-11-07 2016-05-12 Elliptic Technologies Inc. Integrity protection for data storage
KR20170026926A (ko) * 2015-08-31 2017-03-09 삼성전자주식회사 데이터 양에 기초하여 복수의 데이터 스트림을 관리하도록 구성되는 스토리지 장치

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PRVULOVIC MILOS, JOSHI ARPIT, NAGARAJAN VIJAY, CINTRA MARCELO, VIGLAS STRATIS: "Efficient persist barriers for multicores", PROCEEDINGS OF THE 48TH INTERNATIONAL SYMPOSIUM ON MICROARCHITECTURE, MICRO-48, ACM PRESS, NEW YORK, NEW YORK, USA, 5 December 2015 (2015-12-05), New York, New York, USA , pages 660 - 671, XP055938080, ISBN: 978-1-4503-4034-2, DOI: 10.1145/2830772.2830805 *
YAN MENGJIA; CHOI JIHO; SKARLATOS DIMITRIOS; MORRISON ADAM; FLETCHER CHRISTOPHER; TORRELLAS JOSEP: "InvisiSpec: Making Speculative Execution Invisible in the Cache Hierarchy", 2018 51ST ANNUAL IEEE/ACM INTERNATIONAL SYMPOSIUM ON MICROARCHITECTURE (MICRO), IEEE, 20 October 2018 (2018-10-20), pages 428 - 441, XP033473315, DOI: 10.1109/MICRO.2018.00042 *

Also Published As

Publication number Publication date
US20240094954A1 (en) 2024-03-21
KR20220074805A (ko) 2022-06-03

Similar Documents

Publication Publication Date Title
WO2015020471A1 (en) Method and apparatus for distributing data in hybrid cloud environment
WO2014044136A1 (zh) 基于分布式数据的并发处理方法、系统和计算机存储介质
WO2015041436A1 (en) Method of managing control right, client device therefor, and master device therefor
WO2016186463A1 (en) Method for launching a second application using a first application icon in an electronic device
WO2016171401A1 (ko) 공동 편집 문서를 공유하는 방법 및 장치
WO2018076868A1 (zh) 一种数据同步方法、装置、系统、存储介质和服务器
WO2021075671A1 (ko) 중앙 네트워크 구성개체 및 이를 포함하는 시간 민감 네트워크 제어 시스템
WO2020119117A1 (zh) 分布式计算方法、装置、系统、设备及可读存储介质
WO2018076433A1 (zh) 多开应用程序方法、多开应用程序装置及终端
WO2017111197A1 (ko) 학습 분석에서 빅데이터 시각화 시스템 및 방법
WO2016148449A1 (ko) 공유 리소스 액세스 중재 방법 및 이를 수행하기 위한 공유 리소스 액세스 중재 장치 및 공유 리소스 액세스 중재 시스템
WO2018166098A1 (zh) 数据稽核方法、装置、移动终端及计算机可读存储介质
WO2021012481A1 (zh) 系统性能监控方法、装置、设备及存储介质
WO2018120680A1 (zh) 虚拟磁盘备份系统、方法、装置、服务主机和存储介质
WO2021070983A1 (ko) Vr 훈련 시스템 및 방법
WO2022114900A1 (ko) 다중 명령어 큐 스토리지에서 순서 보장 단위를 정하는 방법 및 장치
WO2019168265A1 (ko) 전자 장치, 전자 장치의 태스크 처리 방법 및 컴퓨터 판독 가능 매체
WO2021070984A1 (ko) Vr 훈련 시스템 및 방법
WO2021141441A1 (ko) 스크래핑 기반 서비스 제공 방법 및 이를 수행하는 어플리케이션
WO2020017882A1 (ko) 복수의 디스플레이장치를 포함하는 시스템 및 그 제어방법
WO2021085786A1 (ko) 집적 회로 및 그것을 포함하는 시스템 제어 장치
WO2014092293A1 (ko) 사용자의 입력에 즉각적인 결과를 제공할 수 있는 서비스 제공 방법, 이를 위한 시스템 및 장치
WO2019245247A1 (en) Method for object management using trace identifier, apparatus for the same, computer program for the same, and recording medium storing computer program thereof
WO2022124507A1 (ko) 시대 기반 메모리 수집 기법과 포인터 기반 메모리 수집 기법 혼합을 위한 컴퓨터 시스템 및 그의 방법
WO2016023509A1 (zh) 呈现文件的方法和文件呈现装置

Legal Events

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

Ref document number: 21898725

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18255560

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21898725

Country of ref document: EP

Kind code of ref document: A1