WO2020168516A1 - Method and system for facilitating fast atomic write operations in shingled magnetic recording hard disk drives - Google Patents

Method and system for facilitating fast atomic write operations in shingled magnetic recording hard disk drives Download PDF

Info

Publication number
WO2020168516A1
WO2020168516A1 PCT/CN2019/075713 CN2019075713W WO2020168516A1 WO 2020168516 A1 WO2020168516 A1 WO 2020168516A1 CN 2019075713 W CN2019075713 W CN 2019075713W WO 2020168516 A1 WO2020168516 A1 WO 2020168516A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
zone
write
selected zone
write pointer
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.)
Ceased
Application number
PCT/CN2019/075713
Other languages
French (fr)
Inventor
Jianjian Huo
Cunyin CHANG
Zongpeng ZHU
Fei Liu
Shu Li
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to PCT/CN2019/075713 priority Critical patent/WO2020168516A1/en
Publication of WO2020168516A1 publication Critical patent/WO2020168516A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/0674Disk device
    • G06F3/0676Magnetic disk device

Definitions

  • This disclosure is generally related to the field of data storage. More specifically, this disclosure is related to a method and system for facilitating fast atomic write operations in shingled magnetic recording hard disk drives.
  • SSDs solid state drives
  • HDDs hard disk drives
  • Some examples of data stored in the warm and cold tiers include user-uploaded photos and videos, enterprise book-keeping data for long term archival purposes, and surveillance recordings.
  • the amount of data stored on these HDDs continues to increase at a rapid pace. In some instances, such data must be stored for 50 years or more.
  • SMR shingled magnetic recording
  • CMR magnetic recording
  • SMR HDD shingled magnetic recording
  • CMR magnetic recording
  • SMR HDD writes new tracks that overlap part of the previously written magnetic track.
  • the tracks partially overlap similar to roof “shingles. ”
  • a narrower track width can result in a higher track density and an increased storage capacity.
  • the SMR HDD has an increased areal density and a higher overall per-drive storage capacity, which can result in a decrease in both the storage price per Gigabyte and the total cost of ownership (TCO) .
  • One common requirement for current storage systems is the preservation of data integrity and consistency in the event of a node or network failure.
  • One method for preserving data integrity and consistency is logging, e.g., journaling.
  • the logging method can result in a significant performance degradation, as well as a high write amplification to the storage media.
  • Another method for preserving data integrity and consistency is based on atomic write operations.
  • One embodiment facilitates an atomic write operation.
  • the system receives a request to write data to a shingled magnetic recording drive.
  • the system selects at least one zone of the drive to which to write the data, wherein the drive stores a previous write pointer indicating a location of an end of a most recent successful write operation in a respective zone.
  • the system writes the data at a location of a current write pointer of the selected zone.
  • the system sets a previous write pointer of the selected zone to a location of an end of the successful write operation.
  • the system sets the current write pointer of the selected zone to a location indicated by the previous write pointer of the selected zone.
  • the data is written to the selected zone in a single atomic transaction, thereby facilitating the atomic write operation for successfully writing the data to the shingled magnetic recording drive.
  • the system allocates memory from memory pages for the data to be written, wherein the data is organized into segments and held in a page buffer.
  • a size of a memory page is greater than a first predetermined threshold, and a size of the page buffer is greater than a second predetermined threshold.
  • selecting the at least one zone comprises selecting a plurality of zones to which to write the data. Subsequent to successfully writing one or more segments of the data to the selected zone, the system identifies a next zone of the plurality of zones to which to write remaining segments of the data.
  • the system in response to successfully writing the data to the selected zone, sets the current write pointer of the selected zone to the location of the end of the successful write operation.
  • setting the current write pointer of the selected zone to the location indicated by the previous write pointer of the selected zone is further in response to detecting a failure during a startup or an initialization process.
  • the system in response to detecting the failure during the startup or initialization process: identifies at least one recovery zone on which to perform a recovery process; and the system sets a current write pointer of the identified recovery zone to a location indicated by a previous write pointer of the identified recovery zone.
  • FIG. 1 illustrates an exemplary environment which facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
  • FIG. 2 illustrates an exemplary environment which facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
  • FIG. 3 presents a flowchart illustrating a method for facilitating an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
  • FIG. 4 presents a flowchart illustrating a method for facilitating an atomic write operation in an SMR HDD, including handling a failure of a write operation, in accordance with an embodiment of the present application.
  • FIG. 5 illustrates an exemplary computer system that facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
  • FIG. 6 illustrates an exemplary apparatus that facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
  • the embodiments described herein at least solve the problem of preserving data integrity and consistency via one or more atomic write operations in a shingled magnetic recording (SMR) hard disk drive (HDD) by tracking both a previous write pointer and a current pointer for each zone of the SMR HDD, and, in addition to, or alternatively, by using a huge page-based memory allocation.
  • SMR shingled magnetic recording
  • HDD hard disk drive
  • HDDs For the warm and cold tier of storage, storage systems must store such data for 50 years or more.
  • One common requirement for current storage systems is the preservation of data integrity and consistency in the event of a node or network failure.
  • One method for preserving data integrity and consistency is logging, e.g., journaling.
  • journaling Because data is first logged to a specific location and then written to a main location in the storage media, the logging method can result in a significant performance degradation, as well as a high write amplification to the storage media.
  • Another method for preserving data integrity and consistency is based on atomic write operations. However, there is currently no support for atomic write operations in hard drives, including SMR HDDs.
  • the embodiments described herein address these challenges by providing a system which facilitates atomic write operations in an SMR HDD.
  • the system includes an integration of hardware and software.
  • the system can use a retrofitted zone write pointer mechanism.
  • Host-managed (HM) SMR HDDs include specific zones to which data is sequentially written, and the SMR HDD firmware typically maintains a write pointer for each zone.
  • the SMR HDD firmware can log or track a location of a previous write pointer (e.g., an end of a most recent successful write operation to a given zone) and can update the current write pointer for the zone only after a write operation to the zone has successfully completed.
  • the system can ensure the atomicity of a write operation to a given zone. That is, if a write operation is not successful (i.e., fails to successfully write the entire data to the given zone during the write operation) , the unsuccessful write operation does not have any effect. Thus, a partial write cannot occur because the firmware recognizes a zone as a written area based only on the location of the current write pointer, and the location (of the current write pointer) is not updated by the system until after the entire write operation has successfully completed.
  • An exemplary per zone atomic write is described below in relation to FIG. 2.
  • the embodiments described herein can also facilitate an atomic write across multiple zones, as described below in relation to FIG. 1.
  • the SMR HDD firmware can also disable the internal RAM write buffer associated with the zone, zones, and the SMR, to ensure the atomicity of each write operation.
  • this may result in decreasing the sequential write performance for each zone, and further result in an increased latency.
  • the HDD may spend more time waiting because there is no RAM buffering for incoming writes, and the operating system typically splits one huge zone write into many small 4 KB aligned write operations.
  • the embodiments described herein address this issue by providing, on the software side, a huge page-based memory allocation, as described below in relation to FIG. 1.
  • the embodiments described herein provide a system which improves the efficiency of a storage system, where the improvements are fundamentally technological.
  • the system provides a technological solution (by maintaining both the previous pointer and the current write pointer and by using a huge page-based memory allocation) to the technological problem of facilitating atomic write operations in SMR HDDs.
  • the system thus provides improvements to the technological field (and related technological applications) of the preservation of data integrity and consistency.
  • HM-SMR HDD A “host-managed shingled magnetic recording HDD” ( “HM-SMR HDD” ) adheres to a certain protocol required by the host.
  • the host can manage the shingled nature of the physical media, and writes data sequentially so as not to destroy existing data.
  • An “atomic write operation” refers to a write input/output (I/O) request which is performed in a storage media, and can be considered as atomic because the operation either fails or succeeds as a whole. That is, no partial write to the storage media can occur in performing an atomic write operation.
  • centroid page memory refers to a memory management method which manages large and fixed-length contiguous blocks of physical memory based on a single entry in a page table or other address mapping structure.
  • write amplification refers to an event associated with flash memory and SMR HDD, where the actual amount of information physically written to the storage media is a multiple of the logical amount intended to be written.
  • FIG. 1 illustrates an exemplary environment 100 which facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
  • Environment 100 can include software 102 and hardware 140.
  • Software 102 can include an I/O management stack 130, which can include, e.g., an I/O dispatch module 132, a polling and event module 134, and a device driver 136.
  • Software 102 can also include a huge page-based memory allocation 110, where memory is allocated to a huge chunk of data in segments corresponding to portions of huge pages.
  • Allocation 110 can include huge pages 120, 124, and 127.
  • Huge page 120 can include unused memory 121, 122, and 123 (as indicated by the white box of unused memory 192 in the index) .
  • huge page 124 can include unused memory 125 and 126
  • huge page 127 can include unused memory 128 and 129.
  • Huge page 120 can include portions which are allocated to corresponding segments of the data to be written, which can be stored in a per-zone I/O write buffer 111.
  • An allocated huge page memory segment can be indicated by a box with left-slanting diagonal lines, as indicated by an allocated huge page memory segment 191 in the index) .
  • a segment 1 112 of data to be written to the non-volatile memory can be allocated to a portion 113 of huge page 127; a segment 2 114 of the data to be written can be allocated to a portion 115 of huge page 120; a segment 3 116 of the data to be written can be allocated to a portion 117 of huge page 120; and a segment 4 118 of the data to be written can be allocated to a portion 119 of huge page 124.
  • the data of segments 1-4 (112-118) can be stored in a per zone I/O write buffer 111, and subsequently dispatched as I/O to be written to hardware 140.
  • the SMR HDD firmware can track and store the location of both the current write pointer and the previous write pointer.
  • the SMR HDD firmware can also disable the internal RAM write buffer associated with the zone (s) to ensure the atomicity of each write operation.
  • This may result in an increased latency due to decreasing the sequential write performance for each zone.
  • the embodiments described herein address this issue by providing, on the software side, huge page-based memory allocation 110.
  • Each per zone I/O write request can consist of multiple segments, e.g., segments 1-4 (112-118) , where each segment can correspond to a large chunk allocated from a huge memory page, which is typically in the unit of megabytes (MBs) , rather than kilobytes (KBs) .
  • a size of a huge memory page can be greater than a first predetermined threshold, and a size of the page buffer can be greater than a second predetermined threshold. These thresholds can be configured by the system or a user.
  • a host device can issue to the SMR HDD very large single write operations (e.g., up to a typical 256 MB zone size) .
  • hardware 140 can include a host-managed SMR HDD 141, which can include SMR HDD firmware 142 (e.g., installed in a controller or other component/module) .
  • SMR HDD 141 can also include multiple zones to which data is to be written for persistent storage, e.g., a zone 1 150, a zone 2 160, and a zone 3 170.
  • zone areas which are used or include valid and successfully written data are depicted as a shaded box (as indicated by the shaded box of a used/written area 193 in the index) .
  • Zone areas in which a current atomic write operation is occurring is depicted by a cross-filled box (as indicated by the cross-filled box of an atomic write area 194 in the index) .
  • Zone areas which are empty and available for writing to are depicted by a white box (as indicated by the white box of an empty area 195 in the index) .
  • An area of a zone may contain data, but may be considered as empty based on the location of the current write pointer, as described below in relation to FIG. 2.
  • Each zone maintains the location of two pointers: a previous write pointer ( “wp_prev” ) , which indicates a location of an end of a most recent successful write operation in a respective zone; and a current write pointer ( “wp_curr” ) , which indicates a location of where a write operation to the respective zone is to begin.
  • the locations of the pair of pointers for each zone in an SMR HDD can be stored in a data structure which is accessible by SMR HDD firmware 142.
  • SMR HDD firmware 142 Various methods may be used to ensure that the pointer locations are appropriately stored and accessible even in the event of a power failure. That is, the data structure may be stored in a volatile memory associated with a host device or with the HDD itself.
  • the system can flush the data structure to a non-volatile memory at periodic intervals. Flushing the data structure can also be based on a predetermined time threshold, the size of the data structure, a capacity of a specific zone or zones associated with storing the data structure, a user configuration, a frequency of access of the data stored in a respective zone, a time-related factor, or any factor.
  • the location of wp_prev and wp_curr can be at the same or different locations, depending on the status and progress of any atomic write operations.
  • environment 100 illustrates an atomic write operation of data (e.g., from per zone I/O write buffer 111) to multiple zones of SMR HDD 141.
  • a wp_curr 158 begins at a same location as a wp_prev 156 (as depicted below in relation to FIG. 2)
  • the atomic write operation begins at the location indicated by wp_prev 156.
  • the system can update the location of wp_curr 158 only after the data to be written to zone 1 150 has been successfully written to zone 1 150 (i.e., as data 152) , or only after all the data has been successfully written to zone 1 150, zone 2 160, and zone 3 170, if the atomic write operation is to be performed across multiple zones. That is, upon determining that the data has been successfully written to a respective zone (or zones, in the case of a write operation across multiple zones) , the system can set the location of wp_curr 158 to the end (as shown) of the successful write operation for data 152, and can also set the location of wp_prev 156 to the same end location (not shown) .
  • the atomic write operation can continue at the location indicated by wp_prev 166.
  • the system can update the location of wp_curr 168 only after the data to be written to zone 2 160 has been successfully written to zone 2 160 (i.e., as data 162) , and only after all the data has been successfully written to zone 1 150, zone 2 160, and zone 3 170 (assuming a multiple zone write) . That is, the system can set the location of wp_curr 168 to the end (as shown) of the successful write operation for data 162, and can also set the location of wp_prev 166 to the same end location (not shown) .
  • the atomic write operation can continue at the location indicated by wp_prev 176.
  • the system can update the location of wp_curr 178 only after the data to be written to zone 3 170 has been successfully written to zone 3 170 (i.e., as data 172) , and only after all the data has been successfully written to zone 1 150, zone 2 160, and zone 3 170 (assuming a multiple zone write) . That is, the system can set the location of wp_curr 178 to the end (as shown) of the successful write operation for data 172, and can also set the location of wp_prev 176 to the same end location (not shown) .
  • the system can set the location of wp_curr 158 to the location of wp_prev 156, such that the next sequential write to occur in zone 1 150 can begin at the location of the current write pointer, which is set to the location of the previous write pointer.
  • the system can set the location of the respective current pointers of each zone to the location of the previous pointer of each zone. For example, the system can set the location of wp_curr 158 to the location of wp_prev 156, set the location of wp_curr 168 to the location of wp_prev 166, and set the location of wp_curr 178 to the location of wp_prev 176.
  • the embodiments described herein can preserve the integrity and consistency of data by facilitating atomic write operations in SMR HDDs.
  • FIG. 2 illustrates an exemplary environment 200 which facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
  • zone areas which are used or include valid and successfully written data are depicted as a shaded box (as indicated by the shaded box of a used/written area 293 in the index) .
  • Zone areas in which a current atomic write operation is occurring is depicted by a cross-filled box (as indicated by the cross-filled box of an atomic write area (in process) 294 in the index) .
  • Zone areas which are empty and available for writing to are depicted by a white box (as indicated by the white box of an empty area 295 in the index) .
  • An area of a zone may contain data, but may be considered as empty based on the location of the current write pointer (again as indicated by the white box of a considered as empty area 296 in the index) .
  • Zone 1 210 can include a used area 202, an empty area 204, a wp_prev 216, and a wp_curr 218.
  • the location of wp_prev 216 and wp_curr 218 can be the same location.
  • the system can perform an atomic write operation (function 252) by writing data beginning at the location of wp_curr 218. That is, at a time T1, zone 1 210 can include data being written to area 206 (indicated as an in-process atomic write area) .
  • the location of the current write pointer may move during the atomic write operation 252, but if the atomic write operation 252 is not successful, the system can set the location of the current write pointer to the location of the previous write pointer. For example, if the atomic write operation is unsuccessful (determination 254) , at a time T2, the system can set the location of wp_curr 218 to the location of wp_prev 216. Note that area 206, the area to which the unsuccessful atomic write operation was in process, can be considered as an empty area based on the updated location of the current write pointer.
  • the system can set the location of the current write pointer to an end of the successful write operation.
  • area 206 is now indicated as a used/written area 206 (by the shaded box) .
  • the system can set the location of the previous write pointer to the end of the successful write operation, resulting in similar state as at time T0, where the location of wp_prev 216 and wp_curr 218 are at the same location.
  • FIG. 3 presents a flowchart 300 illustrating a method for facilitating an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
  • the system receives a request to write data to a shingled magnetic recording (SMR) drive (operation 302) .
  • the data can be written to a non-volatile memory of the SMR drive, such as the disk media (e.g., magnetic storage media) .
  • the system selects at least one zone of the SMR drive to which to write the data, wherein the SMR drive stores a previous write pointer indicating a location of an end of a most recent successful write operation in a respective zone (operation 304) .
  • the system writes the data at a location of a current write pointer of the selected zone (operation 306) .
  • the system If the system successfully writes the data to the selected zone (decision 308) , the system sets a previous write pointer of the selected zone to a location of an end of the successful write operation (operation 310) . The system can also set the current write pointer of the selected zone to the location of the end of the successful write operation (operation 312) .
  • the system sets the current write pointer of the selected zone to a location indicated by the previous write pointer of the selected zone (operation 314) .
  • the operation continues at operation 304. If the selected zone is the last zone to which the data is to be written (decision 320) , the system completes the request to write the data to the SMR drive (operation 322) , and the operation returns.
  • FIG. 4 presents a flowchart 400 illustrating a method for facilitating an atomic write operation in an SMR HDD, including handling a failure of a write operation, in accordance with an embodiment of the present application.
  • the system detects a failure during startup or during a write operation (operation 402) .
  • the system identifies at least one recovery zone on which to perform a recovery process (operation 404) .
  • the system sets a current write pointer of the identified recovery zone to a location indicated by a previous write pointer of the identified recovery zone (operation 406) .
  • the operation continues at operation 402. If the system determines that there are no remaining zones on which to perform recovery (decision 408) , the system completes the recovery process (operation 410) , and the operation returns.
  • FIG. 5 illustrates an exemplary computer system 500 that facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
  • Computer system 500 includes a processor 502, a controller 504, a volatile memory 506, and a storage device 508.
  • Volatile memory 506 can include, e.g., random access memory (RAM) , that serves as a managed memory, and can be used to store one or more memory pools.
  • Storage device 508 can include persistent storage which can be managed or accessed via controller 504. Controller 504 can include firmware which can be used to execute the instructions or methods described herein.
  • computer system 500 can be coupled to a display device 510, a keyboard 512, and a pointing device 514.
  • Storage device 508 can store an operating system 516, a content-processing system 518, and data 534.
  • Content-processing system 518 can include instructions, which when executed by computer system 500, can cause computer system 500 to perform methods and/or processes described in this disclosure. Specifically, content-processing system 518 can include instructions for receiving and transmitting data packets, including data, I/O data, a write request, data to be written to an SMR HDD, segments of data, and an indicator of a logical address, a physical address, a current write pointer location, and a previous write pointer location (communication module 520) .
  • data packets including data, I/O data, a write request, data to be written to an SMR HDD, segments of data, and an indicator of a logical address, a physical address, a current write pointer location, and a previous write pointer location (communication module 520) .
  • Content-processing system 518 can further include instructions for receiving a request to write data to a shingled magnetic recording drive (communication module 520) .
  • Content-processing system 518 can include instructions for selecting at least one zone of the drive to which to write the data, wherein the drive stores a previous write pointer indicating a location of an end of a most recent successful write operation in a respective zone (zone-selecting module 522) .
  • Content-processing system 518 can include instructions for writing the data at a location of a current write pointer of the selected zone (data-writing module 524) .
  • Content-processing system 518 can also include instructions for, in response to successfully writing the data to the selected zone (failure-detecting module 526) , setting a previous write pointer of the selected zone to a location of an end of the successful write operation (previous write pointer-managing module 528) .
  • Content-processing system 518 can include instructions for, in response to not successfully writing the data to the selected zone (failure-detecting module 526) , setting the current write pointer of the selected zone to a location indicated by the previous write pointer of the selected zone (current write pointer-managing module 530) .
  • Content-processing system 518 can additionally include instructions for allocating memory from memory pages for the data to be written, wherein the data is organized into segments and held in a page buffer (huge page memory-allocating module 532) .
  • Content-processing system 518 can include instructions for, in response to detecting the failure during the startup or initialization process (failure-detecting module 526) : identifying at least one recovery zone on which to perform a recovery process (zone-selecting module 522) ; and setting a current write pointer of the identified recovery zone to a location indicated by a previous write pointer of the identified recovery zone (current write pointer-managing module 530) .
  • Data 534 can include any data that is required as input or that is generated as output by the methods and/or processes described in this disclosure. Specifically, data 534 can store at least: data; an indicator of a location of a previous write pointer and a current write pointer; a segment of data; a logical address; a physical address; a zone; a selected zone; a recovery zone; a plurality of zones; data for an I/O operation; information associated with performing an atomic write operation; allocated memory; data organized into segments; a buffer; a huge page buffer; an incoming per-zone I/O buffer; an indicator of a successful or unsuccessful write operation; and an indicator of a failure detected during a startup or an initialization process.
  • FIG. 6 illustrates an exemplary apparatus 600 that facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
  • Apparatus 600 can comprise a plurality of units or apparatuses which may communicate with one another via a wired, wireless, quantum light, or electrical communication channel.
  • Apparatus 600 may be realized using one or more integrated circuits, and may include fewer or more units or apparatuses than those shown in FIG. 6.
  • apparatus 600 may be integrated in a computer system, or realized as a separate device which is capable of communicating with other computer systems and/or devices.
  • apparatus 600 can comprise units 602-614 which perform functions or operations similar to modules 520-532 of computer system 500 of FIG.
  • a communication unit 602 including: a communication unit 602; a zone-selecting unit 604; a data-writing unit 606; a failure-detecting unit 608; a previous write pointer-managing unit 610; a current write pointer-managing unit 612; and a huge page memory-allocating unit 614.
  • the data structures and code described in this detailed description are typically stored on a computer-readable storage medium, which may be any device or medium that can store code and/or data for use by a computer system.
  • the computer-readable storage medium includes, but is not limited to, volatile memory, non-volatile memory, magnetic and optical storage devices such as disk drives, magnetic tape, CDs (compact discs) , DVDs (digital versatile discs or digital video discs) , or other media capable of storing computer-readable media now known or later developed.
  • the methods and processes described in the detailed description section can be embodied as code and/or data, which can be stored in a computer-readable storage medium as described above.
  • a computer system reads and executes the code and/or data stored on the computer-readable storage medium, the computer system performs the methods and processes embodied as data structures and code and stored within the computer-readable storage medium.
  • the methods and processes described above can be included in hardware modules.
  • the hardware modules can include, but are not limited to, application-specific integrated circuit (ASIC) chips, field-programmable gate arrays (FPGAs) , and other programmable-logic devices now known or later developed.
  • ASIC application-specific integrated circuit
  • FPGAs field-programmable gate arrays
  • the hardware modules When the hardware modules are activated, the hardware modules perform the methods and processes included within the hardware modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

