Methods of operating multi-zone memory systems, memory systems, hosts and memory controllers
An example method includes obtaining a first zone mapping table, wherein the first zone mapping table includes first write pointers for multiple zones, the multiple zones are obtained by dividing a logical address space corresponding to a non-volatile storage device, and a first write pointer indicates a predicted next writable LBA in a zone; obtaining a second zone mapping table, wherein the second zone mapping table includes second write pointers for the multiple zones, and a second write pointer indicates a next writable LBA in a zone; and determining a zone in the multiple zones, for which the first write pointer and the second write pointer are different, to be a dirty zone based on the first zone mapping table and the second zone mapping table.
1 . A method of operating a memory system, comprising:
obtaining a first zone mapping table, wherein the first zone mapping table includes first write pointers for multiple zones, the multiple zones are obtained by dividing a logical address space corresponding to a non-volatile storage device, and a first write pointer indicates a predicted next writable logical block address (LBA) in a zone;
obtaining a second zone mapping table, wherein the second zone mapping table includes second write pointers for the multiple zones, and a second write pointer indicates a next writable LBA in a zone; and
during a power-on phase after dirty power loss of the memory system, determining a zone in the multiple zones, for which the first write pointer and the second write pointer are different, to be a dirty zone based on the first zone mapping table and the second zone mapping table.
2 . The method of claim 1 , wherein the multiple zones are in an open state.
3 . The method of claim 1 , further comprising:
receiving a write instruction, the write instruction comprising first data and a first LBA;
predicting, based on the first LBA, a next writable LBA in the logical address space after the first data is written, to obtain a second LBA; and
updating the first zone mapping table based on the second LBA.
4 . The method of claim 3 , wherein after updating the first zone mapping table, the method further comprises:
storing the updated first zone mapping table in a non-volatile storage device.
5 . The method of claim 3 , wherein after updating the first zone mapping table, the method further comprises:
writing the first data into the logical address space based on the write instruction, to obtain a third LBA, wherein the third LBA is a next writable LBA in the logical address space; and
updating the second zone mapping table based on the third LBA.
6 . The method of claim 3 , further comprising at least one of:
storing the first zone mapping table into a non-volatile storage device every time a first period of time passes; or
storing the second zone mapping table into a non-volatile storage device every time a second period of time passes.
7 . The method of claim 3 , further comprising:
storing the first zone mapping table and the second zone mapping table into a non-volatile storage device by a checkpoint operation.
8 . The method of claim 1 , further comprising storing the first zone mapping table and the second zone mapping table into a non-volatile storage device by a checkpoint operation.
9 . The method of claim 1 , further comprising determining a second zone in the multiple zones, for which the first write pointer corresponding to the second zone does not exist, to be a dirty zone.
10 . A method of operating a memory system, comprising:
receiving a write instruction, the write instruction comprising first data and a first logical block address (LBA), and the first LBA belonging to a logical address space corresponding to a non-volatile storage device;
predicting, based on the first LBA, a next writable LBA in the logical address space after the first data is written, to obtain a second LBA; and
updating a first zone mapping table based on the second LBA, the first zone mapping table comprising first write pointers for multiple zones in the logical address space, and a first write pointer indicating a predicted next writable LBA in a zone;
obtaining a second zone mapping table, the second zone mapping table comprising second write pointers for the multiple zones, and a second write pointer indicating a next writable LBA in a zone; and
during a power-on phase after dirty power loss of the memory system, determining a zone in the multiple zones, for which the first write pointer and the second write pointer are different, to be a dirty zone based on the first zone mapping table and the second zone mapping table.
11 . The method of claim 10 , wherein after updating the first zone mapping table, the method further comprises:
writing the first data into the logical address space based on the write instruction, to obtain a third LBA, wherein the third LBA is a next writable LBA in the logical address space; and
updating the second zone mapping table based on the third LBA.
12 . The method of claim 10 , further comprising at least one of:
storing the first zone mapping table into a non-volatile storage device every time a first period of time passes; or
storing the second zone mapping table into a non-volatile storage device every time a second period of time passes.
13 . The method of claim 10 , wherein the multiple zones are in an open state.
14 . The method of claim 10 , further comprising determining a second zone in the multiple zones, for which the first write pointer corresponding to the second zone does not exist, to be a dirty zone.
15 . A memory system, comprising:
a non-volatile storage device; and
a memory controller configured to:
obtain a first zone mapping table, wherein the first zone mapping table includes first write pointers for multiple zones, the multiple zones are obtained by dividing a logical address space corresponding to the non-volatile storage device, and a first write pointer indicates a predicted next writable logical block address (LBA) in a zone;
obtain a second zone mapping table, wherein the second zone mapping table includes second write pointers for the multiple zones, and a second write pointer indicates a next writable LBA in a zone; and
during a power-on phase after dirty power loss of the memory system, determine a zone in the multiple zones, for which the first write pointer and the second write pointer are different, to be a dirty zone based on the first zone mapping table and the second zone mapping table.
16 . The memory system of claim 15 , wherein the multiple zones are in an open state.
17 . The memory system of claim 15 , wherein the memory controller is further configured to:
receive a write instruction, the write instruction comprising first data and a first LBA;
predict, based on the first LBA, a next writable LBA in the logical address space after the first data is written, to obtain a second LBA; and
update the first zone mapping table based on the second LBA.
18 . The memory system of claim 17 , wherein the memory controller is further configured to:
write the first data into the logical address space based on the write instruction, to obtain a third LBA, wherein the third LBA is a next writable LBA in the logical address space; and
update the second zone mapping table based on the third LBA.
19 . The memory system of claim 17 , wherein the memory controller is further configured to at least one of:
store the first zone mapping table into a non-volatile storage device every time a first period of time passes; or
store the second zone mapping table into a non-volatile storage device every time a second period of time passes.
20 . The memory system of claim 17 , wherein the memory controller is further configured to:
store the first zone mapping table and the second zone mapping table into a non-volatile storage device by a checkpoint operation.