Memory system and operating method thereof, electronic device
Patent Information
- Application Number
- CN202510473687.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2026-10-23
AI Technical Summary
[0022]本公开实施例中,存储器控制器被配置为创建命名空间,并接收多个第一热度信息,每个第一热度信息用于指示创建的一个命名空间使用一个回收单元句柄写入的数据的热度。也就是说,存储器系统可以接收多个第一热度信息,并记录下已创建的命名空间使用各个回收单元句柄写入数据的热度,从而使得外部设备在创建新的命名空间时合理配置新的命名空间所使用的回收单元句柄,减少热度差异较大的数据使用相同的回收单元句柄所造成的额外写放大。
Smart Images

Figure CN122963432A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to semiconductor technology, and includes, but is not limited to, a memory system and its operating method, and an electronic device. Background Technology
[0002] With the rapid development of data storage technology, more and more data storage systems are appearing in electronic devices used by people, such as solid-state drives (SSDs). Due to their characteristics of fast read and write speeds, shock resistance, low power consumption, no noise, low heat, and light weight, SSDs have been widely used in military, automotive, industrial, medical, and aerospace fields. Summary of the Invention
[0003] This disclosure provides a memory system, its operation method, and an electronic device.
[0004] In a first aspect, embodiments of this disclosure provide a memory system, the memory system comprising:
[0005] At least one memory device, the memory device comprising at least one recycling group, each recycling group comprising at least one recycling unit;
[0006] A memory controller, coupled to the memory device; the memory controller is configured to:
[0007] Multiple namespaces are created; wherein each namespace corresponds to at least one reclaim unit handle, and the reclaim unit handle is used to indicate a reclaim unit corresponding to each reclaim group;
[0008] Receive multiple first heat information; each first heat information is used to indicate the heat of data written to a namespace created using a recycling unit handle.
[0009] Secondly, embodiments of this disclosure provide an electronic device, the electronic device including a memory system and an external device coupled to the memory system; the memory system includes:
[0010] At least one memory device, the memory device comprising at least one recycling group, each recycling group comprising at least one recycling unit;
[0011] A memory controller, coupled to the memory device;
[0012] The external device is configured as follows:
[0013] Send a plurality of first commands; each first command is used to instruct the memory system to create a namespace, each namespace corresponding to at least one reclaim unit handle, the reclaim unit handle being used to indicate a reclaim unit corresponding to each reclaim group;
[0014] Generate multiple first heat information; each first heat information is used to indicate the heat of data written to a created namespace using a recycling unit handle;
[0015] The memory system is configured as follows:
[0016] In response to the plurality of first commands, a plurality of the aforementioned namespaces are created respectively;
[0017] The system receives the plurality of first heat information and updates the second heat information of the corresponding recycling unit handle in the log page based on the first heat information; wherein the log page includes the second heat information corresponding to each recycling unit handle; the second heat information is used to indicate the heat of all data written to the namespace using the same recycling unit handle.
[0018] Thirdly, embodiments of this disclosure provide an operating method for a memory system, the memory system including at least one memory device, the memory device including at least one recycling group, and each recycling group including at least one recycling unit;
[0019] The operation method includes:
[0020] Multiple namespaces are created; wherein each namespace corresponds to at least one reclaim unit handle, and the reclaim unit handle is used to indicate a reclaim unit corresponding to each reclaim group;
[0021] Receive multiple first heat information; each first heat information is used to indicate the heat of data written to a namespace created using a recycling unit handle.
[0022] In this embodiment, the memory controller is configured to create namespaces and receive multiple first heat information messages. Each first heat information message indicates the heat of data written to a created namespace using a reclaim unit handle. In other words, the memory system can receive multiple first heat information messages and record the heat of data written to created namespaces using each reclaim unit handle. This allows external devices to rationally configure the reclaim unit handles used by new namespaces when creating new namespaces, reducing the additional write amplification caused by data with large differences in heat using the same reclaim unit handle. Attached Figure Description
[0023] In the accompanying drawings, similar reference numerals may describe similar parts in different views. Similar reference numerals with different letter suffixes may indicate different examples of similar parts. The drawings illustrate, by way of example and not limitation, the various embodiments discussed herein.
[0024] Figure 1 This is a schematic diagram of an exemplary system having a memory system according to an embodiment of the present disclosure. Figure 1 .
[0025] Figure 2 This is a schematic diagram of an exemplary memory card having a memory system according to an embodiment of the present disclosure.
[0026] Figure 3 This is a schematic diagram of an exemplary solid-state drive with a memory system according to an embodiment of the present disclosure.
[0027] Figure 4 This is a schematic diagram of an exemplary memory device including peripheral circuitry according to an embodiment of the present disclosure.
[0028] Figure 5 This is a schematic diagram of an exemplary memory including a memory array and peripheral circuitry according to an embodiment of the present disclosure.
[0029] Figure 6 This is a schematic diagram of an exemplary system having a memory system according to an embodiment of the present disclosure. Figure 2 .
[0030] Figure 7 This is an illustration of a memory system supporting flexible data placement according to an embodiment of the present disclosure. Figure 1 .
[0031] Figure 8 This is a schematic diagram of the configuration of the recycling group provided in an embodiment of the present disclosure. Figure 1 .
[0032] Figure 9 This is a schematic diagram of the configuration of the recycling group provided in an embodiment of the present disclosure. Figure 2 .
[0033] Figure 10 A schematic diagram of waste recycling provided for an embodiment of this disclosure. Figure 1 .
[0034] Figure 11 A schematic diagram of waste recycling provided for an embodiment of this disclosure. Figure 2 .
[0035] Figure 12 A schematic diagram of the configuration scheme for the virtual machine and the recycling unit handle provided in an embodiment of this disclosure. Figure 1 .
[0036] Figure 13A schematic diagram of a memory system provided in an embodiment of this disclosure.
[0037] Figure 14 This is a schematic diagram of the recycling unit handle, usage information, and second popularity information in a log page provided in an embodiment of this disclosure.
[0038] Figure 15 This is a schematic diagram of the configuration information format provided in one embodiment of the present disclosure.
[0039] Figure 16 A schematic diagram of an electronic device provided according to an embodiment of this disclosure.
[0040] Figure 17 This is a flowchart illustrating an operation method of a memory system provided in an embodiment of the present disclosure.
[0041] Figure 18 A schematic diagram of the configuration scheme for the virtual machine and the recycling unit handle provided in an embodiment of this disclosure. Figure 2 . Detailed Implementation
[0042] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the specific embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0043] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of this disclosure. However, it will be apparent to those skilled in the art that this disclosure may be practiced without one or more of these details. In other instances, to avoid confusion with this disclosure, certain technical features well-known in the art have not been described; that is, not all features of actual embodiments are described herein, nor are well-known functions and structures described in detail.
[0044] In the accompanying drawings, the same reference numerals denote the same elements throughout.
[0045] It should be understood that spatial relation terms such as “below,” “under,” “below,” “below,” “above,” “above,” etc., are used herein for convenience of description to describe the relationship between one element or feature shown in the figure and other elements or features. It should be understood that, in addition to the orientation shown in the figure, spatial relation terms are intended to also include different orientations of the device in use and operation. For example, if the device in the figure is flipped, then the element or feature described as “below” or “below” other elements or features will be oriented “above” other elements or features. Therefore, the exemplary terms “below” and “under” can include both upper and lower orientations. The device may be otherwise oriented (rotated 90 degrees or otherwise) and the spatial descriptive terms used herein will be interpreted accordingly.
[0046] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. When used herein, the singular forms “a,” “an,” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprise” and / or “comprising,” when used in this specification, identify the presence of the stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups. When used herein, the term “and / or” includes any and all combinations of the associated listed items.
[0047] Figure 1 This is a schematic diagram of an exemplary system with a memory system provided for embodiments of this disclosure. In embodiments of this disclosure, system 100 may be a mobile phone, desktop computer, laptop computer, tablet computer, vehicle computer, game console, printer, positioning device, wearable electronic device, smart sensor, virtual reality (VR) device, augmented reality (AR) device, or any other suitable electronic device having memory therein. Figure 1 As shown, system 100 may include a host system 101 and a memory system 102. The memory system 102 may include one or more memory devices 103 and a memory controller 104. The host system 101 may include a processor of an electronic device, such as a central processing unit (CPU), or a system on a chip (SoC), such as an application processor (AP). The host system 101 may be configured to send data to or receive data from the memory system 102.
[0048] In some embodiments, memory controller 104 is coupled to memory device 103 and host 101 and is configured to control memory device 103. Memory controller 104 can manage data stored in memory device 103 and communicate with host 101. In some embodiments, memory controller 104 is designed to operate in low duty cycle environments, such as in secure digital cards, compact flash cards (CFC), universal serial bus (USB) flash drives, or in other media used in electronic devices such as personal calculators, digital cameras, and mobile phones. In other embodiments, memory controller 104 is designed to operate in high duty cycle environments, such as in solid-state drives or embedded multi-media cards (eMMC).
[0049] In some embodiments, the memory controller 104 and one or more memory devices 103 can be integrated into various types of storage devices, that is, the memory system 102 can be implemented and packaged into different types of terminal electronic products.
[0050] In such Figure 2 In one example shown, the memory controller 104 and a single memory device 103 can be integrated into the memory card 201. The memory card 201 can be a compact flash memory card, a smart media card (SMC), a memory stick (MS), a multi-media card (MMC) such as RS-MMC, MMCmicro, eMMC, etc., a secure digital card such as a Mini SD card, Micro SD card, SDHC card, etc., or a general-purpose flash memory card. The memory card 201 may also include a connection between the memory card 201 and a host device (e.g., Figure 1 The memory card connector 202 is coupled to the host 101. Figure 3 In another example shown, the memory controller 104 and multiple memory devices 103 may be integrated into the SSD 203. The SSD 203 may also include components for connecting the SSD 203 to host devices (e.g., Figure 1 The SSD connector 204 is coupled to the host 101. In some embodiments, the storage capacity and / or operating speed of the SSD 203 is greater than the storage capacity and / or operating speed of the memory card 201.
[0051] Figure 4A circuit diagram of an exemplary memory device 300 including peripheral circuitry, provided for embodiments of this disclosure. The memory device 300 may be... Figure 1 An example of memory device 103 is provided. Memory device 300 may include memory array 301 and peripheral circuitry 302 coupled to memory array 301. Taking memory array 301 as an example of a three-dimensional NAND type memory array, where memory cells 305 are NAND memory cells, provided in the form of an array of memory cell strings 304, each memory cell string 304 extending vertically above a substrate (not shown). In some embodiments, each memory cell string 304 includes a plurality of memory cells 305 coupled in series and stacked vertically. Each memory cell 305 may hold a continuous analog value, such as voltage or charge, depending on the number of electrons trapped in the region of memory cell 305. Each memory cell 305 may be a floating-gate type memory cell including a floating-gate transistor, or a charge-trapping type memory cell including a charge-trapping transistor.
[0052] In some implementations, each memory cell 305 is a single-level cell (SLC) having two possible memory states and thus capable of storing one bit of data. For example, a first memory state "0" may correspond to a first voltage range, and a second memory state "1" may correspond to a second voltage range. In some implementations, each memory cell 305 is a multi-level cell capable of storing more than a single bit of data in four or more memory states, such as a multi-level cell (MLC) storing two bits per cell, a triple-level cell (TLC) storing three bits per cell, or a quad-level cell (QLC) storing four bits per cell.
[0053] like Figure 4As shown, each memory cell string 304 may include a bottom select transistor (BST) 307 at its source end and a top select transistor (TST) 306 at its drain end. The bottom select transistor 307 and the top select transistor 306 may be configured to activate the selected memory cell string 304 during read and program operations. In some embodiments, the sources of memory cell strings 304 within the same memory block 303 may be coupled via a common source line (CSL) 310. In other words, all memory cell strings 304 within the same memory block 303 share a common source (ACS). According to some embodiments, the top select transistor 306 of each memory cell string 304 is coupled to a corresponding bit line (BL) 311, from which data can be read or written via an output bus (not shown). In some implementations, each memory cell string 304 is configured to be selected or deselected by applying a selection voltage (e.g., a voltage higher than the threshold voltage of the top select transistor 306) or a deselect voltage (e.g., 0V) to the top select gate (TSG) of the corresponding top select transistor 306 via one or more top select lines (TSL) 308 and / or by applying a selection voltage (e.g., a voltage higher than the threshold voltage of the bottom select transistor 307) or a deselect voltage (e.g., 0V) to the bottom select gate (BSG) of the corresponding bottom select transistor 307 via one or more bottom select lines (BSL) 309.
[0054] like Figure 4 As shown, the memory cell string 304 can be organized into multiple memory blocks 303, each of which may have a common source line 310. In some embodiments, each memory block 303 is the basic data unit for an erase operation, i.e., all memory cells 305 on the same memory block 303 are erased simultaneously. To erase memory cells 305 in a selected memory block, an erase voltage bias can be used to couple the common source line 310 to the selected memory block and the unselected memory blocks on the same plane as the selected memory block. It should be understood that in some examples, the erase operation can be performed at the half-block level, at the quarter-block level, or at a level with any suitable number of memory blocks or any suitable fraction of memory blocks. Memory cells 305 of adjacent memory cell strings 304 can be coupled via word lines 312, which select which row of memory cells 305 is affected by a read or program operation.
[0055] In some embodiments, peripheral circuitry 302 may include any suitable analog, digital, and mixed-signal circuitry for applying voltage and / or current signals to each target memory cell 305 via bit line 311, word line 312, common-source line 310, bottom select line 309, and top select line 308, and for sensing voltage and / or current signals from each target memory cell 305 to operate the memory array 301. Peripheral circuitry 302 may include various types of peripheral circuitry formed using metal-oxide-semiconductor (MODS) technology.
[0056] Figure 5 Some exemplary peripheral circuitry is shown. Peripheral circuitry 302 includes a page buffer / sensor amplifier 401, a column decoder / bit line driver 402, a row decoder / word line driver 403, a voltage generator 404, control logic 405, a register set 406, a flash memory interface 407, and a data bus 408. It should be understood that in some examples, additional peripheral circuitry may be included. Figure 5 Additional peripheral circuitry not shown.
[0057] Page buffer / sensor amplifier 401 can be configured to read data from and program (write) data to memory array 301 according to control signals from control logic 405. In one example, page buffer / sensor amplifier 401 can store a page of programming data (write data) to be programmed into memory array 301. In another example, page buffer / sensor amplifier 401 can perform a programming verification operation to ensure that data has been correctly programmed into the memory cell coupled to the selected word line. In yet another example, page buffer / sensor amplifier 401 can also sense a low-power signal from the bit line representing the data bits stored in the memory cell and amplify a small voltage swing to a recognizable logic level during a read operation. Column decoder / bit line driver 402 can be configured to be controlled by control logic 405 and select one or more memory cell strings by applying a bit line voltage generated from voltage generator 404.
[0058] The row decoder / word line driver 403 can be configured to be controlled by control logic 405 and to select / deselect memory blocks of memory array 301 and select / deselect word lines of memory blocks. The row decoder / word line driver 403 can also be configured to drive word lines using word line voltages generated from voltage generator 404. In some embodiments, the row decoder / word line driver 403 can also select / deselect and drive bottom select lines and top select lines. As described in detail below, the row decoder / word line driver 403 is configured to perform programming operations on memory cells coupled to one or more selected word lines. The voltage generator 404 can be configured to be controlled by control logic 405 and to generate word line voltages (e.g., read voltage, programming voltage, pass voltage, local voltage, verification voltage, etc.), bit line voltages, and source line voltages to be supplied to memory array 301.
[0059] Control logic 405 can be coupled to each of the peripheral circuits described above and is configured to control the operation of each peripheral circuit. Register set 406 can be coupled to control logic 405 and includes a status register, a command register, and an address register for storing status information, command opcodes (OP codes), and command addresses for controlling the operation of each peripheral circuit. Flash interface 407 can be coupled to control logic 405 and acts as a control buffer to buffer control commands received from host devices (not shown) and relay them to control logic 405, as well as to buffer status information received from control logic 405 and relay it to the memory controller. Flash interface 407 can also be coupled to column decoder / bitline driver 402 via data bus 408 and acts as a data I / O interface and data buffer to buffer data and relay it to or from memory array 301.
[0060] Figure 6 A system diagram including a host and a memory system is provided for embodiments of this disclosure, such as... Figure 6As shown, the memory system 102 is connected to the host 101. The memory system 102 may include a memory controller 104 and a memory device 103. The memory controller 104 may be configured to control operations such as reading, erasing, and programming of the memory device 103; it may also be configured to manage various functions related to data stored or to be stored in the memory device 103, including but not limited to bad block management, garbage collection, logical-to-physical address translation, and wear leveling; and it may also be configured to process error checking and correction (ECC) codes for data read from or written to the memory device 103. Furthermore, the memory controller 104 may perform any other suitable functions, such as formatting the memory device 103, or communicating with external devices (e.g., according to a specific communication protocol) according to a specific communication protocol. Figure 1 The memory controller 104 communicates with the memory device 103. The memory controller 104 and memory device 103 can be coupled in any suitable manner. The memory controller 104 may include a host interface (I / F) 1041, a memory interface (I / F) 1042, a control unit 1043, a cache 1047, and a bus 1040. The host interface 1041 is the connection interface between the host 101 and the memory controller 104, allowing the host 101 and memory controller 104 to communicate according to a specific protocol, send read and write requests, and perform other operations. The memory interface 1042 is the connection interface between the memory controller 104 and the memory device 103, and is used to implement data transfer between the memory controller 104 and the memory device 103. The control unit 1043 is used to control the memory system 102 as a whole.
[0061] It is understandable that some flash memory cannot be overwritten. Therefore, as user data is continuously written, the flash memory space will generate garbage (invalid data). Garbage collection is to remove the valid data from one or more storage blocks and write it to new free storage blocks. After the valid data on these storage blocks has been removed, the storage blocks are then erased so that they can be used to write new data.
[0062] In some specific embodiments, the control unit 1043 may include one or more units with logic operation capabilities, such as a central processing unit (CPU) and / or a microcontroller unit (MCU).
[0063] In some specific embodiments, cache 1047 is used to cache data and can be a volatile memory device with relatively fast read and write speeds, such as static random-access memory (SRAM) and / or dynamic random-access memory (DRAM).
[0064] Figure 7 This is a schematic diagram of a memory system supporting Flexible Data Placement (FDP). The memory system includes four reclaim groups (RG) 0 through 3. Each reclaim group can include one or more reclaim units (RUs). It is understood that the number of reclaim groups described above is merely an example. The memory system can receive I / O commands from the host via a communication interface. The following explanation uses a write command as an example. The write command can include reclaim group information and information about the placement handle associated with the reclaim unit handle. This allows the host to specify the reclaim group and reclaim unit handle (RUH). When the reclaim group and reclaim unit handle information are determined, the pointed-to reclaim unit is also determined, and the reclaim unit can be used to store the data to be written. Memory systems supporting flexible data placement have many advantages because they expose the underlying logic of the device to the host, such as achieving write amplification close to 1 and backward compatibility with legacy applications (APPs).
[0065] The following description uses an SSD as an example of a memory system. It should be understood that the memory system of this disclosure is not limited to this.
[0066] In some embodiments, the memory device includes a plurality of dies, each die including a plurality of memory blocks; the memory controller is configured to divide the plurality of dies into at least one recycling group, each recycling group including at least one die; and a recycling unit includes memory blocks located at the same location in the recycling group at the at least one die.
[0067] In some embodiments, such as Figure 8As shown, the configuration for a recycling group can be as follows: the entire SSD is treated as a single recycling group (RG). An SSD comprises multiple dies, and all dies are grouped into a single recycling group. Each die contains multiple blocks. These blocks are numbered sequentially, for example, starting from 0. Blocks with the same number in different dies can form a superblock, and a superblock constitutes a recycling unit. For example, Block 0 of die 0, Block 0 of die 1, Block 0 of die 2, and Block 0 of die 3 constitute a recycling unit.
[0068] The memory blocks at the same location on the die here can be understood as memory blocks with the same die number.
[0069] In some embodiments, such as Figure 9 As shown, the configuration for a recycling group can be that one or more dies in the SSD are grouped as a single RG. It's important to note that in this scheme, multiple dies do not equal all the dies in the SSD. For example, if the total number of dies in the SSD is 4, then one or two dies can be grouped as a single RG. Figure 9 As shown, if one die is considered as a RG, then one memory block within that die can serve as a recycling unit. Block 0 of die 0 constitutes a recycling unit, and Block 0 of die 1 also constitutes a recycling unit. In other embodiments, if two dies are considered as a RG, then memory blocks with the same number in the two dies can serve as a recycling unit. For example, if die 0 and die 1 are considered as a RG, Block 0 of die 0 and Block 0 of die 1 can constitute a recycling unit. Similarly, if die 2 and die 3 are considered as a RG, Block 0 of die 2 and Block 0 of die 3 can also constitute a recycling unit.
[0070] In some embodiments, the type of reclaimer handle includes a reclaimer handle of the Initially Isolated type. For example... Figure 10As shown, the handle RUH X of the recycling unit currently points to recycling unit RU A. Recycling unit RU A' is a recycling unit that previously had data written to it through the handle RUH X, and currently still contains data written through the handle RUH X. Recycling unit RU A' is completely full of data, with a portion of recycling unit RU A having been written to and the other portion yet to be written to. The handle RUH Y of the recycling unit currently points to recycling unit RU B. Recycling unit RU B' is a recycling unit that previously had data written to it through the handle RUH Y, and currently still contains data written through the handle RUH Y. Recycling unit RU B' is completely full of data, with a portion of recycling unit RU B having been written to and the other portion yet to be written to. The handle RUH Z of the recycling unit currently points to recycling unit RU C. Recycling unit RU C' is a recycling unit that previously had data written to it through the handle RUH Z, and currently still contains data written through the handle RUH Z. C' has been filled with data. Part of the recycling unit RU C has been written with data, while another part of the recycling unit RU C has not yet been written with data.
[0071] like Figure 10 As shown, when performing garbage collection operations on data in the collection unit pointed to by RUH X (including the collection unit RU A currently pointed to by the collection unit handle and the collection unit RU A' which stores valid data previously written through this collection unit handle), the data in the collection units RU B and RU B' pointed to by RUH Y, and the data in the collection units RU C and RU C' pointed to by RUH Z, the data written through RUH X, RUH Y, and RUH Z will be recycled to the same collection unit RUα. In this embodiment, during the data writing phase, data of different types, different popularity, and different lifecycles can be written through different collection unit handles, achieving good physical isolation of data during the data writing phase. However, during the garbage collection operation, data of different types, different popularity, and different lifecycles will be moved together, resulting in insufficient physical isolation of the data.
[0072] In this embodiment of the disclosure, different types of data can be understood as data from different applications.
[0073] In this embodiment, data can be categorized into three types based on its popularity: hot, warm, and cold. In some embodiments, data popularity can be related to the frequency of data usage. In other embodiments, data popularity can be defined based on data type. For example, a data block in a directory can be fixed as hot data. In other embodiments, data popularity can also be defined based on other data characteristics.
[0074] In this embodiment of the disclosure, the lifecycle of data can be understood as the time between the writing and erasure of data.
[0075] In some embodiments, the type of reclaimer handle includes a persistently isolated reclaimer handle. For example... Figure 11 As shown, when performing garbage collection operations on data in the collection units pointed to by RUH X (including the collection unit RU A currently pointed to by the collection unit handle and the collection unit RU A' which stores valid data previously written through this collection unit handle), the data in the collection units RU B and RU B' pointed to by RUH Y, and the data in the collection units RU C and RU C' pointed to by RUH Z, data written through RUH X will be recycled to collection unit RUα, data written through RUH Y will be recycled to collection unit RUβ, and data written through RUH Z will be recycled to collection unit RUγ. When performing garbage collection operations on data in collection units pointed to by persistently isolated collection unit handles, the collection unit that has been used as the garbage collection destination by that collection unit handle will be used first, or a new collection unit will be requested, and data in collection units pointed to by different collection unit handles will be recycled to different collection units respectively. This embodiment can keep data of the same type in the same collection unit handle regardless of whether it is during the data writing stage or after subsequent garbage collection operations, with good physical isolation. After multiple garbage collection operations, only valid data of the same type needs to be moved. However, the solution provided in this embodiment requires the firmware to open a large number of super blocks or a large number of storage blocks simultaneously when performing garbage collection operations, which makes firmware implementation difficult.
[0076] In some embodiments, using the FDP (Freedom to Publish) function of a memory system (e.g., an SSD) may include the following steps: First, the host queries whether the memory controller of the memory system supports the FDP function; if so, it continues with subsequent steps. Second, all namespaces in the current endurance group are deleted. Third, the host uses the `get log page` command to query the configuration information of the FDP function. Fourth, the host enables the FDP function using the `set feature` command. Fifth, the host uses the `get feature` command to obtain FDP event characteristics. Sixth, each reclaim unit handle is configured and an event is specified. Seventh, the host sends an `Identifier` command to specify the data structure and logical block address format (LBA format) of the current namespace. Eighth, the host sends a `namespace management` command to create a namespace, specifically including namespace creation operations, determining the data format, and issuing a `PlacementHandle List`. Ninth, the host sends read and write commands, wherein the write command carries indication information (such as the placement handle and reclaim group identifier) indicating the reclaim unit handle and reclaim group corresponding to the data being written. It should be noted that the order of the above steps can be adjusted according to actual needs, and additional steps can be performed before or after any step.
[0077] In some embodiments, the memory system stores multiple log pages, which can be used to record various information about flexible data placement capabilities. These log pages can be stored either in the memory device or in the cache of the memory controller. For example, the log pages can record usage information for each reclaim unit handle, such as whether the reclaim unit handle is being used by the host. However, if the log pages only record usage information for each reclaim unit handle, the host cannot determine the data usage frequency corresponding to each reclaim unit handle.
[0078] In some embodiments, such as Figure 12As shown, a host can deploy multiple virtual machines (VMs), which run on the host. This example uses three VMs, VM1, VM2, and VM3. Each VM can access and use at least one namespace (NS) of the storage system, and the data written to each VM has different data heat levels, for example, "None," "Short," "Medium," and "Long." In some embodiments, write data with "Long" and "Short" popularity in virtual machine VM1 uses reclaimer handles RUH0 and RUH1, respectively; subsequently, write data with "Long" and "Short" popularity in virtual machine VM2 uses reclaimer handles RUH2 and RUH3, respectively. At this point, all reclaimer handles RUH0 to RUH3 are in use. Thus, virtual machine VM3 must share at least one reclaimer handle with virtual machine VM1 and / or virtual machine VM2, and virtual machine VM3 is unaware of the data popularity corresponding to each reclaimer handle RUH0 to RUH3. Random use of reclaimer handles can cause data with different popularity to become mixed up, resulting in additional write amplification during garbage collection. Furthermore, when reclaimer handle resources are limited, data with similar popularity in virtual machines VM1 and VM2 should be combined to use the same reclaimer handle to free up reclaimer handle resources for other data with different popularity in virtual machine VM3. In other words, the host cannot obtain the data popularity corresponding to the currently used reclaimer handle, so the user cannot select a suitable reclaimer handle.
[0079] like Figure 13 As shown, this disclosure provides a memory system 500, the memory system comprising: at least one memory device 510, the memory device 510 including at least one recycling group, each recycling group including at least one recycling unit; a memory controller 520 coupled to the memory device 510; the memory controller 520 being configured to: create a plurality of namespaces; wherein each namespace corresponds to at least one recycling unit handle, the recycling unit handle being used to indicate a recycling unit corresponding to each recycling group; and receive a plurality of first heat information; each first heat information being used to indicate the heat of data written to a created namespace using a recycling unit handle.
[0080] In this embodiment of the disclosure, the memory system 500 includes at least one memory device 510 and a memory controller 520 coupled to the memory device 510. Here, the memory system 500 is described as an SSD supporting FDP functionality. It should be understood that the memory system 500 of this embodiment is not limited thereto.
[0081] Memory device 510 may be identified as multiple reclaim groups, each reclaim group including one or more reclaim units. Memory controller 520 may receive namespace creation request commands sent by external devices (such as a host) to create namespaces. In some embodiments, each namespace creation request command may be used to create one namespace; in other embodiments, each namespace creation request command may be used to create multiple namespaces. For example, refer to... Figure 13 The memory controller 520 creates Y namespaces, including namespaces NS_1 to NS_Y, where Y is a positive integer.
[0082] In some embodiments, the memory controller 520 is specifically configured to: receive a list of handles corresponding to the created namespace; wherein the list of handles includes a mapping relationship between multiple placement handles and multiple reclaim unit handles, and the first heat information corresponding to each reclaim unit handle; the placement handle is used to indicate the corresponding reclaim unit handle in a write command.
[0083] External devices can specify at least one reclaim unit handle for each created namespace. For example, when the host sends a namespace creation request command, it issues a placement handle list (hereinafter referred to as the handle list) corresponding to that namespace. The placement handle list can include multiple placement handles and multiple reclaim unit handle IDs corresponding one-to-one with the multiple placement handles. Thus, the external device can send a write command including the namespace ID, reclaim group ID, and placement handle information, thereby writing the data to the corresponding reclaim unit in the memory device 510. For example, if the namespace ID indicated by the write command is "NS_1", the reclaim group ID is "RG_1", and the placement handle is "1", then the data will be written to the reclaim group RG_1, and the reclaim unit indicated by the reclaim unit handle RUH N-1 (such as...) Figure 13 (As shown by the dashed coil in the middle).
[0084] When an external device sends a namespace creation request command, it also sends first-hot information corresponding to each reclaimer handle used by the created namespace. This first-hot information indicates the frequency of data written to a namespace using a reclaimer handle. (Reference) Figure 13 Each created namespace corresponds to a handle list, which includes one or more reclaim unit handles used by that namespace, as well as the first popularity information corresponding to each reclaim unit handle. It should be noted that external devices can also send the first popularity information to the memory system 500 in other ways, not limited to sending it through the handle list.
[0085] Thus, in response to a namespace creation request command sent by an external device, the memory controller 520 creates a namespace and receives multiple first-level heat information corresponding to the created namespace. That is, the memory controller 520 can receive multiple first-level heat information and record the heat of data written to the created namespace using each reclaim handle. For example, the memory controller 520 can separately record the heat information of all written data corresponding to each reclaim handle (i.e., data written by one or more created namespaces using that reclaim handle). This allows the external device to reasonably configure the reclaim handle used by the new namespace when creating a new namespace. For example, the heat of the data to be written to the new namespace should be similar to or the same as the heat of the written data corresponding to the reclaim handle to be used by the new namespace, thereby reducing the additional write amplification caused by using the same reclaim handle for data with large heat differences.
[0086] In some embodiments, the memory controller 520 is further configured to: update second popularity information of the corresponding reclaim unit handle in the log page based on the first popularity information; wherein the log page includes second popularity information corresponding to each of the reclaim unit handles; the second popularity information is used to indicate the popularity of all data written to the namespace using the same reclaim unit handle.
[0087] In this embodiment of the disclosure, the memory system 500 may store multiple log pages, which can be used to record various configuration information related to flexible data placement functions. The log pages may be stored either in the memory device 510 or in the cache of the memory controller 520. For example, refer to... Figure 14 The log page can record the second popularity information for each reclaim unit handle. Each second popularity information indicates the popularity of data written to all namespaces using the same reclaim unit handle. It should be noted that the log page can also record any FDP configuration information (such as usage information) corresponding to each reclaim unit handle. The second popularity information can be the average popularity value of data written to all namespaces using the same reclaim unit handle, the maximum and minimum popularity values of data written to all namespaces using the same reclaim unit handle, or the median popularity value of data written to all namespaces using the same reclaim unit handle, etc. No specific restrictions are placed on the format of the second popularity information here.
[0088] In this way, the log page records the secondary heat information corresponding to each reclaim unit handle separately. This allows external devices to reasonably configure the reclaim unit handles used by the new namespace when creating a new namespace. For example, the heat of the data to be written to the new namespace should be similar to or the same as the secondary heat information corresponding to the reclaim unit handle to be used by the new namespace, thereby reducing the additional write amplification caused by using the same reclaim unit handle for data with large differences in heat.
[0089] In some embodiments, the second heat information includes the average heat value of data written to all namespaces using the same reclaim unit handle; the memory controller is further configured to: in response to a write command, write data to be written to the reclaim unit indicated by the target reclaim unit handle corresponding to the write command; wherein the difference between the heat value of the data to be written and the average heat value of data written to all namespaces using the target reclaim unit handle is less than a first preset value.
[0090] In this disclosure, the second heat information may include the average heat value of multiple data entries written using the same reclaimer handle across all namespaces. Exemplarily, the average overwrite time can be used to characterize the second heat information, and the unit of the average overwrite time can be hours. In some embodiments, when using the average overwrite time to characterize the average heat value of the multiple written data entries, its default value can be 0xffff, indicating that the external device has not specified heat information for this reclaimer handle.
[0091] An external device (such as a host) can send a write command to the memory controller 520 of the memory system 500. The write command carries a namespace ID, a reclaim group ID, and placement handle information, thereby indicating the namespace, reclaim group, and reclaim unit handle corresponding to the data to be written. Understandably, before sending the write command, the external device can obtain the second heat information corresponding to each reclaim unit handle in the log page from the memory system 500. Based on the heat of the data to be written, it can determine the reclaim unit handle that matches the heat of the data. For example, the external device can determine the target reclaim unit handle corresponding to the data to be written as the reclaim unit handle where the difference between the average heat value and the heat value of the data to be written is less than a first preset value. Here, the first preset value can be adjusted according to the actual data heat classification requirements. Finally, in response to the write command, the memory controller 520 writes the data to be written to the corresponding reclaim unit through the target reclaim unit handle corresponding to the write command.
[0092] In other words, the difference between the heat value of the data to be written and the average heat value of all data written to the namespace corresponding to the target reclamation unit handle determined by the external device is less than a first preset value. This allows the external device to reasonably configure the reclamation unit handle used by the new namespace when creating a new namespace, thereby reducing the additional write amplification caused by using the same reclamation unit handle for data with large differences in heat.
[0093] In some embodiments, the second heat information includes the maximum and minimum heat values of data written to all namespaces using the same reclaimer handle; the memory controller is further configured to: in response to a write command, write data to be written to the reclaimer indicated by the target reclaimer handle corresponding to the write command; wherein the heat value of the data to be written is less than or equal to the maximum heat value of data written to all namespaces using the target reclaimer handle, and the heat value of the data to be written is greater than or equal to the minimum heat value of data written to all namespaces using the target reclaimer handle.
[0094] In this embodiment of the disclosure, the second popularity information may include the maximum and minimum popularity values of multiple data entries written using the same reclaimer handle across all namespaces. Exemplarily, the average overwrite time can be used to characterize the second popularity information. In some embodiments, when using the average overwrite time to characterize the maximum and minimum popularity values of the written data, the maximum default value can be 0xffff, and the minimum default value can be 0x0.
[0095] An external device (such as a host) can send a write command to the memory controller 520 of the memory system 500. The write command carries a namespace ID, a reclaim group ID, and placement handle information, thereby indicating the namespace, reclaim group, and reclaim unit handle corresponding to the data to be written. Understandably, before sending the write command, the external device can obtain the second heat information corresponding to each reclaim unit handle in the log page from the memory system 500. Based on the heat of the data to be written, it can determine a reclaim unit handle that matches the heat of the data to be written. For example, the external device can select a suitable target reclaim unit handle so that the heat value of the data to be written is within the range between the maximum and minimum heat values corresponding to the target reclaim unit handle. Finally, in response to the write command, the memory controller 520 writes the data to be written to the corresponding reclaim unit through the target reclaim unit handle corresponding to the write command.
[0096] In other words, the hotness value of the data to be written is less than or equal to the maximum hotness value of all data written to the target reclaim unit handle across all namespaces, while the hotness value of the data to be written is greater than or equal to the minimum hotness value of all data written to the target reclaim unit handle across all namespaces. This allows external devices to configure the reclaim unit handles used by new namespaces appropriately when creating new namespaces, thereby reducing the additional write amplification caused by using the same reclaim unit handle for data with large differences in hotness.
[0097] In some embodiments, the log page further includes usage information of the reclaimed unit handle; the usage information is used to indicate whether the reclaimed unit handle is in use; the memory controller 520 is further configured to: in response to a first query command, send the usage information of the reclaimed unit handle in the log page; and in response to a second query command, send the second popularity information of the reclaimed unit handle in the log page.
[0098] In this disclosure embodiment, reference is made to Figure 14 The log page can also record usage information for each reclaim unit handle. For example, the usage information for a reclaim unit handle can include states such as "unused," "host used," and "memory controller used." "Unused" indicates that the corresponding reclaim unit handle is not in use, "host used" indicates that the corresponding reclaim unit handle is used by the host, and "memory controller used" indicates that the corresponding reclaim unit handle is used by the memory controller.
[0099] An external device can send a first query command to the memory controller 520 to query usage information for one or more reclaim unit handles. In response to the first query command, the memory controller 520 can send the usage information of one or more reclaim unit handles in the log page to the external device. The external device can also send a second query command to the memory controller 520 to query second popularity information for one or more reclaim unit handles. In response to the second query command, the memory controller 520 can also send the second popularity information of one or more reclaim unit handles in the log page to the external device.
[0100] In this way, before creating a new namespace, external devices can obtain the usage information and second popularity information of each reclaimer handle through the first query command and the second query command, so as to reasonably configure the reclaimer handle used by the new namespace when creating a new namespace.
[0101] In some embodiments, a log page can record FDP configuration information (such as usage information, second popularity information, etc.) corresponding to multiple recycling unit handles; in other embodiments, a log page can record only the FDP configuration information corresponding to one recycling unit handle, that is, the FDP configuration information corresponding to multiple recycling unit handles is recorded by multiple log pages respectively.
[0102] In some embodiments, the memory controller 520 is further configured to update the usage information of the corresponding reclaim unit handle in the log page based on the reclaim unit handle corresponding to the created namespace.
[0103] In this embodiment, an external device sends a namespace creation request command to the memory controller 520 and distributes a list of placement handles. The memory controller 520 responds to the namespace creation request command by creating a namespace and updates the usage information of the corresponding reclaimable unit handle in the log page based on one or more reclaimable unit handles in the placement handle list. For example, the memory controller 520 can update the usage information of the corresponding reclaimable unit handle in the log page from "unused" to "used by host" based on one or more reclaimable unit handles in the placement handle list distributed by the host. It is understood that if a reclaimable unit handle has been used by another namespace before, the usage information of that reclaimable unit handle in the log page may not be updated when a newly created namespace uses that reclaimable unit handle again.
[0104] In some embodiments, creating a namespace by an external device (such as a host) may include the following steps: First, before creating the namespace, the external device queries the FDP configuration information of each reclaimer handle in the log page. For example, the host first queries the usage information of each reclaimer handle. If the usage information of a reclaimer handle is "host-used," the host further obtains the second popularity information of that reclaimer handle. Then, the external device selects a reclaimer handle with appropriate popularity, sends a namespace creation request command to the memory controller, and issues a corresponding placement handle list. The placement handle list specifies the reclaimer handle corresponding to each placement handle and specifies the first popularity information corresponding to each reclaimer handle. Finally, in response to the namespace creation request command, the memory controller creates the namespace, updates the usage information of the corresponding reclaimer handle in the log page, and updates the second popularity information of the corresponding reclaimer handle in the log page based on the first popularity information in the placement handle list.
[0105] In some embodiments, the memory controller 520 is further configured to: generate configuration information based on the second popularity information of each of the reclaim unit handles; wherein the configuration information includes a mapping relationship between multiple reclaim unit handles and multiple namespaces, and the difference in popularity values of data written using any two namespaces of the same reclaim unit handle is less than a second preset value; and send the configuration information in response to a third query command.
[0106] In this embodiment, the memory controller 520 can also generate configuration information based on the second popularity information of each reclaimer handle in the log page. This configuration information can be a configuration suggestion for the reclaimer handles used when creating a new namespace, provided for reference by external devices. The configuration information can be stored in the memory controller 520 or the memory device 510 in the form of a log page. In some embodiments, the log page storing the configuration information and the log page storing the second popularity information can be different log pages.
[0107] For example, if an external device uses an inappropriate reclaimer handle when creating a new namespace, such as when the data written through the same reclaimer handle has significantly different heat values, the memory controller 520 can generate appropriate namespace and reclaimer handle configuration information based on the second heat information of each reclaimer handle in the log page. The configuration information may include a recommended mapping relationship between multiple reclaimer handles and multiple namespaces, with each namespace corresponding to at least one reclaimer handle. Furthermore, the difference in heat values between any two namespaces written using the same reclaimer handle in this configuration information is less than a second preset value, which can be adjusted according to actual data hot / cold classification requirements. It should be noted that the memory controller 520 can generate and modify the above configuration information in real time based on the second heat information of each reclaimer handle, and is not limited to situations where an external device uses an inappropriate reclaimer handle when creating a new namespace.
[0108] An external device (such as a host) can send a third query command to the memory controller 520 to obtain the aforementioned configuration information. In response to the third query command, the memory controller 520 sends the configuration information to the external device for reference when creating a namespace. This provides a reasonable feedback mechanism between the memory system and the external device to correct unreasonable namespace and reclaim unit handle configurations.
[0109] In some embodiments, the principles by which the memory controller 520 generates configuration information include, but are not limited to: a) mapping placement handles with similar popularity to the same reclaim unit handle, provided that all reclaim unit handles have been used; b) minimizing the amount of modification to the current handle list. Figure 15 This disclosure provides an exemplary format for a log page used to record the aforementioned configuration information. It should be noted that the log page used to record the aforementioned configuration information can also be in other formats. Figure 15 The specific mapping relationships described are merely examples and are not intended to impose excessive limitations. In some embodiments, external devices can also update the placement handle list by replacing the recycling unit handles using the RUH update command.
[0110] In some embodiments, the memory controller 520 may also proactively send the aforementioned configuration information to an external device without needing to receive a third query command from the external device before sending the configuration information. That is, the memory controller 520 can provide real-time configuration suggestions for namespaces and reclaimer handles for the external device to reference, rather than only providing feedback when the external device uses an inappropriate reclaimer handle when creating the namespace.
[0111] In some embodiments, the memory controller 520 is further configured to: in response to modifying the handle list, update the second popularity information of the corresponding recycling unit handle in the log page based on the modified first popularity information.
[0112] In this embodiment, the external device (such as a host) can also actively modify the issued placement handle list to update the reclaim unit handles used by the created namespaces. For example, the external device can modify the reclaim unit handles corresponding to each placement handle in the handle list and modify the corresponding first popularity information. The memory controller 520 can respond to the external device's modification of the handle list by updating the second popularity information corresponding to the corresponding reclaim unit handle in the log page according to the modified first popularity information of one or more reclaim unit handles. That is, when the external device modifies the handle list, it will issue new first popularity information corresponding to the modified reclaim unit handle, and the memory controller 520 will update the second popularity information in the log page in a timely manner when the handle list is modified.
[0113] Based on the above memory system, such as Figure 16As shown, this disclosure also provides an electronic device 600, which includes a memory system 500 and an external device 700 coupled to the memory system 500. The memory system 500 includes: at least one memory device 510, the memory device 510 including at least one recycling group, each recycling group including at least one recycling unit; and a memory controller 520 coupled to the memory device 510. The external device 700 is configured to send a plurality of first commands; each first command instructs the memory system 500 to create a namespace, each namespace corresponding to at least one recycling unit handle, the recycling unit handle being used to indicate... Each of the reclaim groups corresponds to one reclaim unit; multiple first heat information is generated; each first heat information is used to indicate the heat of data written to a namespace using a reclaim unit handle; the memory system 500 is configured to: in response to the multiple first commands, create multiple namespaces respectively; receive the multiple first heat information, and update the second heat information of the corresponding reclaim unit handle in the log page based on the first heat information; wherein, the log page includes the second heat information corresponding to each reclaim unit handle; the second heat information is used to indicate the heat of data written to all namespaces using the same reclaim unit handle.
[0114] In this embodiment of the disclosure, the electronic device 600 includes a memory system 500 and an external device 700. The external device 700 can be a host or any device using the memory system 500 that supports FDP functionality. The memory device 510 can be identified as multiple reclaim groups, each reclaim group including one or more reclaim units. The memory controller 520 can receive namespace creation request commands sent by the external device (such as a host) to create namespaces. In some embodiments, each namespace creation request command can be used to create one namespace; in other embodiments, each namespace creation request command can be used to create multiple namespaces.
[0115] External device 700 can specify at least one reclaim unit handle for each created namespace. For example, when the host sends a namespace creation request command, it issues a placement handle list (hereinafter referred to as the handle list) corresponding to the namespace. The placement handle list can include multiple placement handles and multiple reclaim unit handle IDs corresponding one-to-one with the multiple placement handles. Thus, external device 700 can send a write command including the namespace ID, reclaim group ID, and placement handle information, thereby writing the data to the corresponding reclaim unit in memory device 510. For example, if the namespace ID indicated by the write command is "NS_1", the reclaim group ID is "RG_1", and the placement handle is "1", then the data will be written to the reclaim group RG_1, and the reclaim unit indicated by the reclaim unit handle RUH N-1 (such as...) Figure 13 (As shown by the dashed coil in the middle).
[0116] When sending a namespace creation request command, external device 700 also sends first-hotness information corresponding to each reclaimer handle used by the created namespace. This first-hotness information indicates the frequency of data written to a namespace using a reclaimer handle. (Reference) Figure 13 Each created namespace corresponds to a handle list, which includes one or more garbage collection unit handles used by that namespace, as well as the first popularity information corresponding to each garbage collection unit handle. It should be noted that the external device 700 can also send the first popularity information to the memory system 500 in other ways, not limited to sending it through the handle list.
[0117] The memory system 500 can store multiple log pages, which can be used to record various configuration information related to the flexible data placement function. Log pages can be stored either in the memory device 510 or in the cache of the memory controller 520. For example, a log page can record second heat information for each reclaim unit handle, each second heat information indicating the heat of data written to all namespaces using the same reclaim unit handle. It should be noted that the log page can also record any FDP configuration information (such as usage information) corresponding to each reclaim unit handle. The second heat information can be the average heat value of data written to all namespaces using the same reclaim unit handle, the maximum and minimum heat values of data written to all namespaces using the same reclaim unit handle, or the median heat value of data written to all namespaces using the same reclaim unit handle, etc. No particular restrictions are placed on the form of the second heat information here.
[0118] In this way, the log page records the secondary heat information corresponding to each reclaim unit handle separately. This allows the external device 700 to reasonably configure the reclaim unit handle used by the new namespace when creating a new namespace. For example, the heat of the data to be written to the new namespace is similar to or the same as the secondary heat information corresponding to the reclaim unit handle to be used by the new namespace, thereby reducing the additional write amplification caused by using the same reclaim unit handle for data with large differences in heat.
[0119] In some embodiments, the second heat information includes the average heat value of data written to all namespaces using the same reclaimer handle; the external device 700 is further configured to send a write command indicating a target reclaimer handle corresponding to the data to be written; wherein the difference between the heat value of the data to be written and the average heat value of data written to all namespaces using the target reclaimer handle is less than a first preset value; the memory system 500 is configured to, in response to the write command, write the data to be written to the reclaimer indicated by the target reclaimer handle corresponding to the write command.
[0120] In some embodiments, the second heat information includes the maximum and minimum heat values of data written to all namespaces using the same reclaimer handle; the external device 700 is further configured to: send a write command, the write command indicating a target reclaimer handle corresponding to the data to be written; wherein the heat value of the data to be written is less than or equal to the maximum heat value of data written to all namespaces using the target reclaimer handle, and the heat value of the data to be written is greater than or equal to the minimum heat value of data written to all namespaces using the target reclaimer handle; the memory system 500 is configured to: in response to the write command, write the data to be written to the reclaimer indicated by the target reclaimer handle corresponding to the write command.
[0121] In some embodiments, the log page further includes usage information of the reclaimer handle; the usage information is used to indicate whether the reclaimer handle is used by the external device; the external device 700 is further configured to: send a first query command, the first query command being used to query the usage information of the reclaimer handle in the log page; if the usage information indicates that the reclaimer handle is used by the external device 700, send a second query command, the second query command being used to query the second popularity information of the reclaimer handle in the log page; based on the second popularity information, determine to create at least one reclaimer handle corresponding to the namespace; the memory system 500 is further configured to: in response to the first query command sent by the external device 700, send the usage information of the reclaimer handle in the log page to the external device 700; in response to the second query command sent by the external device 700, send the second popularity information of the reclaimer handle in the log page to the external device 700.
[0122] In some embodiments, the external device 700 is further configured to: send a third query command to obtain configuration information from the memory system 500; wherein the configuration information includes a mapping relationship between a plurality of reclaim unit handles and a plurality of namespaces, and the difference in popularity values of data written using any two namespaces with the same reclaim unit handle is less than a second preset value; the memory system 500 is further configured to: generate the configuration information based on the second popularity information of each reclaim unit handle; and send the configuration information to the external device in response to the third query command sent by the external device 700.
[0123] In some embodiments, the external device 700 is specifically configured to: generate a handle list corresponding to the created namespace; wherein the handle list includes a mapping relationship between multiple placement handles and multiple reclaim unit handles, and the first heat information corresponding to each reclaim unit handle; the placement handle is used to indicate the corresponding reclaim unit handle in a write command; the memory system 500 is specifically configured to: receive the handle list generated by the external device.
[0124] In some embodiments, the external device 700 is further configured to: modify the mapping relationship between the placement handle and the recycling unit handle in the handle list, and the first popularity information corresponding to the recycling unit handle; the memory system 500 is further configured to: in response to the external device modifying the handle list, update the second popularity information of the corresponding recycling unit handle in the log page based on the modified first popularity information.
[0125] The details of the above-described embodiments of the electronic device 600 have been described in detail in the foregoing embodiments of the memory system 500, and will not be repeated here for the sake of brevity.
[0126] Based on the above-described memory system, this disclosure also provides an operation method for the memory system, wherein the memory system includes at least one memory device, the memory device includes at least one recycling group, and each recycling group includes at least one recycling unit; as shown Figure 17 As shown, the operation method includes the following steps:
[0127] Step S10: Create multiple namespaces; wherein each namespace corresponds to at least one reclaim unit handle, and the reclaim unit handle is used to indicate a reclaim unit in each reclaim group;
[0128] Step S20: Receive multiple first heat information; each first heat information is used to indicate the heat of data written to a created namespace using a recycling unit handle.
[0129] It should be understood that Figure 17 The steps shown are not exclusive; other steps may be performed before, after, or between any of the steps shown. Figure 17 The steps shown can be adjusted in order according to actual needs.
[0130] In this way, the memory system can receive multiple first-level heat information and record the heat of data written to created namespaces using each reclaim handle. For example, the memory system can separately record the heat information of all written data corresponding to each reclaim handle (i.e., data written by one or more created namespaces using that reclaim handle). This allows external devices to appropriately configure the reclaim handles used by new namespaces when creating new namespaces. For instance, the heat of the data to be written to the new namespace should be similar to or the same as the heat of the already written data corresponding to the reclaim handle to be used by the new namespace, thereby reducing the additional write amplification caused by using the same reclaim handle for data with significantly different heat levels.
[0131] In some embodiments, the operation method further includes: updating second popularity information of the corresponding reclaimed unit handle in the log page based on the first popularity information; wherein, the log page includes second popularity information corresponding to each of the reclaimed unit handles; the second popularity information is used to indicate the popularity of all data written to the namespace using the same reclaimed unit handle.
[0132] In some embodiments, the second heat information includes the average heat value of data written to all namespaces using the same reclaim unit handle; the operation method further includes: in response to a write command, writing the data to be written to the reclaim unit indicated by the target reclaim unit handle corresponding to the write command; wherein the difference between the heat value of the data to be written and the average heat value of data written to all namespaces using the target reclaim unit handle is less than a first preset value.
[0133] In some embodiments, the second heat information includes the maximum heat value and the minimum heat value of data written to all namespaces using the same reclaimer handle; the operation method further includes: in response to a write command, writing the data to be written to the reclaimer indicated by the target reclaimer handle corresponding to the write command; wherein the heat value of the data to be written is less than or equal to the maximum heat value of data written to all namespaces using the target reclaimer handle, and the heat value of the data to be written is greater than or equal to the minimum heat value of data written to all namespaces using the target reclaimer handle.
[0134] In some embodiments, the log page further includes usage information of the reclaimed unit handle; the usage information is used to indicate whether the reclaimed unit handle is in use; the operation method further includes: in response to a first query command, sending the usage information of the reclaimed unit handle in the log page; in response to a second query command, sending the second popularity information of the reclaimed unit handle in the log page.
[0135] In some embodiments, the operation method further includes: updating the usage information of the corresponding reclaim unit handle in the log page based on the reclaim unit handle corresponding to the created namespace.
[0136] In some embodiments, the operation method further includes: generating configuration information based on the second popularity information of each of the recycling unit handles; wherein the configuration information includes a mapping relationship between multiple recycling unit handles and multiple namespaces, and the difference in popularity values of data written in any two namespaces using the same recycling unit handle is less than a second preset value; and sending the configuration information in response to a third query command.
[0137] In some embodiments, receiving multiple first heat information includes: receiving a handle list corresponding to the created namespace; wherein the handle list includes a multiple mapping relationship between placement handles and multiple reclaim unit handles, and the first heat information corresponding to each reclaim unit handle; the placement handle is used to indicate the corresponding reclaim unit handle in a write command.
[0138] In some embodiments, the operation method further includes: in response to modifying the handle list, updating the second popularity information of the corresponding recycling unit handle in the log page based on the modified first popularity information.
[0139] The details of the operation method of the memory system have been described in detail in the aforementioned embodiments of the memory system 500, and will not be repeated here for the sake of brevity.
[0140] Based on the above-described operation method of the memory system, this disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the operation method of the memory system of any of the above embodiments.
[0141] Here, implementing all or part of the operation methods of the memory system in the above embodiments can be accomplished by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc or a compact disc read-only memory (CD-ROM), etc.; the storage medium can also include combinations of the above types of memory.
[0142] The memory system, its operation method, and electronic device disclosed herein can achieve, for example: Figure 18The configuration scheme of the reclaim unit handles shown can be seen as follows: in virtual machines VM1, VM2, and VM3, write data with a popularity of "Long" uses reclaim unit handle RUH0; in virtual machines VM1 and VM2, write data with a popularity of "Short" uses reclaim unit handle RUH1; in virtual machine VM3, write data with a popularity of "Medium" uses reclaim unit handle RUH2; and in virtual machine VM3, write data with a popularity of "None" uses reclaim unit handle RUH3. This can reduce the confusion of data with different popularity in the same reclaim unit handle and reduce write amplification.
[0143] In the memory system and its operating method and electronic device provided in this disclosure, a log page can be used to record the second heat information of each reclaim unit handle. The second heat information is used to indicate the heat of all data written to all namespaces using a reclaim unit handle. External devices (such as hosts) send out first heat information when creating namespaces or modifying the placement handle list, enabling the memory controller to update the second heat information in a timely manner based on the first heat information of each reclaim unit handle. The memory controller can also provide reasonable namespace and reclaim unit handle configuration information based on the second heat information of each reclaim unit handle. This can reduce the problem of unreasonable RUH usage caused by tenants' inability to obtain other tenants' RUH configuration information in multi-tenant scenarios, and minimize additional write amplification caused by unreasonable configuration.
[0144] The features disclosed in the several device embodiments provided in this disclosure can be arbitrarily combined without conflict to obtain new device embodiments.
[0145] The methods disclosed in the several method embodiments provided in this disclosure can be arbitrarily combined without conflict to obtain new method embodiments.
[0146] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A memory system, characterized in that, The memory system includes: At least one memory device, the memory device comprising at least one recycling group, each recycling group comprising at least one recycling unit; A memory controller, coupled to the memory device; the memory controller is configured to: Multiple namespaces are created; wherein each namespace corresponds to at least one reclaim unit handle, and the reclaim unit handle is used to indicate a reclaim unit corresponding to each reclaim group; Receive multiple first heat information; each first heat information is used to indicate the heat of data written to a namespace created using a recycling unit handle.
2. The memory system according to claim 1, characterized in that, The memory controller is also configured to: Based on the first heat information, the second heat information of the corresponding recycling unit handle in the log page is updated; wherein, the log page includes the second heat information corresponding to each recycling unit handle; the second heat information is used to indicate the heat of all data written to the namespace using the same recycling unit handle.
3. The memory system according to claim 2, characterized in that, The second heat information includes the average heat value of all data written to the namespace using the same reclaim unit handle; the memory controller is further configured to: In response to a write command, the data to be written is written to the recycling unit indicated by the target recycling unit handle corresponding to the write command; wherein the difference between the heat value of the data to be written and the average heat value of all data written using the target recycling unit handle in the namespace is less than a first preset value.
4. The memory system according to claim 2, characterized in that, The second heat information includes the maximum and minimum heat values of data written to all namespaces using the same reclaim unit handle; the memory controller is further configured to: In response to a write command, the data to be written is written to the recycling unit indicated by the target recycling unit handle corresponding to the write command; wherein the heat value of the data to be written is less than or equal to the maximum heat value of all data written using the target recycling unit handle in the namespace, and the heat value of the data to be written is greater than or equal to the minimum heat value of all data written using the target recycling unit handle in the namespace.
5. The memory system according to claim 2, characterized in that, The log page also includes usage information for the recycling unit handle; the usage information is used to indicate whether the recycling unit handle is in use; The memory controller is also configured to: In response to the first query command, the usage information of the recycling unit handle in the log page is sent; In response to the second query command, the second heat information of the recycling unit handle in the log page is sent.
6. The memory system according to claim 5, characterized in that, The memory controller is also configured to: Based on the reclaim unit handle corresponding to the created namespace, update the usage information of the corresponding reclaim unit handle in the log page.
7. The memory system according to claim 2, characterized in that, The memory controller is also configured to: Based on the second popularity information of each of the recycling unit handles, configuration information is generated; wherein, the configuration information includes a mapping relationship between multiple recycling unit handles and multiple namespaces, and the difference in popularity values of data written to any two namespaces using the same recycling unit handle in the configuration information is less than a second preset value; In response to the third query command, the configuration information is sent.
8. The memory system according to claim 2, characterized in that, The memory controller is specifically configured as follows: Receive a list of handles corresponding to the created namespace; wherein the list of handles includes a mapping relationship between multiple placement handles and multiple reclaim unit handles, and the first heat information corresponding to each reclaim unit handle; the placement handle is used to indicate the corresponding reclaim unit handle in the write command.
9. The memory system according to claim 8, characterized in that, The memory controller is also configured to: In response to modifying the handle list, the second popularity information of the corresponding recycling unit handle in the log page is updated based on the modified first popularity information.
10. An electronic device, characterized in that, The electronic device includes a memory system and an external device coupled to the memory system; the memory system includes: At least one memory device, the memory device comprising at least one recycling group, each recycling group comprising at least one recycling unit; A memory controller, coupled to the memory device; The external device is configured as follows: Send a plurality of first commands; each first command is used to instruct the memory system to create a namespace, each namespace corresponding to at least one reclaim unit handle, the reclaim unit handle being used to indicate a reclaim unit corresponding to each reclaim group; Generate multiple first heat information; each first heat information is used to indicate the heat of data written to a created namespace using a recycling unit handle; The memory system is configured as follows: In response to the plurality of first commands, a plurality of the aforementioned namespaces are created respectively; The system receives the plurality of first heat information and updates the second heat information of the corresponding recycling unit handle in the log page based on the first heat information; wherein the log page includes the second heat information corresponding to each recycling unit handle; the second heat information is used to indicate the heat of all data written to the namespace using the same recycling unit handle.
11. The electronic device according to claim 10, characterized in that, The second heat information includes the average heat value of all data written to the namespace using the same reclaim unit handle; the external device is also configured to: Send a write command, the write command indicating the target recycling unit handle corresponding to the data to be written; wherein, the difference between the heat value of the data to be written and the average heat value of all data written using the target recycling unit handle in the namespace is less than a first preset value; The memory system is configured as follows: In response to the write command, the data to be written is written to the recycling unit indicated by the target recycling unit handle corresponding to the write command.
12. The electronic device according to claim 10, characterized in that, The second heat information includes the maximum and minimum heat values of data written to all namespaces using the same reclaim unit handle; the external device is also configured to: Send a write command, the write command indicating the target recycling unit handle corresponding to the data to be written; wherein, the heat value of the data to be written is less than or equal to the maximum heat value of all data written using the target recycling unit handle in the namespace, and the heat value of the data to be written is greater than or equal to the minimum heat value of all data written using the target recycling unit handle in the namespace; The memory system is configured as follows: In response to the write command, the data to be written is written to the recycling unit indicated by the target recycling unit handle corresponding to the write command.
13. The electronic device according to claim 10, characterized in that, The log page also includes usage information for the recycling unit handle; the usage information is used to indicate whether the recycling unit handle is being used by the external device; The external device is also configured to: Send a first query command, the first query command being used to query the usage information of the recycling unit handle in the log page; If the usage information indicates that the recycling unit handle is being used by the external device, a second query command is sent, the second query command being used to query the second popularity information of the recycling unit handle in the log page; Based on the second heat information, determine to create at least one of the recycling unit handles corresponding to the namespace; The memory system is also configured to: In response to the first query command sent by the external device, the usage information of the recycling unit handle in the log page is sent to the external device; In response to the second query command sent by the external device, the second heat information of the recycling unit handle in the log page is sent to the external device.
14. The electronic device according to claim 10, characterized in that, The external device is also configured to: A third query command is sent to obtain configuration information from the memory system; wherein the configuration information includes a mapping relationship between multiple reclaim unit handles and multiple namespaces, and the difference in the heat value of data written to any two namespaces using the same reclaim unit handle is less than a second preset value. The memory system is also configured to: The configuration information is generated based on the second heat information of each of the recycling unit handles; In response to the third query command sent by the external device, the configuration information is sent to the external device.
15. The electronic device according to claim 10, characterized in that, The external device is specifically configured as follows: Generate a handle list corresponding to the created namespace; wherein, the handle list includes a mapping relationship between multiple placement handles and multiple reclaim unit handles, and the first heat information corresponding to each reclaim unit handle; the placement handle is used to indicate the corresponding reclaim unit handle in the write command; The memory system is specifically configured as follows: Receive the handle list generated by the external device.
16. The electronic device according to claim 15, characterized in that, The external device is also configured to: Modify the mapping relationship between the placement handles and the recycling unit handles in the handle list, as well as the first heat information corresponding to the recycling unit handles; The memory system is also configured to: In response to the external device modifying the handle list, the second popularity information of the corresponding recycling unit handle in the log page is updated based on the modified first popularity information.
17. A method for operating a memory system, characterized in that, The memory system includes at least one memory device, the memory device includes at least one recycling group, and each recycling group includes at least one recycling unit; The operation method includes: Multiple namespaces are created; wherein each namespace corresponds to at least one reclaim unit handle, and the reclaim unit handle is used to indicate a reclaim unit corresponding to each reclaim group; Receive multiple first heat information; each first heat information is used to indicate the heat of data written to a namespace created using a recycling unit handle.
18. The operating method according to claim 17, characterized in that, The operation method further includes: Based on the first heat information, the second heat information of the corresponding recycling unit handle in the log page is updated; wherein, the log page includes the second heat information corresponding to each recycling unit handle; the second heat information is used to indicate the heat of all data written to the namespace using the same recycling unit handle.
19. The operating method according to claim 18, characterized in that, The second heat information includes the average heat value of data written to all namespaces using the same reclaim unit handle; the operation method further includes: In response to a write command, the data to be written is written to the recycling unit indicated by the target recycling unit handle corresponding to the write command; wherein the difference between the heat value of the data to be written and the average heat value of all data written using the target recycling unit handle in the namespace is less than a first preset value.
20. The operating method according to claim 18, characterized in that, The second heat information includes the maximum and minimum heat values of data written to all namespaces using the same reclaim unit handle; the operation method further includes: In response to a write command, the data to be written is written to the recycling unit indicated by the target recycling unit handle corresponding to the write command; wherein the heat value of the data to be written is less than or equal to the maximum heat value of all data written using the target recycling unit handle in the namespace, and the heat value of the data to be written is greater than or equal to the minimum heat value of all data written using the target recycling unit handle in the namespace.
21. The operating method according to claim 18, characterized in that, The log page also includes usage information for the recycling unit handle; The usage information is used to indicate whether the recycling unit handle is in use; The operation method further includes: In response to the first query command, the usage information of the recycling unit handle in the log page is sent; In response to the second query command, the second heat information of the recycling unit handle in the log page is sent.
22. The operating method according to claim 21, characterized in that, The operation method further includes: Based on the reclaim unit handle corresponding to the created namespace, update the usage information of the corresponding reclaim unit handle in the log page.
23. The operating method according to claim 18, characterized in that, The operation method further includes: Based on the second popularity information of each of the recycling unit handles, configuration information is generated; wherein, the configuration information includes a mapping relationship between multiple recycling unit handles and multiple namespaces, and the difference in popularity values of data written to any two namespaces using the same recycling unit handle in the configuration information is less than a second preset value; In response to the third query command, the configuration information is sent.
24. The operating method according to claim 18, characterized in that, The receipt of multiple first heat information includes: Receive a list of handles corresponding to the created namespace; wherein the list of handles includes a mapping relationship between multiple placement handles and multiple reclaim unit handles, and the first heat information corresponding to each reclaim unit handle; the placement handle is used to indicate the corresponding reclaim unit handle in the write command.
25. The operating method according to claim 24, characterized in that, The operation method further includes: In response to modifying the handle list, the second popularity information of the corresponding recycling unit handle in the log page is updated based on the modified first popularity information.