A method and system for facilitating fast atomic write operations. The system receives a request to write data to a shingled magnetic recording drive (302). The system selects a zone of the drive to which to write the data, wherein the drive stores a previous write pointer indicating a location of an end of a most recent successful write operation in a respective zone (304). The system writes the data at a location of a current write pointer of the selected zone (306). In response to successfully writing the data to the selected zone, the system sets a previous write pointer of the selected zone to a location of an end of the successful write operation (310). In response to not successfully writing the data to the selected zone, the system sets the current write pointer of the selected zone to a location indicated by the previous write pointer of the selected zone (314).

Description

METHOD AND SYSTEM FOR FACILITATING FAST ATOMIC WRITE OPERATIONS IN SHINGLED MAGNETIC RECORDING HARD DISK DRIVES
Inventors: Jianjian Huo, Cunyin Chang, Zongpeng Zhu, Fei Liu, and Shu Li
BACKGROUND Field
This disclosure is generally related to the field of data storage. More specifically, this disclosure is related to a method and system for facilitating fast atomic write operations in shingled magnetic recording hard disk drives.
Related Art
The proliferation of the Internet and e-commerce continues to create a vast amount of digital content. Various storage systems have been created to access and store such digital content. Data can be stored in storage systems or storage servers in a data center. The amount of data stored in a data center continues to grow at a rapid pace. To handle this rapid growth, data can be stored in various “tiers” based on the frequency of access. For example, solid  state drives (SSDs) are used in the “hot” tier of storage, and generally provide faster access at a higher cost. In contrast, hard disk drives (HDDs) are used in the “warm” and “cold” tiers of storage, and generally provide a lower cost and solid sequential throughput. Some examples of data stored in the warm and cold tiers include user-uploaded photos and videos, enterprise book-keeping data for long term archival purposes, and surveillance recordings. The amount of data stored on these HDDs (for the warm and cold tier of storage) continues to increase at a rapid pace. In some instances, such data must be stored for 50 years or more.
One solution to lower the cost of storing the increasing amount of warm and cold data on HDDs is a shingled magnetic recording (SMR) HDD. While a conventional magnetic recording (CMR) HDD records data by writing non-overlapping magnetic tracks parallel to each other, an SMR HDD writes new tracks that overlap part of the previously written magnetic track. The tracks partially overlap similar to roof “shingles. ” A narrower track width can result in a higher track density and an increased storage capacity. Thus, the SMR HDD has an increased areal density and a higher overall per-drive storage capacity, which can result in a decrease in both the storage price per Gigabyte and the total cost of ownership (TCO) .
One common requirement for current storage systems is the preservation of data integrity and consistency in the event of a node or network failure. One method for preserving data integrity and consistency is logging, e.g., journaling. However, because data is first logged to a specific location and then written to a main location in the storage media, the logging method can result in a significant performance degradation, as well as a high write amplification to the storage media. Another method for preserving data integrity and consistency is based on atomic write operations. However, there is currently no support for atomic write operations in hard drives, including SMR HDDs.
SUMMARY
One embodiment facilitates an atomic write operation. During operation, the system receives a request to write data to a shingled magnetic recording drive. The system selects at least one zone of the drive to which to write the data, wherein the drive stores a previous write pointer indicating a location of an end of a most recent successful write operation in a respective zone. The system writes the data at a location of a current write pointer of the selected zone. In response to successfully writing the data to the selected zone, the system sets a previous write pointer of the selected zone to a location of an end of the successful write operation. In response to not successfully writing the data to the selected zone, the system sets the current write pointer of the selected zone to a location indicated by the previous write pointer of the selected zone.
In some embodiments, the data is written to the selected zone in a single atomic transaction, thereby facilitating the atomic write operation for successfully writing the data to the shingled magnetic recording drive.
In some embodiments, the system allocates memory from memory pages for the data to be written, wherein the data is organized into segments and held in a page buffer. A size of a memory page is greater than a first predetermined threshold, and a size of the page buffer is greater than a second predetermined threshold.
In some embodiments, selecting the at least one zone comprises selecting a plurality of zones to which to write the data. Subsequent to successfully writing one or more segments of the data to the selected zone, the system identifies a next zone of the plurality of zones to which to write remaining segments of the data.
In some embodiments, in response to successfully writing the data to the selected zone, the system sets the current write pointer of the selected zone to the location of the end of the successful write operation.
In some embodiments, setting the current write pointer of the selected zone to the location indicated by the previous write pointer of the selected zone is further in response to detecting a failure during a startup or an initialization process.
In some embodiments, in response to detecting the failure during the startup or initialization process: the system identifies at least one recovery zone on which to perform a recovery process; and the system sets a current write pointer of the identified recovery zone to a location indicated by a previous write pointer of the identified recovery zone.
BRIEF DESCRIPTION OF THE FIGURES
FIG. 1 illustrates an exemplary environment which facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
FIG. 2 illustrates an exemplary environment which facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
FIG. 3 presents a flowchart illustrating a method for facilitating an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
FIG. 4 presents a flowchart illustrating a method for facilitating an atomic write operation in an SMR HDD, including handling a failure of a write operation, in accordance with an embodiment of the present application.
FIG. 5 illustrates an exemplary computer system that facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
FIG. 6 illustrates an exemplary apparatus that facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application.
In the figures, like reference numerals refer to the same figure elements.
DETAILED DESCRIPTION
The following description is presented to enable any person skilled in the art to make and use the embodiments, and is provided in the context of a particular application and its requirements. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present disclosure. Thus, the embodiments described herein are not limited to the embodiments shown, but are to be accorded the widest scope consistent with the principles and features disclosed herein.
Overview
The embodiments described herein at least solve the problem of preserving data integrity and consistency via one or more atomic write operations in a shingled magnetic recording (SMR) hard disk drive (HDD) by tracking both a previous write pointer and a current pointer for each zone of the SMR HDD, and, in addition to, or alternatively, by using a huge page-based memory allocation.
As described above, the amount of data stored on HDDs (for the warm and cold tier of storage) continues to increase at a rapid pace. In some instances, storage systems must store such data for 50 years or more. One common requirement for current storage systems is the preservation of data integrity and consistency in the event of a node or network failure. One method for preserving data integrity and consistency is logging, e.g., journaling. However, because data is first logged to a specific location and then written to a main location in the storage media, the logging method can result in a significant performance degradation, as well as a high write amplification to the storage media. Another method for preserving data integrity and consistency is based on atomic write operations. However, there is currently no support for atomic write operations in hard drives, including SMR HDDs.
The embodiments described herein address these challenges by providing a system which facilitates atomic write operations in an SMR HDD. The system includes an integration of hardware and software. On the hardware side, the system can use a retrofitted zone write pointer mechanism. Host-managed (HM) SMR HDDs include specific zones to which data is sequentially written, and the SMR HDD firmware typically maintains a write pointer for each zone. In the embodiments described herein of the retrofitted zone pointer mechanism, for each zone, the SMR HDD firmware can log or track a location of a previous write pointer (e.g., an end of a most recent successful write operation to a given zone) and can update the current write pointer for the zone only after a write operation to the zone has successfully completed. By maintaining the location of both the previous write pointer and the current write pointer, the system can ensure the atomicity of a write operation to a given zone. That is, if a write operation is not successful (i.e., fails to successfully write the entire data to the given zone during the write operation) , the unsuccessful write operation does  not have any effect. Thus, a partial write cannot occur because the firmware recognizes a zone as a written area based only on the location of the current write pointer, and the location (of the current write pointer) is not updated by the system until after the entire write operation has successfully completed. An exemplary per zone atomic write is described below in relation to FIG. 2.
In addition to facilitating the per zone atomic write, the embodiments described herein can also facilitate an atomic write across multiple zones, as described below in relation to FIG. 1.
Furthermore, the SMR HDD firmware can also disable the internal RAM write buffer associated with the zone, zones, and the SMR, to ensure the atomicity of each write operation. However, this may result in decreasing the sequential write performance for each zone, and further result in an increased latency. For example, the HDD may spend more time waiting because there is no RAM buffering for incoming writes, and the operating system typically splits one huge zone write into many small 4 KB aligned write operations. The embodiments described herein address this issue by providing, on the software side, a huge page-based memory allocation, as described below in relation to FIG. 1.
Thus, the embodiments described herein provide a system which improves the efficiency of a storage system, where the improvements are fundamentally technological. The system provides a technological solution (by maintaining both the previous pointer and the current write pointer and by using a huge page-based memory allocation) to the technological problem of facilitating atomic write operations in SMR HDDs. The system thus provides improvements to the technological field (and related technological applications) of the preservation of data integrity and consistency.
A “host-managed shingled magnetic recording HDD” ( “HM-SMR HDD” ) adheres to a certain protocol required by the host. In an HM-SMR HDD, the host can manage the shingled nature of the physical media, and writes data sequentially so as not to destroy existing data.
An “atomic write operation” refers to a write input/output (I/O) request which is performed in a storage media, and can be considered as atomic because the operation either fails or succeeds as a whole. That is, no partial write to the storage media can occur in performing an atomic write operation.
The term “huge page memory” refers to a memory management method which manages large and fixed-length contiguous blocks of physical memory based on a single entry in a page table or other address mapping structure.
The term “write amplification” refers to an event associated with flash memory and SMR HDD, where the actual amount of information physically written to the storage media is a multiple of the logical amount intended to be written.
Exemplary Environments Which Facilitate an Atomic Write Operation in an  SMR HDD
The embodiments described herein provide a system which includes both software and hardware components. FIG. 1 illustrates an exemplary environment 100 which facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application. Environment 100 can include software 102 and hardware 140.
Software 102 can include an I/O management stack 130, which can include, e.g., an I/O dispatch module 132, a polling and event module 134, and a device driver 136. Software 102 can also include a huge page-based memory allocation 110, where memory is allocated to a huge chunk of data in segments corresponding to portions of huge pages. Allocation 110 can include  huge pages   120, 124, and 127. Huge page 120 can include  unused memory  121, 122, and 123 (as indicated by the white box of unused memory 192 in the index) . Similarly, huge page 124 can include  unused memory  125 and 126, and huge page 127 can include  unused memory  128 and 129. Huge page 120 can include portions which are allocated to corresponding segments of the data to be written, which can be stored in a per-zone I/O write buffer 111. An allocated huge page memory segment can be indicated by a box with left-slanting diagonal lines, as indicated by an allocated huge page memory segment 191 in the index) .
For example: a segment 1 112 of data to be written to the non-volatile memory can be allocated to a portion 113 of huge page 127; a segment 2 114 of the data to be written can be allocated to a portion 115 of huge page 120; a segment 3 116 of the data to be written can be allocated to a portion 117 of huge page 120; and a segment 4 118 of the data to be written can be allocated to a portion 119 of huge page 124. The data of segments 1-4 (112-118) can be stored in a per zone I/O write buffer 111, and subsequently dispatched as I/O to be written to hardware 140.
As described above, for each zone in an SMR HDD, the SMR HDD firmware can track and store the location of both the current write pointer and the previous write pointer. The SMR HDD firmware can also disable the internal RAM write buffer associated with the zone (s) to ensure the atomicity of each write operation. However, because there is no RAM buffering for incoming writes, this may result in an increased latency due to decreasing the sequential write performance for each zone. The embodiments described herein address this issue by providing, on the software side, huge page-based memory allocation 110. Each per zone I/O write request can consist of multiple segments, e.g., segments 1-4 (112-118) , where each segment can correspond to a large chunk allocated from a huge memory page, which is typically in the unit of megabytes (MBs) ,  rather than kilobytes (KBs) . A size of a huge memory page can be greater than a first predetermined threshold, and a size of the page buffer can be greater than a second predetermined threshold. These thresholds can be configured by the system or a user. By integrating huge page-based memory allocation 110 with the commonly used scatter/gather mechanism, a host device can issue to the SMR HDD very large single write operations (e.g., up to a typical 256 MB zone size) . This can facilitate an improvement in the throughput of atomic write operations in the SMR HDD, as the SMR HDD can spend more time executing the actual write request, rather than waiting for a sequential write operation to be performed (e.g., due to the disabled internal RAM buffer) .
In environment 100, hardware 140 can include a host-managed SMR HDD 141, which can include SMR HDD firmware 142 (e.g., installed in a controller or other component/module) . SMR HDD 141 can also include multiple zones to which data is to be written for persistent storage, e.g., a zone 1 150, a zone 2 160, and a zone 3 170. In environment 100, zone areas which are used or include valid and successfully written data are depicted as a shaded box (as indicated by the shaded box of a used/written area 193 in the index) . Zone areas in which a current atomic write operation is occurring is depicted by a cross-filled box (as indicated by the cross-filled box of an atomic write area 194 in the index) . Zone areas which are empty and available for writing to are depicted by a white box (as indicated by the white box of an empty area 195 in the index) . An area of a zone may contain data, but may be considered as empty based on the location of the current write pointer, as described below in relation to FIG. 2.
Environment 100 depicts how each zone maintains the location of two pointers: a previous write pointer ( “wp_prev” ) , which indicates a location of an end of a most recent successful write operation in a respective zone; and a current write pointer ( “wp_curr” ) , which indicates a location of where a write  operation to the respective zone is to begin. The locations of the pair of pointers for each zone in an SMR HDD can be stored in a data structure which is accessible by SMR HDD firmware 142. Various methods may be used to ensure that the pointer locations are appropriately stored and accessible even in the event of a power failure. That is, the data structure may be stored in a volatile memory associated with a host device or with the HDD itself. The system can flush the data structure to a non-volatile memory at periodic intervals. Flushing the data structure can also be based on a predetermined time threshold, the size of the data structure, a capacity of a specific zone or zones associated with storing the data structure, a user configuration, a frequency of access of the data stored in a respective zone, a time-related factor, or any factor. In the embodiments described here, the location of wp_prev and wp_curr can be at the same or different locations, depending on the status and progress of any atomic write operations.
For example, environment 100 illustrates an atomic write operation of data (e.g., from per zone I/O write buffer 111) to multiple zones of SMR HDD 141. Assume for zone 1 150 that a wp_curr 158 begins at a same location as a wp_prev 156 (as depicted below in relation to FIG. 2) , and that the atomic write operation begins at the location indicated by wp_prev 156. The system can update the location of wp_curr 158 only after the data to be written to zone 1 150 has been successfully written to zone 1 150 (i.e., as data 152) , or only after all the data has been successfully written to zone 1 150, zone 2 160, and zone 3 170, if the atomic write operation is to be performed across multiple zones. That is, upon determining that the data has been successfully written to a respective zone (or zones, in the case of a write operation across multiple zones) , the system can set the location of wp_curr 158 to the end (as shown) of the successful write  operation for data 152, and can also set the location of wp_prev 156 to the same end location (not shown) .
Similarly, given a multiple zone write, and assuming for zone 2 160 that a wp_curr 168 begins at a same location as a wp_prev 166, the atomic write operation can continue at the location indicated by wp_prev 166. The system can update the location of wp_curr 168 only after the data to be written to zone 2 160 has been successfully written to zone 2 160 (i.e., as data 162) , and only after all the data has been successfully written to zone 1 150, zone 2 160, and zone 3 170 (assuming a multiple zone write) . That is, the system can set the location of wp_curr 168 to the end (as shown) of the successful write operation for data 162, and can also set the location of wp_prev 166 to the same end location (not shown) .
Similarly, given a multiple zone write, and assuming for zone 3 170 that a wp_curr 178 begins at a same location as a wp_prev 176, the atomic write operation can continue at the location indicated by wp_prev 176. The system can update the location of wp_curr 178 only after the data to be written to zone 3 170 has been successfully written to zone 3 170 (i.e., as data 172) , and only after all the data has been successfully written to zone 1 150, zone 2 160, and zone 3 170 (assuming a multiple zone write) . That is, the system can set the location of wp_curr 178 to the end (as shown) of the successful write operation for data 172, and can also set the location of wp_prev 176 to the same end location (not shown) .
If the system detects a failure during an atomic write operation to a single zone (e.g., of data 152 only to zone 1 150) , the system can set the location of wp_curr 158 to the location of wp_prev 156, such that the next sequential write to occur in zone 1 150 can begin at the location of the current write pointer, which is set to the location of the previous write pointer.
If the system detects a failure during an atomic write operation to multiple zones (e.g., of one or more of data 152, 162, and 172 to, respectively, zone 1 150, zone 2 160, and zone 3 170) , the system can set the location of the respective current pointers of each zone to the location of the previous pointer of each zone. For example, the system can set the location of wp_curr 158 to the location of wp_prev 156, set the location of wp_curr 168 to the location of wp_prev 166, and set the location of wp_curr 178 to the location of wp_prev 176.
Thus, by maintaining the locations of the previous write pointer and the current write pointer in each zone of the SMR HDD, and by allocating memory using a huge page-based mechanism, the embodiments described herein can preserve the integrity and consistency of data by facilitating atomic write operations in SMR HDDs.
FIG. 2 illustrates an exemplary environment 200 which facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application. In environment 200, zone areas which are used or include valid and successfully written data are depicted as a shaded box (as indicated by the shaded box of a used/written area 293 in the index) . Zone areas in which a current atomic write operation is occurring is depicted by a cross-filled box (as indicated by the cross-filled box of an atomic write area (in process) 294 in the index) . Zone areas which are empty and available for writing to are depicted by a white box (as indicated by the white box of an empty area 295 in the index) . An area of a zone may contain data, but may be considered as empty based on the location of the current write pointer (again as indicated by the white box of a considered as empty area 296 in the index) .
Environment 200 can include a zone 1 210 at various times. At a time T1, zone 1 210 can include a used area 202, an empty area 204, a wp_prev 216, and a wp_curr 218. The location of wp_prev 216 and wp_curr 218 can be  the same location. The system can perform an atomic write operation (function 252) by writing data beginning at the location of wp_curr 218. That is, at a time T1, zone 1 210 can include data being written to area 206 (indicated as an in-process atomic write area) . In some embodiments, the location of the current write pointer may move during the atomic write operation 252, but if the atomic write operation 252 is not successful, the system can set the location of the current write pointer to the location of the previous write pointer. For example, if the atomic write operation is unsuccessful (determination 254) , at a time T2, the system can set the location of wp_curr 218 to the location of wp_prev 216. Note that area 206, the area to which the unsuccessful atomic write operation was in process, can be considered as an empty area based on the updated location of the current write pointer.
On the other hand, if the atomic write operation is successful (determination 256) , at a time T3, the system can set the location of the current write pointer to an end of the successful write operation. Note that area 206 is now indicated as a used/written area 206 (by the shaded box) . Furthermore, at a time T4, the system can set the location of the previous write pointer to the end of the successful write operation, resulting in similar state as at time T0, where the location of wp_prev 216 and wp_curr 218 are at the same location.
Exemplary Method for Facilitating an Atomic Write Operation in an SMR  HDD
FIG. 3 presents a flowchart 300 illustrating a method for facilitating an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application. During operation, the system receives a request to write data to a shingled magnetic recording (SMR) drive (operation 302) . The data can be written to a non-volatile memory of the SMR drive, such as the disk media (e.g., magnetic storage media) . The system selects at least one  zone of the SMR drive to which to write the data, wherein the SMR drive stores a previous write pointer indicating a location of an end of a most recent successful write operation in a respective zone (operation 304) . The system writes the data at a location of a current write pointer of the selected zone (operation 306) .
If the system successfully writes the data to the selected zone (decision 308) , the system sets a previous write pointer of the selected zone to a location of an end of the successful write operation (operation 310) . The system can also set the current write pointer of the selected zone to the location of the end of the successful write operation (operation 312) .
If the system does not successfully write the data to the selected zone (decision 308) , the system sets the current write pointer of the selected zone to a location indicated by the previous write pointer of the selected zone (operation 314) .
If the selected zone is not the last zone to which the data is to be written (decision 320) , the operation continues at operation 304. If the selected zone is the last zone to which the data is to be written (decision 320) , the system completes the request to write the data to the SMR drive (operation 322) , and the operation returns.
Exemplary Method for Handling a Failure of an Atomic Write Operation
FIG. 4 presents a flowchart 400 illustrating a method for facilitating an atomic write operation in an SMR HDD, including handling a failure of a write operation, in accordance with an embodiment of the present application. During operation, the system detects a failure during startup or during a write operation (operation 402) . The system identifies at least one recovery zone on which to perform a recovery process (operation 404) . The system sets a current write pointer of the identified recovery zone to a location  indicated by a previous write pointer of the identified recovery zone (operation 406) .
If the system determines that there are remaining zones on which to perform recovery (decision 408) , the operation continues at operation 402. If the system determines that there are no remaining zones on which to perform recovery (decision 408) , the system completes the recovery process (operation 410) , and the operation returns.
Exemplary Computer System and Apparatus
FIG. 5 illustrates an exemplary computer system 500 that facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application. Computer system 500 includes a processor 502, a controller 504, a volatile memory 506, and a storage device 508. Volatile memory 506 can include, e.g., random access memory (RAM) , that serves as a managed memory, and can be used to store one or more memory pools. Storage device 508 can include persistent storage which can be managed or accessed via controller 504. Controller 504 can include firmware which can be used to execute the instructions or methods described herein. Furthermore, computer system 500 can be coupled to a display device 510, a keyboard 512, and a pointing device 514. Storage device 508 can store an operating system 516, a content-processing system 518, and data 534.
Content-processing system 518 can include instructions, which when executed by computer system 500, can cause computer system 500 to perform methods and/or processes described in this disclosure. Specifically, content-processing system 518 can include instructions for receiving and transmitting data packets, including data, I/O data, a write request, data to be written to an SMR HDD, segments of data, and an indicator of a logical address, a  physical address, a current write pointer location, and a previous write pointer location (communication module 520) .
Content-processing system 518 can further include instructions for receiving a request to write data to a shingled magnetic recording drive (communication module 520) . Content-processing system 518 can include instructions for selecting at least one zone of the drive to which to write the data, wherein the drive stores a previous write pointer indicating a location of an end of a most recent successful write operation in a respective zone (zone-selecting module 522) . Content-processing system 518 can include instructions for writing the data at a location of a current write pointer of the selected zone (data-writing module 524) . Content-processing system 518 can also include instructions for, in response to successfully writing the data to the selected zone (failure-detecting module 526) , setting a previous write pointer of the selected zone to a location of an end of the successful write operation (previous write pointer-managing module 528) . Content-processing system 518 can include instructions for, in response to not successfully writing the data to the selected zone (failure-detecting module 526) , setting the current write pointer of the selected zone to a location indicated by the previous write pointer of the selected zone (current write pointer-managing module 530) .
Content-processing system 518 can additionally include instructions for allocating memory from memory pages for the data to be written, wherein the data is organized into segments and held in a page buffer (huge page memory-allocating module 532) . Content-processing system 518 can include instructions for, in response to detecting the failure during the startup or initialization process (failure-detecting module 526) : identifying at least one recovery zone on which to perform a recovery process (zone-selecting module 522) ; and setting a current write pointer of the identified recovery zone to a  location indicated by a previous write pointer of the identified recovery zone (current write pointer-managing module 530) .
Data 534 can include any data that is required as input or that is generated as output by the methods and/or processes described in this disclosure. Specifically, data 534 can store at least: data; an indicator of a location of a previous write pointer and a current write pointer; a segment of data; a logical address; a physical address; a zone; a selected zone; a recovery zone; a plurality of zones; data for an I/O operation; information associated with performing an atomic write operation; allocated memory; data organized into segments; a buffer; a huge page buffer; an incoming per-zone I/O buffer; an indicator of a successful or unsuccessful write operation; and an indicator of a failure detected during a startup or an initialization process.
FIG. 6 illustrates an exemplary apparatus 600 that facilitates an atomic write operation in an SMR HDD, in accordance with an embodiment of the present application. Apparatus 600 can comprise a plurality of units or apparatuses which may communicate with one another via a wired, wireless, quantum light, or electrical communication channel. Apparatus 600 may be realized using one or more integrated circuits, and may include fewer or more units or apparatuses than those shown in FIG. 6. Further, apparatus 600 may be integrated in a computer system, or realized as a separate device which is capable of communicating with other computer systems and/or devices. Specifically, apparatus 600 can comprise units 602-614 which perform functions or operations similar to modules 520-532 of computer system 500 of FIG. 5, including: a communication unit 602; a zone-selecting unit 604; a data-writing unit 606; a failure-detecting unit 608; a previous write pointer-managing unit 610; a current write pointer-managing unit 612; and a huge page memory-allocating unit 614.
The data structures and code described in this detailed description are typically stored on a computer-readable storage medium, which may be any device or medium that can store code and/or data for use by a computer system. The computer-readable storage medium includes, but is not limited to, volatile memory, non-volatile memory, magnetic and optical storage devices such as disk drives, magnetic tape, CDs (compact discs) , DVDs (digital versatile discs or digital video discs) , or other media capable of storing computer-readable media now known or later developed.
The methods and processes described in the detailed description section can be embodied as code and/or data, which can be stored in a computer-readable storage medium as described above. When a computer system reads and executes the code and/or data stored on the computer-readable storage medium, the computer system performs the methods and processes embodied as data structures and code and stored within the computer-readable storage medium.
Furthermore, the methods and processes described above can be included in hardware modules. For example, the hardware modules can include, but are not limited to, application-specific integrated circuit (ASIC) chips, field-programmable gate arrays (FPGAs) , and other programmable-logic devices now known or later developed. When the hardware modules are activated, the hardware modules perform the methods and processes included within the hardware modules.
The foregoing embodiments described herein have been presented for purposes of illustration and description only. They are not intended to be exhaustive or to limit the embodiments described herein to the forms disclosed. Accordingly, many modifications and variations will be apparent to practitioners skilled in the art. Additionally, the above disclosure is not intended to limit the  embodiments described herein. The scope of the embodiments described herein is defined by the appended claims.

