[go: up one dir, main page]

CN105389268B - Data storage system and operation method thereof - Google Patents

Data storage system and operation method thereof Download PDF

Info

Publication number
CN105389268B
CN105389268B CN201410447173.8A CN201410447173A CN105389268B CN 105389268 B CN105389268 B CN 105389268B CN 201410447173 A CN201410447173 A CN 201410447173A CN 105389268 B CN105389268 B CN 105389268B
Authority
CN
China
Prior art keywords
data
write
command
unit
cache
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201410447173.8A
Other languages
Chinese (zh)
Other versions
CN105389268A (en
Inventor
吴明晃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jianxing Storage Technology Co Ltd
Original Assignee
Lite On Technology Corp
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 Lite On Technology Corp filed Critical Lite On Technology Corp
Priority to CN201410447173.8A priority Critical patent/CN105389268B/en
Priority to US14/594,163 priority patent/US20160070648A1/en
Publication of CN105389268A publication Critical patent/CN105389268A/en
Application granted granted Critical
Publication of CN105389268B publication Critical patent/CN105389268B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0868Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/21Employing a record carrier using a specific recording technology
    • G06F2212/214Solid state disk
    • G06F2212/2146Solid state disk being detachable, e.g.. USB memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

一种资料储存系统及其运作方法。资料储存系统包括一资料储存单元、一快取单元及一资料存取单元。资料存取单元耦接资料储存单元及快取单元。当资料存取单元接收到来自一主机的一资料写入指令时,资料存取单元用以于资料写入指令中的一写入资料储存于快取单元后回复主机一写入完成指令,将资料写入指令排入一资料写入排程表,以及依据资料写入排程表将写入资料由快取单元读出并写入至资料储存单元。

A data storage system and its operation method. The data storage system includes a data storage unit, a cache unit and a data access unit. The data access unit is coupled to the data storage unit and the cache unit. When the data access unit receives a data write command from a host, the data access unit is used to reply to the host with a write completion command after a write data in the data write command is stored in the cache unit, the data write command is put into a data write schedule, and the write data is read from the cache unit and written to the data storage unit according to the data write schedule.

Description

资料储存系统及其运作方法Data storage system and method of operation

技术领域technical field

本发明是有关于一种资料储存系统及其运作方法,且特别是有关于一种具有分段处理资料写入指令的资料储存系统及其运作方法。The present invention relates to a data storage system and its operation method, and in particular to a data storage system with segment processing data writing instructions and its operation method.

背景技术Background technique

在目前,市面上的大量储存装置主要可分为以磁头和磁盘组成的传统硬盘(HardDriver disk,HDD)以及以非挥发性存储器(non-volatile memory)组成的固态硬盘(SolidState Disk,SSD)。一般而言,当接收到主机发出的资料写入指令时,储存装置需确认资料已完全写入主要储存单元(磁盘或非挥发性存储器)后,才能回复写入完成指令给主机。而主机于接收到写入完成指令后,才会发出下一个指令给储存装置。然而,将资料完全写入主要储存单元(磁盘或非挥发性存储器)需要花费较长的时间,如此将影响计算机系统的整体效能,因此如何同时提高资料的访问速度及安全性仍是设计储存装置的一个重点。At present, mass storage devices on the market can be mainly divided into traditional hard disks (HardDriver disk, HDD) composed of magnetic heads and magnetic disks, and solid state disks (SolidState Disk, SSD) composed of non-volatile memory. Generally speaking, when receiving a data write command from the host, the storage device needs to confirm that the data has been completely written into the main storage unit (disk or non-volatile memory) before replying to the host with a write completion command. The host will send the next command to the storage device after receiving the writing completion command. However, it takes a long time to completely write data into the main storage unit (disk or non-volatile memory), which will affect the overall performance of the computer system. Therefore, how to improve the access speed and security of data at the same time is still an important issue in the design of storage devices. a key point.

发明内容Contents of the invention

本发明提供一种资料储存系统及其运作方法,其通过资料存取单元来分段处理资料写入指令,以增进资料储存系统的资料读写效率,并可大幅减少资料储存系统的资料遗失量,以提高资料储存系统的资料储存可靠性。The present invention provides a data storage system and its operation method, which uses a data access unit to process data writing instructions in segments, so as to improve the data reading and writing efficiency of the data storage system, and can greatly reduce the amount of data loss in the data storage system , to improve the data storage reliability of the data storage system.

本发明的资料储存系统包括一资料储存单元、一快取单元及一资料存取单元。资料存取单元耦接资料储存单元及快取单元。当资料存取单元接收到来自一主机的一资料写入指令时,资料存取单元用以于资料写入指令中的一写入资料储存于快取单元后回复主机一写入完成指令,将资料写入指令排入一资料写入排程表,以及依据资料写入排程表将写入资料由快取单元读出并写入至资料储存单元。The data storage system of the present invention includes a data storage unit, a cache unit and a data access unit. The data access unit is coupled to the data storage unit and the cache unit. When the data access unit receives a data write command from a host, the data access unit is used to store a write data in the data write command in the cache unit and then reply the host with a write completion command, and The data write command is entered into a data write schedule, and the write data is read from the cache unit and written into the data storage unit according to the data write schedule.

在本发明的一实施例中,资料存取单元具有一快取资料对应表及一资料写入排程表,其中快取资料对应表用以记录快取单元中所储存的写入资料的一对应地址信息,资料写入排程表用以对资料写入指令进行写入排程。In one embodiment of the present invention, the data access unit has a cache data correspondence table and a data writing schedule table, wherein the cache data correspondence table is used to record a data write data stored in the cache unit Corresponding to the address information, the data writing schedule table is used to schedule the writing of the data writing command.

在本发明的一实施例中,资料存取单元依据写入资料对应的一逻辑地址以及写入资料储存于快取单元的一实体地址更新快取资料对应表。In an embodiment of the present invention, the data access unit updates the cache data correspondence table according to a logical address corresponding to the written data and a physical address of the written data stored in the cache unit.

在本发明的一实施例中,资料存取单元依据写入资料对应的逻辑地址查询快取资料对应表,以取得写入资料储存于快取单元的实体地址。In an embodiment of the present invention, the data access unit queries the cache data correspondence table according to the logical address corresponding to the written data, so as to obtain the physical address of the written data stored in the cache unit.

在本发明的一实施例中,当资料存取单元接收到来自主机的接收到一资料读取指令时,资料存取单元通过快取资料对应表确认资料读取指令所要读取的一读取资料是否储存于快取单元。当读取资料储存于快取单元时,则资料存取单元自快取单元读出读取资料。当读取资料未储存于快取单元时,则资料存取单元自资料储存单元读出读取资料。In an embodiment of the present invention, when the data access unit receives a data read instruction from the host, the data access unit confirms a read to be read by the data read instruction through the cache data correspondence table. Whether the data is stored in the cache unit. When the read data is stored in the cache unit, the data access unit reads the read data from the cache unit. When the read data is not stored in the cache unit, the data access unit reads the read data from the data storage unit.

在本发明的一实施例中,当资料存取单元回复写入完成指令时,对应于写入完成指令的资料写入指令中的写入资料尚未写入于资料储存单元。In an embodiment of the present invention, when the data access unit replies with the write completion command, the written data in the data write command corresponding to the write complete command has not been written into the data storage unit.

本发明的资料储存系统的运作方法,包括下列步骤。接收来自一主机的一资料写入指令。于资料写入指令的一写入资料储存于一快取单元后,回复一写入完成指令至主机。将资料写入指令排入一资料写入排程表。依据资料写入排程表将写入资料由快取单元读出并写入至一资料储存单元。The operation method of the data storage system of the present invention includes the following steps. Receive a data writing command from a host. After a write data of the data write command is stored in a cache unit, a write completion command is returned to the host. Schedule data write commands into a data write schedule. The write data is read from the cache unit and written into a data storage unit according to the data write schedule.

在本发明的一实施例中,资料储存系统的运作方法还包括:于该资料写入指令的一写入资料储存于一快取单元后,记录该写入资料的一逻辑地址及该写入资料储存于该快取单元的一实体地址于一快取资料表。In an embodiment of the present invention, the operation method of the data storage system further includes: after a write data of the data write command is stored in a cache unit, recording a logical address of the write data and the write data Data is stored in a physical address of the cache unit in a cache data table.

在本发明的一实施例中,资料储存系统的运作方法还包括:依据写入资料对应的一逻辑地址查询快取资料对应表,以取得写入资料储存于快取单元的一实体地址。In an embodiment of the present invention, the operation method of the data storage system further includes: querying the cache data correspondence table according to a logical address corresponding to the written data to obtain a physical address of the written data stored in the cache unit.

在本发明的一实施例中,资料储存系统的运作方法还包括:接收来自一主机的一资料读取指令;通过快取资料表格确认资料读取指令所要读取的一读取资料是否储存于快取单元;当读取资料储存于快取单元时,则资料存取单元自快取单元读出读取资料;以及,当读取资料未储存于快取单元时,则资料存取单元自资料储存单元读出读取资料。In an embodiment of the present invention, the operation method of the data storage system further includes: receiving a data read command from a host; checking whether a read data to be read by the data read command is stored in the cache data table A cache unit; when the read data is stored in the cache unit, the data access unit reads the read data from the cache unit; and, when the read data is not stored in the cache unit, the data access unit automatically The data storage unit reads out the read data.

基于上述,本发明实施例的资料储存系统及其运作方法,其资料存取单元在写入资料储存于快取单元后即回复写入完成指令至主机,由此可有效地提升主机的处理速度,并进而增进资料储存系统的资料读写效率。再者,资料储存系统于背景处理时逐步将写入资料由快取单元写入至资料储存单元,如此可大幅减少资料储存系统的资料遗失量,并提高资料储存系统的资料储存可靠性。Based on the above, in the data storage system and its operation method according to the embodiment of the present invention, the data access unit will reply the write completion command to the host after writing the data and storing it in the cache unit, thereby effectively improving the processing speed of the host , and further improve the data read and write efficiency of the data storage system. Furthermore, the data storage system gradually writes the written data from the cache unit to the data storage unit during background processing, which can greatly reduce the amount of data loss in the data storage system and improve the reliability of data storage in the data storage system.

附图说明Description of drawings

为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合所附附图作详细说明如下,其中:In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail in conjunction with the attached drawings as follows, wherein:

图1为依据本发明一实施例的资料储存系统的系统示意图。FIG. 1 is a schematic diagram of a data storage system according to an embodiment of the present invention.

图2为依据本发明一实施例的资料储存系统的运作方法的流程图。FIG. 2 is a flow chart of the operation method of the data storage system according to an embodiment of the invention.

具体实施方式Detailed ways

图1为依据本发明一实施例的资料储存系统的系统示意图。请参照图1,在本实施例中,资料储存系统100包括资料储存单元110、快取单元120及资料存取单元130,其中资料储存单元110为资料储存系统100的主要储存单元,用以储存用户资料,且当资料储存系统100断电时,资料储存单元110内的储存资料不会消失。资料储存单元110例如包括硬盘及/或固态硬盘,但本发明实施例并不以此为限,资料储存单元110亦可为采用其他资料储存技术的储存装置。快取单元120用以暂时储存用户资料,其中快取单元120的资料访问速度高于资料储存单元110,且当资料储存系统100断电时,快取单元120内的储存资料将会消失。FIG. 1 is a schematic diagram of a data storage system according to an embodiment of the present invention. Please refer to FIG. 1, in this embodiment, the data storage system 100 includes a data storage unit 110, a cache unit 120, and a data access unit 130, wherein the data storage unit 110 is the main storage unit of the data storage system 100 for storing User data, and when the data storage system 100 is powered off, the stored data in the data storage unit 110 will not disappear. The data storage unit 110 includes, for example, a hard disk and/or a solid state disk, but the embodiment of the present invention is not limited thereto, and the data storage unit 110 may also be a storage device using other data storage technologies. The cache unit 120 is used for temporarily storing user data, wherein the data access speed of the cache unit 120 is higher than that of the data storage unit 110, and when the data storage system 100 is powered off, the stored data in the cache unit 120 will disappear.

在本实施例中,资料存取单元130耦接资料储存单元110及快取单元120,并且资料存取单元130内包含快取资料对应表132及资料写入排程表134,其中快取资料对应表132用以记录快取单元120中所储存的写入资料的对应地址信息,资料写入排程表134用以对接收到的资料写入指令进行排程。资料存取单元130用以依据接收到的资料读取指令或资料写入指令进行对应的系统运作。上述的系统运作包含但不限于回复接收到的资料写入指令、建立/更新快取资料对应表、建立/更新资料写入排程表、以及确保写入资料正确性等。以下将分别针对资料储存系统100接收到资料读取指令及资料写入指令时的运作方法作进一步的说明。In this embodiment, the data access unit 130 is coupled to the data storage unit 110 and the cache unit 120, and the data access unit 130 includes a cache data correspondence table 132 and a data writing schedule table 134, wherein the cache data The correspondence table 132 is used to record the corresponding address information of the write-in data stored in the cache unit 120 , and the data-write schedule table 134 is used to schedule the received data-write commands. The data access unit 130 is used for performing corresponding system operations according to the received data read command or data write command. The above-mentioned system operations include but are not limited to replying to received data writing commands, creating/updating cache data correspondence tables, creating/updating data writing schedules, and ensuring correctness of written data, etc. The operation methods when the data storage system 100 receives the data read command and the data write command will be further described below.

请参照图1,当资料储存系统100接收到由主机200发出的资料写入指令CWR时,资料储存系统100会将资料写入指令CWR中的写入资料DW储存于快取单元120中。同时,当资料存取单元130接收到资料写入指令CWR时,资料存取单元130会直接回复写入完成指令WRD给主机200,并且将当次的资料写入指令CWR更新至资料写入排程表134内。当主机200接收到写入完成指令WRD时,主机200便可再发出下一个指令给资料储存系统100。若主机200发出的下一个指令仍为资料写入指令CWR时,资料储存系统100会依据上述的运作流程将写入资料DW先储存于快取单元120中,同时资料存取单元130会直接回复写入完成指令WRD给主机200,并且将当次的资料写入指令CWR更新至资料写入排程表134内。Referring to FIG. 1 , when the data storage system 100 receives a data write command CWR issued by the host 200 , the data storage system 100 stores the written data DW in the data write command CWR in the cache unit 120 . At the same time, when the data access unit 130 receives the data write command CWR, the data access unit 130 will directly reply the write completion command WRD to the host 200, and update the current data write command CWR to the data write queue. schedule 134. When the host 200 receives the write completion command WRD, the host 200 can then send the next command to the data storage system 100 . If the next command issued by the host 200 is still the data write command CWR, the data storage system 100 will first store the written data DW in the cache unit 120 according to the above-mentioned operation process, and the data access unit 130 will directly reply The write completion command WRD is sent to the host 200 , and the current data write command CWR is updated into the data write schedule 134 .

通过上述运作流程,主机200无须实际等待资料储存系统100将写入资料DW储存至资料储存单元110的写入时间,因此可有效地提升主机200的处理速度,并进而增进资料储存系统100的资料读写效率。Through the above operation process, the host 200 does not need to actually wait for the data storage system 100 to store the write data DW to the data storage unit 110, so the processing speed of the host 200 can be effectively improved, and the data storage system 100 can further increase the data storage capacity. Read and write efficiency.

再者,在主机200发出的资料写入指令CWR中,除了包含写入资料DW之外,其还包含写入资料DW对应的逻辑地址。在本实施例中,当资料储存系统100将资料写入指令CWR中的写入资料DW储存于快取单元120后,资料存取单元130会依据写入资料DW对应的逻辑地址以及写入资料DW储存于快取单元120的实体地址来建立/更新快取资料对应表132。换句话说,快取资料对应表132用以记录各个资料写入指令CWR中的写入资料DW对应的逻辑地址以及写入资料DW储存于快取单元120的实体地址。Furthermore, the data writing command CWR issued by the host 200 includes not only writing the data DW, but also including the logical address corresponding to the writing data DW. In this embodiment, after the data storage system 100 stores the write data DW in the data write command CWR in the cache unit 120, the data access unit 130 will The physical address of the DW stored in the cache unit 120 is used to create/update the cache data mapping table 132 . In other words, the cache data mapping table 132 is used to record the logical address corresponding to the write data DW in each data write command CWR and the physical address of the write data DW stored in the cache unit 120 .

依据上述,当资料存取单元130接收到资料写入指令CWR,并直接回复写入完成指令WRD给主机200后,资料存取单元130会将接收到的资料写入指令CWR依序排入资料写入排程表134内,并依据资料写入排程表134依序将资料写入指令CWR对应的写入资料DW由快取单元120读出并写入资料储存单元110中。在本发明的一实施例中,各个资料写入指令CWR所对应的写入资料DW可利用对应的逻辑地址来查询快取资料对应表132,以找出对应的写入资料DW储存于快取单元120的实体地址。接着,资料存取单元130可通过找出的实体地址来从快取单元120中读出对应的写入资料DW并将其写入资料储存单元110中。According to the above, when the data access unit 130 receives the data write command CWR and directly replies the write complete command WRD to the host 200, the data access unit 130 will sequentially arrange the received data write command CWR into the data Write into the schedule table 134 , and sequentially read the write data DW corresponding to the data write command CWR from the cache unit 120 and write into the data storage unit 110 according to the data write schedule table 134 . In an embodiment of the present invention, the write data DW corresponding to each data write command CWR can use the corresponding logical address to query the cache data correspondence table 132 to find out the corresponding write data DW to be stored in the cache The physical address of unit 120. Then, the data access unit 130 can read the corresponding written data DW from the cache unit 120 through the found physical address and write it into the data storage unit 110 .

在本发明实施例中,资料储存系统100通过资料存取单元130将对应于资料写入指令CWR所进行的资料写入处理分为前景处理及背景处理。在前景处理中,于接收到资料写入指令CWR后,资料储存系统100先将写入资料DW储存在快取单元120中,并在将写入资料DW写入资料储存单元110之前,直接回复主机200写入完成指令WRD,以维持资料储存系统100与主机200之间的处理速度及资料读写效率。同时,在前景处理中,资料存取单元130会依据接收到的资料写入指令CWR的接收顺序建立资料写入排程表134,并于快取资料对应表132纪录对应的相关地址信息,以便于进行后续的背景处理。In the embodiment of the present invention, the data storage system 100 divides the data writing process corresponding to the data writing command CWR into foreground processing and background processing through the data access unit 130 . In the foreground processing, after receiving the data write command CWR, the data storage system 100 first stores the written data DW in the cache unit 120, and before writing the written data DW into the data storage unit 110, directly returns The host 200 writes the completion command WRD to maintain the processing speed and data read/write efficiency between the data storage system 100 and the host 200 . At the same time, in the foreground processing, the data access unit 130 will create a data write schedule table 134 according to the receiving order of the received data write commands CWR, and record the corresponding relevant address information in the cache data corresponding table 132, so that for subsequent background processing.

依据上述,虽然在前景处理时,资料储存系统100已经直接回复主机200写入完成指令WRD,然而写入资料DW实际上尚未被写入资料储存单元110中。在本发明实施例中,写入资料DW是于背景处理时被写入资料储存单元110中。在背景处理中,资料储存系统100会依据资料写入排程表134逐步处理之前接收到的资料写入指令CWR,并通过快取资料对应表132由快取单元120中读出对应的写入资料DW,并将写入资料DW写入资料储存单元110中。由于资料储存系统100持续将写入资料DW由快取单元120写入至资料储存单元110,所以当断电发生时,虽然快取单元120内的写入资料DW会消失,但由于快取单元120中的写入资料DW已在背景处理时被写入资料储存单元110,因此可大幅减少写入资料DW资料的遗失量,以提高资料储存系统100的资料储存可靠性。According to the above, although the data storage system 100 has directly responded to the host 200 with the write completion command WRD during the foreground processing, the written data DW has not actually been written into the data storage unit 110 . In the embodiment of the present invention, the written data DW is written into the data storage unit 110 during background processing. In the background processing, the data storage system 100 will gradually process the previously received data write command CWR according to the data write schedule table 134, and read the corresponding write command CWR from the cache unit 120 through the cache data correspondence table 132. data DW, and write the data DW into the data storage unit 110 . Since the data storage system 100 continues to write the written data DW from the cache unit 120 to the data storage unit 110, when a power failure occurs, although the written data DW in the cache unit 120 will disappear, but due to the cache unit The written data DW in 120 has been written into the data storage unit 110 during background processing, so the data loss of the written data DW can be greatly reduced, so as to improve the data storage reliability of the data storage system 100 .

在本发明实施例中,前景处理及背景处理可同时进行或是交错进行。再者,亦可考虑资料储存系统100的运作状态,例如:忙碌或空闲状态,来决定背景处理的启动时机,以在不影响资料储存系统100的运作效率下执行将写入资料DW实际写入资料储存单元110的背景处理。In the embodiment of the present invention, foreground processing and background processing can be performed simultaneously or interleaved. Furthermore, the operating status of the data storage system 100 may also be considered, such as: busy or idle status, to determine the start timing of the background processing, so as to execute the actual writing of the written data DW without affecting the operating efficiency of the data storage system 100. Background processing of the data storage unit 110 .

在本发明另一实施例中,资料存取单元130可于将写入资料DW写入资料储存单元110前先进行资料正确性检查。在背景处理中,资料储存系统100会依据资料写入排程表134逐步处理之前接收到的资料写入指令CWR,由于接收到的资料写入指令CWR皆被依序排入资料写入排程表134,而较晚接收到的资料写入指令CWR的指令内容有可能包含更新较早接收到的资料写入指令CWR的写入资料,因此在将写入资料DW写入资料储存单元110前,资料存取单元130可先确认后续的资料写入指令CWR是否有对资料写入排程表134中较早的资料写入指令CWR进行更新,亦即确认资料写入指令CWR是否对当前的写入资料DW进行更新,进而决定是否直接读取更新的写入资料DW,并直接将更新的写入资料DW写入资料储存单元110。如此,除了可以确保资料正确性之外,亦可省去对应同一逻辑地址的写入资料DW的重复写入时间。In another embodiment of the present invention, the data access unit 130 may perform a data correctness check before writing the write data DW into the data storage unit 110 . In the background processing, the data storage system 100 will gradually process the previously received data write commands CWR according to the data write schedule table 134, because the received data write commands CWR are all sequentially entered into the data write schedule Table 134, and the command content of the data write command CWR received later may include updating the write data of the data write command CWR received earlier, so before writing the write data DW into the data storage unit 110 , the data access unit 130 can first confirm whether the subsequent data write command CWR has updated the earlier data write command CWR in the data write schedule 134, that is, confirms whether the data write command CWR has updated the current data write command CWR. The written data DW is updated, and then it is determined whether to directly read the updated written data DW, and directly write the updated written data DW into the data storage unit 110 . In this way, in addition to ensuring the correctness of the data, the repeated writing time of writing the data DW corresponding to the same logical address can also be saved.

举例而言,假设资料储存系统100先后接收到第一资料写入指令CWR1及第二资料写入指令CWR2,其中第一资料写入指令CWR1的指令内容包含将第一写入资料DW1写入资料储存单元110,而第二资料写入指令CWR2的指令内容包含将第一写入资料DW1更新为第二写入资料DW2。在前景处理中,资料存取单元130会分别将第一写入资料DW1及第二写入资料DW2储存于快取单元120,并将对应的相关地址信息纪录于快取资料对应表132。接着,资料存取单元130直接回复主机200写入完成指令WRD,并分别将第一资料写入指令CWR1及第二资料写入指令CWR2排入资料写入排程表134。For example, assume that the data storage system 100 successively receives the first data write command CWR1 and the second data write command CWR2, wherein the command content of the first data write command CWR1 includes writing the first data write DW1 into the data The storage unit 110, and the command content of the second data write command CWR2 includes updating the first write data DW1 to the second write data DW2. In the foreground processing, the data access unit 130 stores the first written data DW1 and the second written data DW2 in the cache unit 120 respectively, and records the corresponding relevant address information in the cache data mapping table 132 . Next, the data access unit 130 directly replies to the host 200 with the write completion command WRD, and respectively schedules the first data write command CWR1 and the second data write command CWR2 into the data write schedule 134 .

在背景处理中,资料存取单元130会依据资料写入排程表134逐步处理接收到的资料写入指令CWR。当进行处理第一资料写入指令CWR1时,资料存取单元130会确认资料写入排程表134内后续的资料写入指令CWR是否有对第一写入资料DW1进行更新,亦即确认是否有对应同一逻辑地址的资料写入指令CWR。当资料存取单元130发现第二资料写入指令CWR2的指令内容包含将第一写入资料DW1更新为第二写入资料DW2时,资料存取单元130可忽略第一资料写入指令CWR1而直接进行第二资料写入指令CWR2。此时,资料存取单元130通过快取资料对应表132将更新的第二写入资料DW2由快取单元120读出并写入资料储存单元110,亦即将第二资料写入指令CWR2取代第一资料写入指令CWR1,并且消除第二资料写入指令CWR2的原本资料排程。如此,可直接于资料储存单元110写入正确的更新资料(第二写入资料DW2),并省去原始写入资料DW(第一写入资料DW)的写入时间,进而提高资料储存系统100的读写效率及资料正确性。In the background processing, the data access unit 130 processes the received data write command CWR step by step according to the data write schedule 134 . When processing the first data write command CWR1, the data access unit 130 will confirm whether the subsequent data write command CWR in the data write schedule 134 has updated the first write data DW1, that is, confirm whether There is a data write command CWR corresponding to the same logical address. When the data access unit 130 finds that the instruction content of the second data write command CWR2 includes updating the first write data DW1 to the second write data DW2, the data access unit 130 can ignore the first data write command CWR1 and directly execute the second data writing command CWR2. At this time, the data access unit 130 reads the updated second write data DW2 from the cache unit 120 through the cache data correspondence table 132 and writes it into the data storage unit 110, that is, the second data write command CWR2 replaces the second data write command CWR2. A data write command CWR1, and cancel the original data schedule of the second data write command CWR2. In this way, the correct updated data (second written data DW2) can be directly written in the data storage unit 110, and the writing time of the original written data DW (first written data DW) can be saved, thereby improving the data storage system. 100% reading and writing efficiency and data accuracy.

在本发明实施例中,当资料储存系统100接收到由主机200发出的资料读取指令CRD时,资料存取单元130依据资料读取指令CRD欲读取的读取资料DR的逻辑地址来查询快取资料对应表132,以确认资料读取指令CRD所需要的读取资料DR是否储存于快取单元120中。当资料读取指令CRD所需要的读取资料DR储存于快取单元120中时,资料存取单元130会依据资料读取指令CRD欲读取的读取资料DR的逻辑地址自快取资料对应表132找到读取资料DR储存于快取单元120中的实体地址,以由快取单元120中读出资料读取指令CRD所需要的读取资料DR,并且直接回复资料读取指令CRD所需要的读取资料DR。当资料读取指令CRD所需要的读取资料DR未储存于快取单元120中时,资料存取单元130则存取资料储存单元110,以从资料储存单元110读出资料读取指令CRD所需要的读取资料DR,并且接着回复资料读取指令CRD所需要的读取资料DR。In the embodiment of the present invention, when the data storage system 100 receives the data read command CRD issued by the host computer 200, the data access unit 130 queries according to the logical address of the read data DR to be read by the data read command CRD The cache data correspondence table 132 is used to confirm whether the read data DR required by the data read command CRD is stored in the cache unit 120 . When the read data DR required by the data read command CRD is stored in the cache unit 120, the data access unit 130 will correspond from the cache data according to the logical address of the read data DR to be read by the data read command CRD. Table 132 finds the physical address of the read data DR stored in the cache unit 120, so as to read the read data DR required by the data read command CRD from the cache unit 120, and directly reply to the data read command CRD. The read data DR. When the read data DR required by the data read command CRD is not stored in the cache unit 120, the data access unit 130 then accesses the data storage unit 110 to read the data stored in the data read command CRD from the data storage unit 110. The required read data DR, and then reply the read data DR required by the data read command CRD.

图2为依据本发明一实施例的资料储存系统的运作方法的流程图。请参照图2,在本实施例中,资料储存系统的运作方法包括下列步骤。首先,判断主机是发出资料写入指令或资料读取指令(步骤S310)。若主机发出资料写入指令,则资料储存系统接收到资料写入指令(步骤S320)。接着,资料存取单元于资料写入指令的写入资料储存于快取单元后回复写入完成指令(步骤S330)。接着,资料存取单元将资料写入指令排入资料写入排程表(步骤S340)。接着,资料存取单元依据资料写入排程表将储存于快取单元中的写入资料读出并写入资料储存单元(步骤S350)。FIG. 2 is a flow chart of the operation method of the data storage system according to an embodiment of the invention. Please refer to FIG. 2 , in this embodiment, the operation method of the data storage system includes the following steps. First, it is determined whether the host sends a data writing command or a data reading command (step S310). If the host sends a data write command, the data storage system receives the data write command (step S320). Next, the data access unit replies with a write complete command after the data written in the data write command is stored in the cache unit (step S330 ). Next, the data access unit schedules the data write command into the data write schedule (step S340). Next, the data access unit reads out the writing data stored in the cache unit according to the data writing schedule and writes it into the data storage unit (step S350 ).

另一方面,若是主机发出资料读取指令,则资料储存系统接收到资料读取指令(步骤S360)。接着,资料存取单元确认资料读取指令所要读取的读取资料是否储存于快取单元(步骤S370)。当资料读取指令所要读取的读取资料是储存于快取单元中时,亦即步骤S370的判断结果为“是”,则资料存取单元自快取单元读出读取资料(步骤S380);反之,当资料读取指令所要读取的读取资料未储存于快取单元中时,亦即步骤S370的判断结果为“否”,则资料存取单元自资料储存单元读出读取资料(步骤S390)。其中,上述步骤S310、S320、S330、S340、S350、S360、S370、S380及S390的顺序为用以说明,本发明实施例不以此为限。并且,上述步骤S310、S320、S330、S340、S350、S360、S370、S380及S390的细节可参照图1实施例所示,在此则不再赘述。On the other hand, if the host sends a data read command, the data storage system receives the data read command (step S360). Next, the data access unit confirms whether the read data to be read by the data read command is stored in the cache unit (step S370). When the read data to be read by the data read instruction is stored in the cache unit, that is, the judgment result of step S370 is “Yes”, then the data access unit reads the read data from the cache unit (step S380 ); Conversely, when the read data to be read by the data read instruction is not stored in the cache unit, that is, the judgment result of step S370 is “no”, then the data access unit reads and reads the data from the data storage unit. data (step S390). Wherein, the order of the above steps S310, S320, S330, S340, S350, S360, S370, S380 and S390 is for illustration, and the embodiment of the present invention is not limited thereto. Moreover, details of the above steps S310, S320, S330, S340, S350, S360, S370, S380, and S390 may refer to the embodiment shown in FIG. 1 , and will not be repeated here.

综上所述,本发明实施例的资料储存系统及其运作方法,其资料存取单元在写入资料储存于快取单元后即回复写入完成指令至主机,由此可有效地提升主机的处理速度,并进而增进资料储存系统的资料读写效率。再者,资料储存系统于背景处理时逐步将写入资料由快取单元写入至资料储存单元,如此可大幅减少资料储存系统的资料遗失量,并提高资料储存系统的资料储存可靠性。To sum up, in the data storage system and its operation method of the embodiment of the present invention, the data access unit of the data access unit will reply the write completion command to the host after writing the data and storing it in the cache unit, thereby effectively improving the performance of the host. Processing speed, and thus improve the data read and write efficiency of the data storage system. Furthermore, the data storage system gradually writes the written data from the cache unit to the data storage unit during background processing, which can greatly reduce the amount of data loss in the data storage system and improve the reliability of data storage in the data storage system.

虽然本发明已以实施例揭露如上,然其并非用以限定本发明,任何所属技术领域中具有通常知识者,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,故本发明的保护范围当视后附的权利要求范围所界定的为准。Although the present invention has been disclosed as above with the embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims (10)

1.一种资料储存系统,包括:1. A data storage system comprising: 一资料储存单元;a data storage unit; 一快取单元;以及a cache unit; and 一资料存取单元,耦接该资料储存单元及该快取单元;a data access unit, coupled to the data storage unit and the cache unit; 其中,当该资料存取单元接收到来自一主机的一资料写入指令时,该资料存取单元用以于该资料写入指令中的一写入资料储存于该快取单元后回复该主机一写入完成指令,将该资料写入指令排入一资料写入排程表,以及依据该资料写入排程表将该写入资料由该快取单元读出并写入至该资料储存单元,Wherein, when the data access unit receives a data write command from a host, the data access unit is used to restore the host after a write data in the data write command is stored in the cache unit a write completion command, scheduling the data write command into a data write schedule, and reading the write data from the cache unit and writing it into the data storage according to the data write schedule unit, 其中,该资料写入排程表包含一第一资料写入指令的写入排程,以及排在该第一资料写入指令之后的至少一第二资料写入指令的写入排程,Wherein, the data writing schedule includes a writing schedule of a first data writing command, and a writing schedule of at least one second data writing command after the first data writing command, 其中,该资料存取单元于执行该第一资料写入指令的写入排程,以将该第一资料写入指令的一第一写入资料写入至该资料储存单元时,先进行一资料正确性检查,其中,该资料存取单元确认该第二资料写入指令中是否有对该第一写入资料进行更新,若有,则忽略该第一资料写入指令。Wherein, when the data access unit executes the write schedule of the first data write command to write a first write data of the first data write command into the data storage unit, it first performs a Data correctness check, wherein the data access unit confirms whether the first data write command is updated in the second data write command, and if so, ignores the first data write command. 2.如权利要求1所述的资料储存系统,其中该资料存取单元具有一快取资料对应表及该资料写入排程表,其中该快取资料对应表用以记录该快取单元中所储存的该写入资料的一对应地址信息,该资料写入排程表用以对该资料写入指令进行写入排程。2. The data storage system as claimed in claim 1, wherein the data access unit has a cache data correspondence table and the data write schedule table, wherein the cache data correspondence table is used to record the data in the cache unit A corresponding address information of the stored data is stored, and the data writing schedule table is used to schedule the writing of the data writing command. 3.如权利要求2所述的资料储存系统,其中该资料存取单元依据该写入资料对应的一逻辑地址以及该写入资料储存于该快取单元的一实体地址更新该快取资料对应表。3. The data storage system according to claim 2, wherein the data access unit updates the cache data corresponding to a logical address corresponding to the write data and a physical address of the write data stored in the cache unit. surface. 4.如权利要求3所述的资料储存系统,其中该资料存取单元依据该写入资料对应的该逻辑地址查询该快取资料对应表,以取得该写入资料储存于该快取单元的该实体地址。4. The data storage system according to claim 3, wherein the data access unit inquires the cache data correspondence table according to the logical address corresponding to the written data to obtain the data stored in the cache unit. The entity address. 5.如权利要求1所述的资料储存系统,其中当该资料存取单元接收到来自该主机的接收到一资料读取指令时,该资料存取单元确认该资料读取指令所要读取的一读取资料是否储存于该快取单元,当该读取资料储存于该快取单元时,则该资料存取单元自该快取单元读出该读取资料,当该读取资料未储存于该快取单元时,则该资料存取单元自该资料储存单元读出该读取资料。5. The data storage system according to claim 1, wherein when the data access unit receives a data read command from the host, the data access unit confirms that the data read command will read Whether the read data is stored in the cache unit. When the read data is stored in the cache unit, the data access unit reads the read data from the cache unit. When the read data is not stored When in the cache unit, the data access unit reads out the read data from the data storage unit. 6.如权利要求1所述的资料储存系统,其中当该资料存取单元回复该写入完成指令时,对应于该写入完成指令的该资料写入指令中的该写入资料尚未写入于该资料储存单元。6. The data storage system according to claim 1, wherein when the data access unit replies to the write completion command, the write data in the data write command corresponding to the write completion command has not been written in the data storage unit. 7.一种资料储存系统的运作方法,包括:7. An operation method of a data storage system, comprising: 接收来自一主机的一资料写入指令;receiving a data write command from a host; 于该资料写入指令的一写入资料储存于一快取单元后,回复一写入完成指令至该主机;After a write data of the data write command is stored in a cache unit, reply a write completion command to the host; 将该资料写入指令排入一资料写入排程表;以及scheduling the data write command into a data write schedule; and 依据该资料写入排程表将该写入资料由该快取单元读出并写入至一资料储存单元,reading the written data from the cache unit and writing it into a data storage unit according to the data writing schedule, 其中,该资料写入排程表包含一第一资料写入指令的写入排程,以及排在该第一资料写入指令之后的至少一第二资料写入指令的写入排程,Wherein, the data writing schedule includes a writing schedule of a first data writing command, and a writing schedule of at least one second data writing command after the first data writing command, 其中,于执行该第一资料写入指令的写入排程,以将该第一资料写入指令的一第一写入资料写入至该资料储存单元时,先进行一资料正确性检查,该资料正确性检查包含确认该第二资料写入指令中是否有对该第一写入资料进行更新,若有,则忽略该第一资料写入指令。Wherein, when executing the write schedule of the first data write command to write a first write data of the first data write command into the data storage unit, a data correctness check is performed first, The data correctness checking includes confirming whether the first data writing command is updated in the second data writing command, and if so, ignoring the first data writing command. 8.如权利要求7所述的资料储存系统的运作方法,其中于该资料写入指令的一写入资料储存于一快取单元后还包括:8. The operation method of the data storage system as claimed in claim 7, wherein after storing a write data of the data write command in a cache unit, further comprising: 记录该写入资料的一逻辑地址及该写入资料储存于该快取单元的一实体地址于一快取资料表。A logical address of the written data and a physical address of the written data stored in the cache unit are recorded in a cache data table. 9.如权利要求8所述的资料储存系统的运作方法,其中依据该资料写入排程表将该写入资料由该快取单元读出并写入至一资料储存单元还包括:9. The operation method of the data storage system according to claim 8, wherein reading the write data from the cache unit and writing the write data into a data storage unit according to the data write schedule further comprises: 依据该写入资料对应的该逻辑地址查询该快取资料对应表,以取得该写入资料储存于该快取单元的该实体地址。The cache data correspondence table is queried according to the logical address corresponding to the write data to obtain the physical address of the write data stored in the cache unit. 10.如权利要求7所述的资料储存系统的运作方法,其中当回复该写入完成指令时,对应于该写入完成指令的该资料写入指令中的该写入资料尚未写入于该资料储存单元。10. The operation method of the data storage system as claimed in claim 7, wherein when replying the write completion command, the write data in the data write command corresponding to the write completion command has not been written into the data storage unit.
CN201410447173.8A 2014-09-04 2014-09-04 Data storage system and operation method thereof Active CN105389268B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410447173.8A CN105389268B (en) 2014-09-04 2014-09-04 Data storage system and operation method thereof
US14/594,163 US20160070648A1 (en) 2014-09-04 2015-01-11 Data storage system and operation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410447173.8A CN105389268B (en) 2014-09-04 2014-09-04 Data storage system and operation method thereof

Publications (2)

Publication Number Publication Date
CN105389268A CN105389268A (en) 2016-03-09
CN105389268B true CN105389268B (en) 2018-08-28

Family

ID=55421572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410447173.8A Active CN105389268B (en) 2014-09-04 2014-09-04 Data storage system and operation method thereof

Country Status (2)

Country Link
US (1) US20160070648A1 (en)
CN (1) CN105389268B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160117179A1 (en) * 2014-10-24 2016-04-28 Advanced Micro Devices, Inc. Command replacement for communication at a processor
CN109101186A (en) * 2017-06-20 2018-12-28 上海宝存信息科技有限公司 Data memory device and data storage method
US11921637B2 (en) 2019-05-24 2024-03-05 Texas Instruments Incorporated Write streaming with cache write acknowledgment in a processor
US11734005B2 (en) 2021-07-04 2023-08-22 Mellanox Technologies, Ltd. Processor with split read
US12117944B2 (en) 2022-01-27 2024-10-15 Samsung Electronics Co., Ltd. Systems, methods, and devices for queue management with a coherent interface
US11847461B2 (en) * 2022-05-19 2023-12-19 Mellanox Technologies, Ltd. Out-of-order input / output write

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661431A (en) * 2008-08-29 2010-03-03 群联电子股份有限公司 Block management method for flash memory, flash storage system and controller
CN101996137A (en) * 2009-08-20 2011-03-30 威刚科技(苏州)有限公司 Memory device and data processing method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6253306B1 (en) * 1998-07-29 2001-06-26 Advanced Micro Devices, Inc. Prefetch instruction mechanism for processor
US6622235B1 (en) * 2000-01-03 2003-09-16 Advanced Micro Devices, Inc. Scheduler which retries load/store hit situations
EP3025237A4 (en) * 2013-07-26 2017-04-19 Intel Corporation Methods and apparatus for supporting persistent memory

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661431A (en) * 2008-08-29 2010-03-03 群联电子股份有限公司 Block management method for flash memory, flash storage system and controller
CN101996137A (en) * 2009-08-20 2011-03-30 威刚科技(苏州)有限公司 Memory device and data processing method thereof

Also Published As

Publication number Publication date
CN105389268A (en) 2016-03-09
US20160070648A1 (en) 2016-03-10

Similar Documents

Publication Publication Date Title
US10019196B2 (en) Efficient enforcement of command execution order in solid state drives
US9256384B2 (en) Method and system for reducing write latency in a data storage system by using a command-push model
CN105389268B (en) Data storage system and operation method thereof
US20130159626A1 (en) Optimized execution of interleaved write operations in solid state drives
US9348747B2 (en) Solid state memory command queue in hybrid device
CN103136108B (en) Flash memory device and data reading method thereof
US9639287B1 (en) Write command reporting
CN108710474A (en) A kind of date storage method, device and computer storage media
TW201917578A (en) Method for accessing flash memory module and associated flash memory controller and electronic device
CN106406750A (en) Data operation method and system
CN111124258B (en) Data storage method, device and equipment of full flash memory array and readable storage medium
CN106897311B (en) Database batch update method, data restoration log generation method and storage device
CN114610654B (en) A solid-state storage device and a method for writing data thereto
CN105573668B (en) A kind of date storage method and device
CN110658999B (en) Information updating method, device, equipment and computer readable storage medium
KR101569049B1 (en) Pass through storage devices
US9703497B2 (en) Storage system and storage control method
JP5953245B2 (en) Information processing system
CN109002265B (en) Data processing method and related device
US8949553B2 (en) System and method for retention of historical data in storage resources
CN112463041A (en) Processing method for host read-write data and related device
CN104143352B (en) A kind of flash disk and its method of work
KR102701385B1 (en) Operation method of Flash memory storage device
CN109542359B (en) Data reconstruction method, device, equipment and computer readable storage medium
CN111258982A (en) A kind of historical data storage management method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200102

Address after: 21 / F, 392 Ruiguang Road, Neihu district, Taipei, Taiwan, China

Patentee after: Jianxing Storage Technology Co., Ltd

Address before: Ruiguang road Taiwan Taipei City Neihu district China No. 392 22 floor

Patentee before: Lite-On Technology Corporation