Claims (20)

  1. A computer-implemented method for facilitating an atomic write operation, the method comprising:
    receiving a request to write data to a shingled magnetic recording drive;
    selecting at least one zone of the drive to which to write the data,
    wherein the drive stores a previous write pointer indicating a location of an end of a most recent successful write operation in a respective zone;
    writing the data at a location of a current write pointer of the selected zone;
    in response to successfully writing the data to the selected zone, setting a previous write pointer of the selected zone to a location of an end of the successful write operation; and
    in response to not successfully writing the data to the selected zone, setting the current write pointer of the selected zone to a location indicated by the previous write pointer of the selected zone.
  2. The method of claim 1, wherein the data is written to the selected zone in a single atomic transaction, thereby facilitating the atomic write operation for successfully writing the data to the shingled magnetic recording drive.
  3. The method of claim 1, further comprising:
    allocating memory from memory pages for the data to be written,
    wherein the data is organized into segments and held in a page buffer,
    wherein a size of a memory page is greater than a first predetermined threshold, and
    wherein a size of the page buffer is greater than a second predetermined threshold.
  4. The method of claim 1, wherein selecting the at least one zone comprises selecting a plurality of zones to which to write the data, and wherein the method further comprises:
    subsequent to successfully writing one or more segments of the data to the selected zone, identifying a next zone of the plurality of zones to which to write remaining segments of the data.
  5. The method of claim 1, wherein in response to successfully writing the data to the selected zone, the method further comprises:
    setting the current write pointer of the selected zone to the location of the end of the successful write operation.
  6. The method of claim 1, wherein setting the current write pointer of the selected zone to the location indicated by the previous write pointer of the selected zone is further in response to detecting a failure during a startup or an initialization process.
  7. The method of claim 6, wherein in response to detecting the failure during the startup or initialization process, the method further comprises:
    identifying at least one recovery zone on which to perform a recovery process; and
    setting a current write pointer of the identified recovery zone to a location indicated by a previous write pointer of the identified recovery zone.
  8. A computer system for facilitating data placement, the system comprising:
    a processor; and
    a memory coupled to the processor and storing instructions, which when executed by the processor cause the processor to perform a method, wherein the computer system is a storage device, the method comprising:
    receiving a request to write data to a shingled magnetic recording drive;
    selecting at least one zone of the drive to which to write the data,
    wherein the drive stores a previous write pointer indicating a location of an end of a most recent successful write operation in a respective zone;
    writing the data at a location of a current write pointer of the selected zone;
    in response to successfully writing the data to the selected zone, setting a previous write pointer of the selected zone to a location of an end of the successful write operation; and
    in response to not successfully writing the data to the selected zone, setting the current write pointer of the selected zone to a location indicated by the previous write pointer of the selected zone.
  9. The computer system of claim 8, wherein the data is written to the selected zone in a single atomic transaction, thereby facilitating the atomic write operation for successfully writing the data to the shingled magnetic recording drive.
  10. The computer system of claim 8, wherein the method further comprises:
    allocating memory from memory pages for the data to be written,
    wherein the data is organized into segments and held in a page buffer,
    wherein a size of a memory page is greater than a first predetermined threshold, and
    wherein a size of the page buffer is greater than a second predetermined  threshold.
  11. The computer system of claim 8, wherein selecting the at least one zone comprises selecting a plurality of zones to which to write the data, and wherein the method further comprises:
    subsequent to successfully writing one or more segments of the data to the selected zone, identifying a next zone of the plurality of zones to which to write remaining segments of the data.
  12. The computer system of claim 8, wherein in response to successfully writing the data to the selected zone, the method further comprises:
    setting the current write pointer of the selected zone to the location of the end of the successful write operation.
  13. The computer system of claim 8, wherein setting the current write pointer of the selected zone to the location indicated by the previous write pointer of the selected zone is further in response to detecting a failure during a startup or an initialization process.
  14. The computer system of claim 13, wherein in response to detecting the failure during the startup or initialization process, the method further comprises:
    identifying at least one recovery zone on which to perform a recovery process; and
    setting a current write pointer of the identified recovery zone to a location indicated by a previous write pointer of the identified recovery zone.
  15. A non-transitory computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method, the method comprising:
    receiving a request to write data to a shingled magnetic recording drive;
    selecting at least one zone of the drive to which to write the data,
    wherein the drive stores a previous write pointer indicating a location of an end of a most recent successful write operation in a respective zone;
    writing the data at a location of a current write pointer of the selected zone;
    in response to successfully writing the data to the selected zone, setting a previous write pointer of the selected zone to a location of an end of the successful write operation; and
    in response to not successfully writing the data to the selected zone, setting the current write pointer of the selected zone to a location indicated by the previous write pointer of the selected zone.
  16. The storage medium of claim 15, wherein the data is written to the selected zone in a single atomic transaction, thereby facilitating the atomic write operation for successfully writing the data to the shingled magnetic recording drive.
  17. The storage medium of claim 15, wherein the method further comprises:
    allocating memory from memory pages for the data to be written,
    wherein the data is organized into segments and held in a page buffer,
    wherein a size of a memory page is greater than a first predetermined threshold, and
    wherein a size of the page buffer is greater than a second predetermined  threshold.
  18. The storage medium of claim 15, wherein selecting the at least one zone comprises selecting a plurality of zones to which to write the data, and wherein the method further comprises:
    subsequent to successfully writing one or more segments of the data to the selected zone, identifying a next zone of the plurality of zones to which to write remaining segments of the data.
  19. The storage medium of claim 15, wherein in response to successfully writing the data to the selected zone, the method further comprises:
    setting the current write pointer of the selected zone to the location of the end of the successful write operation.
  20. The storage medium of claim 15, wherein setting the current write pointer of the selected zone to the location indicated by the previous write pointer of the selected zone is further in response to detecting a failure during a startup or an initialization process, and
    wherein in response to detecting the failure during the startup or initialization process, the method further comprises:
    identifying at least one recovery zone on which to perform a recovery process; and
    setting a current write pointer of the identified recovery zone to a location indicated by a previous write pointer of the identified recovery zone.
PCT/CN2019/075713 2019-02-21 2019-02-21 Method and system for facilitating fast atomic write operations in shingled magnetic recording hard disk drives Ceased WO2020168516A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/075713 WO2020168516A1 (en) 2019-02-21 2019-02-21 Method and system for facilitating fast atomic write operations in shingled magnetic recording hard disk drives

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/075713 WO2020168516A1 (en) 2019-02-21 2019-02-21 Method and system for facilitating fast atomic write operations in shingled magnetic recording hard disk drives

Publications (1)

Publication Number Publication Date
WO2020168516A1 true WO2020168516A1 (en) 2020-08-27

Family

ID=72144782

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/075713 Ceased WO2020168516A1 (en) 2019-02-21 2019-02-21 Method and system for facilitating fast atomic write operations in shingled magnetic recording hard disk drives

Country Status (1)

Country Link
WO (1) WO2020168516A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157600A (en) * 2021-03-08 2021-07-23 网宿科技股份有限公司 Space allocation method of shingled hard disk, file storage system and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080052444A1 (en) * 2006-01-26 2008-02-28 Winbond Electronics Corporation Method for page random write and read in blocks of flash memory
CN107765992A (en) * 2016-08-22 2018-03-06 华为技术有限公司 A kind of method and apparatus of processing data
CN108108118A (en) * 2016-11-24 2018-06-01 大心电子股份有限公司 Method for writing data and storage control
CN108228483A (en) * 2016-12-15 2018-06-29 北京忆恒创源科技有限公司 The method and apparatus for handling atom write order

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080052444A1 (en) * 2006-01-26 2008-02-28 Winbond Electronics Corporation Method for page random write and read in blocks of flash memory
CN107765992A (en) * 2016-08-22 2018-03-06 华为技术有限公司 A kind of method and apparatus of processing data
CN108108118A (en) * 2016-11-24 2018-06-01 大心电子股份有限公司 Method for writing data and storage control
CN108228483A (en) * 2016-12-15 2018-06-29 北京忆恒创源科技有限公司 The method and apparatus for handling atom write order

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157600A (en) * 2021-03-08 2021-07-23 网宿科技股份有限公司 Space allocation method of shingled hard disk, file storage system and server

Similar Documents

Publication Publication Date Title
KR102370760B1 (en) Zone formation for zoned namespaces
JP7089830B2 (en) Devices, systems, and methods for write management of non-volatile memory data
US10303601B2 (en) Method and system for rearranging a write operation in a shingled magnetic recording device
CN107346290B (en) Replaying partition logical to physical data address translation tables using parallelized log lists
US9665442B2 (en) Smart flushing of data to backup storage
US8738987B2 (en) Memory controller and memory management method
US11126561B2 (en) Method and system for organizing NAND blocks and placing data to facilitate high-throughput for random writes in a solid state drive
US20200159419A1 (en) System and method for optimization of global data placement to mitigate wear-out of write cache and nand flash
US20150113223A1 (en) Systems and methods for adaptive reserve storage
US8214581B2 (en) System and method for cache synchronization
CN106970765B (en) Data storage method and device
US11379155B2 (en) System and method for flash storage management using multiple open page stripes
US11061598B2 (en) Optimized handling of multiple copies in storage management
US10365845B1 (en) Mapped raid restripe for improved drive utilization
US20200042230A1 (en) Method and system for facilitating atomicity and latency assurance on variable sized i/o
US11429519B2 (en) System and method for facilitating reduction of latency and mitigation of write amplification in a multi-tenancy storage drive
US12147678B2 (en) Handling data with different lifetime characteristics in stream-aware data storage equipment
WO2020113549A1 (en) External staging storage cluster mechanism to optimize archival data storage system on shingled magnetic recording hard disk drives
CN117149062A (en) A method and computing device for processing tape damaged data
US10649909B2 (en) Logical block addressing range collision crawler
KR20150127434A (en) Memory management apparatus and control method thereof
WO2020168516A1 (en) Method and system for facilitating fast atomic write operations in shingled magnetic recording hard disk drives
US11474750B2 (en) Storage control apparatus and storage medium
EP4250082B1 (en) System and method for performing data read-write operations in zoned storage devices
US12079511B2 (en) Devices and methods for optimized fetching of multilingual content in media streaming

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: 19915791

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19915791

Country of ref document: EP

Kind code of ref document: A1