Storage device and operation method thereof
Through dynamic management of partition storage technology, the problem of inability to truncate at the boundary when data is written in partition storage is solved, and the effect of effectively utilizing storage space and improving data management efficiency is achieved.
Patent Information
- Application Number
- CN202411384631.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-06
- Filing Date
- 2024-09-30
- Publication Date
- 2025-04-08
AI Technical Summary
In partition storage technology, data cannot be truncated and written at partition boundaries when writing, resulting in the area at the end of each partition that may not be used, resulting in wasting storage space.
By dividing the memory into multiple partitions and allocating at least one cell partition for each partition, a dynamic partition management strategy is adopted. When data cannot be stored in a cell partition, the unit partition state is changed, new cell partitions are allocated, and data is stored in a new cell partition, while the remaining blocks are set as reserved space areas.
The storage space is effectively utilized, the efficiency of data management is improved, and the utilization of storage space is further optimized by performing partition compression on data written to specific partitions.
Smart Images

Figure CN119781669A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This patent application claims priority to Korean Patent Application Nos. 10-2023-0133015 and 10-2023-0133016, filed on October 6, 2023, the entire disclosures of which are incorporated herein by reference for all purposes. Technical Field
[0003] Embodiments of the present disclosure relate to a storage device, and more particularly, to a storage device for processing data of each partition in a device for configuring partitioned storage and an operating method of the storage device. Background Art
[0004] The storage device can store data based on a request from a computer, a mobile terminal such as a smartphone, a tablet PC, and a host such as various electronic devices.
[0005] The storage device may include a controller for controlling a memory (eg, a volatile memory and a non-volatile memory). Such a controller receives a command from a host and performs or controls an operation to read, write, or erase data in the memory included in the storage device based on the received command.
[0006] Recently, the paradigm of computer environment is shifting towards ubiquitous computing, which enables computer systems to be used anywhere, anytime. As a result, mobile devices such as mobile phones, digital cameras, laptop computers, etc. are rapidly and increasingly widely used. Such mobile devices generally use memory systems that utilize storage devices, i.e., data storage devices. Data storage devices are used as primary memory or secondary memory in portable electronic devices.
[0007] Recently, in a flash memory (e.g., Universal Flash Memory (UFS)), a flash memory (e.g., Zoned Universal Flash Memory (ZUFS)) using a partitioned storage technology has been proposed. The partitioned storage technology divides the memory into a plurality of partitions, separates the data into a plurality of data entries based on different purposes and usage frequencies, and stores the plurality of data entries in different partitions of the plurality of partitions, thereby improving the efficiency of data management. However, the partitioned storage technology generally writes data to continuous addresses in each partition, and does not allow data to be truncated and written at the boundary of the partition, so some areas at the end of each partition may not be used. Summary of the invention
[0008] Embodiments of the present disclosure provide a storage device for processing data of each partition in a device adopting partition storage and an operating method of the storage device.
[0009] An embodiment of the present disclosure provides a storage device using a residual block generated per partition and an operating method of the storage device.
[0010] Embodiments of the present disclosure provide a storage device that performs partition compression on data written to a specific partition at a specific time point and an operating method of the storage device.
[0011] The technical problems to be overcome are not limited to the above technical problems. A person skilled in the art can clearly understand other technical problems not mentioned according to the following contents.
[0012] One embodiment of the present disclosure is a storage device, which includes a memory and a memory controller, which is configured to: divide the memory into multiple partitions; allocate at least one unit partition to each of the multiple partitions; store data received from an external device in a first partition among the multiple partitions; when the first unit partition is in a partition open state and is included in the first partition and the data can be stored in the first unit partition, store the data in the first unit partition; when the data cannot be stored in the first unit partition, change the state of the first unit partition to a partition completion state, allocate a second unit partition in the partition open state to the first partition, and store the data in the second unit partition; and determine the empty blocks existing in the unit partition in the partition completion state as remaining blocks, and set the determined remaining blocks to the reserved space area.
[0013] Another embodiment of the present disclosure is an operating method of a memory controller. The operating method includes: dividing a memory into a plurality of partitions; allocating at least one unit partition to each of the plurality of partitions; storing data received from an external device in a first partition among the plurality of partitions; and determining the remaining blocks that are empty blocks existing in the unit partition in a partition completion state as a reserved space area. Storing the data received from an external device in a first partition among the plurality of partitions includes: storing the data in the first unit partition when the first unit partition is in a partition open state and is included in the first partition and the data can be stored in the first unit partition; and when the data cannot be stored in the first unit partition, changing the state of the first unit partition to a partition completion state, allocating a second unit partition in a partition open state to the first partition, and storing the data in the second unit partition.
[0014] Another embodiment of the present disclosure is a storage device, which includes a memory and a memory controller, wherein the memory controller is configured to: divide the memory into multiple feature partitions and allocate at least one unit partition to each of the multiple feature partitions; store data received from an external device in a feature partition among the multiple feature partitions; receive partition compression activation setting information from the external device; and compress data in the feature partition in which partition compression activation is set.
[0015] Another embodiment of the present disclosure is an operating method of a memory controller. The operating method includes: assigning each unit partition to one of a plurality of feature partitions, wherein a memory storage area is divided into a plurality of unit partitions; storing data received from an external device in one or more feature partitions among the plurality of feature partitions; receiving partition compression activation setting information from the external device, and compressing data stored in a feature partition among the plurality of feature partitions for which partition compression activation is set based on the partition compression activation setting information.
[0016] According to an embodiment of the present disclosure, the remaining blocks generated in each partition are collected and set as a reserved space area, so that the storage space can be effectively utilized.
[0017] According to the embodiments of the present disclosure, data is separated and written into different partitions, thereby improving the efficiency of data management. Moreover, partition compression is performed on the data written into a specific partition, thereby effectively utilizing the storage space of the partition storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 Schematically illustrates a configuration of a storage device according to an embodiment of the present disclosure;
[0019] Figure 2 is a diagram for describing type partitioning and unit partitioning according to an embodiment of the present disclosure;
[0020] Figure 3 is a diagram for describing data feature partitioning and unit partitioning according to an embodiment of the present disclosure;
[0021] Figure 4 is a flowchart for describing a partition compression operation in a partition storage device according to an embodiment of the present disclosure;
[0022] Figure 5 is a diagram for describing a process of compressing data written to a cold partition according to an embodiment of the present disclosure;
[0023] Figure 6 is a diagram for describing a process of compressing data when data written to a cold partition is transferred to another address area according to an embodiment of the present disclosure;
[0024] Figure 7 is a diagram for describing a unit partition in which data has been compressed using an embodiment of the present disclosure;
[0025] Figure 8 is a flowchart for describing a process of storing data in a storage device divided into partitions according to an embodiment of the present disclosure;
[0026] Fig. 9 is a flowchart for describing a process of processing remaining blocks existing in each partition according to an embodiment of the present disclosure; and
[0027] Fig.10 is a diagram for describing processing of residual blocks existing in each partition according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0029] Figure 1 The configuration of a storage device 100 according to an embodiment of the present disclosure is schematically shown.
[0030] Reference Figure 1 , the storage device 100 according to an embodiment of the present disclosure may include a memory 110 that stores data and a controller 120 that controls the memory 110 .
[0031] The memory 110 operates in response to the control of the controller 120. Here, the operation of the memory 110 may include, for example, a read operation, a program operation (also referred to as a write operation), and an erase operation.
[0032] For example, the memory 110 may be implemented as various types of memory such as double data rate synchronous dynamic random access memory (DDR SDRAM), fourth generation low power double data rate (LPDDR4) SDRAM, graphic double data rate (GDDR) SDRAM, low power DDR (LPDDR), Rambus dynamic random access memory (RDRAM), NAND flash memory, 3D NAND flash memory, NOR flash memory, resistive random access memory (RRAM), phase change random access memory (PRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), or spin transfer torque random access memory (STT-RAM).
[0033] The memory 110 may be implemented to have a three-dimensional array structure. The embodiments of the present disclosure may be applied not only to a flash memory whose charge storage layer is composed of a conductive floating gate, but also to a charge trap flash memory (CTF) whose charge storage layer is composed of an insulating layer.
[0034] The memory 110 may receive a command and an address from the controller 120 and may access a region selected by the address in the memory cell array. That is, the memory 110 may perform an operation indicated by the command with respect to the region selected by the address.
[0035] For example, the memory 110 may perform a programming operation, a read operation, and an erase operation. During a programming operation, the memory 110 may program data in a region of the memory cell array selected by an address. During a read operation, the memory 110 may read data from a region of the memory cell array selected by an address. During an erase operation, the memory 110 may erase data stored in a region of the memory cell array selected by an address.
[0036] The controller 120 may control write (program) operations, read operations, erase, and background operations on the memory 110. Here, the background operations may include, but are not limited to, one or more of, for example, garbage collection (GC), wear leveling (WL), read reclamation (RR), bad block management (BBM), super write migration, and SLC pass-through migration operations.
[0037] The controller 120 may control the operation of the memory 110 according to a request from an external device (eg, a host (HOST)) 150 located outside the memory device 100. The controller 120 may control the operation of the memory 110 independently of the request from the external device 150.
[0038] The external device 150 may include a computer, an ultra mobile PC (UMPC), a workstation, a personal digital assistant (PDA), a tablet PC, a mobile phone, a smart phone, an e-book, a portable multimedia player (PMP), a portable game console, a navigation system, a black box, a digital camera, a digital multimedia broadcasting (DMB) player, a smart TV, a digital audio recorder, a digital audio player, a digital photo recorder, a digital photo player, a digital video recorder, a digital video player, a storage device forming a data center, one of various electronic devices constituting a home network, one of various electronic devices constituting a computer network, one of various electronic devices constituting a telematics network, a radio frequency identification (RFID) device, or a mobile device (e.g., a vehicle, a robot, a drone) that travels on the ground, in the water, or in the air under human control or autonomously.
[0039] The external device 150 may include at least one operating system (OS). The OS may manage and control the overall functions and operations of the external device, and may provide mutual operation between the external device and the storage device 100. The OS may be divided into a general OS and a mobile OS according to the mobility of the external device.
[0040] The controller 120 and the external device 150 may be separated from each other. In some cases, the controller 120 and the external device 150 may be implemented as one integrated device. Hereinafter, an example in which the controller 120 and the external device 150 are separated from each other will be described.
[0041] Reference Figure 1 , the controller 120 may include a memory interface 122 and a control circuit 123 , and may further include a host interface 121 .
[0042] The host interface 121 provides an interface for communicating with the external device 150. For example, the host interface 121 provides an interface using at least one of various interface protocols such as a Universal Serial Bus (USB) protocol, a MultiMediaCard (MMC) protocol, a Peripheral Component Interconnect (PCI) protocol, a PCI-Express (PCI-e or PCIe) protocol, an Advanced Technology Attachment (ATA) protocol, a Serial ATA protocol, a Parallel ATA protocol, a Small Computer System Interface (SCSI) protocol, an Enhanced Small Disk Interface (ESDI) protocol, an Integrated Drive Electronics (IDE) protocol, or a proprietary protocol.
[0043] When receiving a command from the external device 150 , the control circuit 123 may receive the command through the host interface 121 and may perform an operation of processing the received command.
[0044] The memory interface 122 may be connected to the memory 110 to provide an interface for communicating with the memory 110. That is, the memory interface 122 may be configured to provide an interface between the memory 110 and the controller 120 in response to the control of the control circuit 123.
[0045] The control circuit 123 controls the operation of the memory 110 by performing the overall control operation of the controller 120. To this end, for example, the control circuit 123 may include at least one of a processor 124 and a working memory 125, and may selectively include an error detection and correction circuit (ECC) 126.
[0046] The processor 124 may control the overall operation of the controller 120 and may perform a logic operation. The processor 124 may communicate with the external device 150 through the host interface 121 and may communicate with the memory 110 through the memory interface 122 .
[0047] The processor 124 may perform the function of a flash translation layer (FTL). The processor 124 may map a logical block address (LBA) provided by the external device 150 to a physical block address (PBA) through the flash translation layer (FTL). By using a mapping table, the flash translation layer (FTL) may receive the logical block address (LBA) and may map the logical block address to the physical block address (PBA).
[0048] There are various address mapping methods of the flash translation layer according to the mapping unit. Representative address mapping methods include a page mapping method, a block mapping method, and a hybrid mapping method.
[0049] The processor 124 may randomize the data received from the external device 150. For example, the processor 124 may randomize the data received from the external device 150 by using a set randomization seed. The randomized data may be provided to the memory 110 and programmed into a memory cell array of the memory 110.
[0050] The processor 124 may derandomize the data received from the memory 110 during a read operation. For example, the processor 124 may derandomize the data received from the memory 110 by using a derandomization seed. The derandomized data may be output to the external device 150.
[0051] According to an embodiment, the processor 124 includes an application specific integrated circuit (ASIC) in which the above functions are implemented in a logic form. The processor 124 may control the operation of the controller 120 based on the functions implemented in hardware.
[0052] According to another embodiment, the processor 124 includes a general processor or a digital signal processor (DSP), and can control the operation of the controller 120 by loading and running firmware. In order to control the overall operation of the controller 120 and perform logical operations, the processor 124 can run (drive) the firmware loaded into the working memory 125 at startup.
[0053] For example, the firmware may include a flash translation layer (FTL), a host interface layer (HIL), and a flash interface layer (FIL). The flash translation layer (FTL) performs a conversion function between a logical address requested by an external device to the storage device 100 and a physical address of the memory 110. The host interface layer (HIL) interprets a command requested by the external device 150 to the storage device 100 and sends the command to the flash translation layer (FTL). The flash interface layer (FIL) sends the command indicated by the flash translation layer (FTL) to the memory 110.
[0054] Such firmware may be loaded into the working memory 125, for example, from the memory 110 or a separate non-volatile memory (eg, ROM, NOR flash) located outside the memory 110. When performing startup after power-on, the processor 124 may first load all or part of the firmware into the working memory 125.
[0055] The processor 124 may execute the logic operations defined in the firmware loaded into the working memory 125 to control the overall operation of the controller 120. The processor 124 may store the result of executing the logic operations defined in the firmware in the working memory 125. The processor 124 may control the controller 120 to generate commands or signals according to the result of executing the logic operations defined in the firmware. When the portion of the firmware that defines the logic operations to be executed is not loaded into the working memory 125, the processor 124 may generate an event (e.g., an interrupt) for loading the corresponding portion of the firmware into the working memory 125.
[0056] The processor 124 may load metadata required for driving firmware from the memory 110. The metadata is used to manage the memory 110, and may include management information about user data stored in the memory 110.
[0057] The firmware may be updated when the storage device 100 is manufactured or while the storage device 100 is running. The controller 120 may download new firmware from the outside of the storage device 100, and may update the existing firmware to the new firmware.
[0058] The working memory 125 may store firmware, program code, commands, or data required to drive the controller 120. For example, the working memory 125 may include a volatile memory such as one or more of a static RAM (SRAM), a dynamic RAM (DRAM), and a synchronous DRAM (SDRAM).
[0059] The error detection and correction circuit 126 may detect an error bit of the target data, and may correct the detected error bit by using an error correction code. Here, the target data may be, for example, data stored in the working memory 125 or data read from the memory 110.
[0060] The error detection and correction circuit 126 can be implemented to decode the data using an error correction code. The error detection and correction circuit 126 can be implemented using various code decoders. For example, a decoder that performs non-systematic code decoding or a decoder that performs systematic code decoding can be used.
[0061] The bus 127 may be configured to provide a channel between the components 121, 122, 124, 125, and 126 of the controller 120. For example, such a bus 127 may include a control bus for transmitting various control signals and commands and a data bus for transmitting various data.
[0062] Some of the above components 121, 122, 124, 125, and 126 of the controller 120 may be removed or integrated into one component. In some cases, in addition to the above components of the controller 120, one or more other components may be added.
[0063] The storage device 100 may store data in the memory 110. The basic unit of data storage in the memory 110 is a cell, and a plurality of cells may be grouped together to form a page, which is the minimum unit of data read and write operations. A block may include a plurality of pages and may be the minimum unit of an erase operation. A plurality of blocks may be grouped together to form a plane, and the memory 100 may include a plurality of planes. Here, a cell may be a single-layer cell (SLC) that can store only one bit of information, or a multi-layer cell (MLC), a triple-layer cell (TLC), or a quad-layer cell (QLC) that can store multiple bits of information.
[0064] In order to effectively store and process data, the storage device 100 may divide the storage area of the memory 110 into a plurality of partitions and process data related to the plurality of partitions. The plurality of partitions may be distinguished according to various methods such as purpose or frequency of use. According to an embodiment, each partition may be randomly set, and the size of the partition may be changed dynamically. The partition may be set to include a portion of the total memory area in the memory 110. For example, a unit partition including a plurality of storage blocks may be set, and each of the plurality of set partitions may include at least one unit partition.
[0065] Figure 2 2 is a diagram for describing a unit partition and a type partition for distinguishing partitions according to a data storage type of a unit according to an embodiment of the present disclosure.
[0066] Reference Figure 2 , the controller 120 may set a plurality of unit partitions uz1, uz2, ..., uzN, each unit partition having a specific size (e.g., 1 GB). According to the data storage type of the units constituting the unit partitions, one unit partition may be set as a first type partition TZ1, and another unit partition may be set as a second type partition TZ2.
[0067] The first type partition TZ1 includes one or more cell partitions of single-level cells (SLC) configured to store one bit of data per cell. The second type partition TZ2 may include one or more cell partitions of X-level cells (XLC, where X represents a specific integer among a number greater than or equal to 2) configured to store two or more bits of data per cell. The X-level cell (XLC) may be one of a multi-level cell (MLC) storing two bits of data, a triple-level cell (TLC) storing three bits of data, and a quad-level cell (QLC) storing four bits of data.
[0068] According to an embodiment, the number of cells included in the cell partition corresponding to the first type partition TZ1 and the number of cells included in the cell partition corresponding to the second type partition TZ2 may be different from each other. The number of cell partitions corresponding to the first type partition TZ1 and the number of cell partitions corresponding to the second type partition TZ2 may also be different from each other and may be respectively variable.
[0069] In the following embodiments, the state of the unit partition may be divided into one of a plurality of states according to the use of the partition or the operation state of the partition. According to the embodiment, the states that the unit partition may have may include a partition open state and a partition complete state. The partition open state may be a state in which data can be written. The partition complete state may be a state in which data writing is completed normally and data can no longer be written.
[0070] In this specification, the remaining block may refer to an empty block in which data has not been written in a unit partition in a partition completion state. The empty block may refer to a block of a page in which data has not been written.
[0071] Figure 3 2 is a diagram for describing unit partitioning according to an embodiment of the present disclosure and feature partitioning for distinguishing partitions according to features of stored data.
[0072] Reference Figure 3 , the controller 120 may set a plurality of unit partitions uz1, uz2, . . . , uzN, each unit partition having a specific size (eg, 1 GB).
[0073] In addition, the controller 120 may set a plurality of feature partitions CZ1, CZ2, and CZ3 according to the characteristics of the data stored in the partition. Each of the feature partitions CZ1, CZ2, and CZ3 may include at least one unit partition. According to an embodiment, the characteristics of the data may be divided into hot data HOTDATA, warm data WARM DATA, and cold data COLD DATA according to the read and write frequency characteristics of the corresponding data of the external device 150. According to an embodiment, when writing data, the external device 150 may provide data feature information to the controller 120, and the data feature information indicates whether the data is cold data, warm data, or hot data. The controller 120 may thereby identify the data feature information.
[0074] The first characteristic partition CZ1 may refer to a hot partition HOT where hot data HOT DATA is written, the second characteristic partition CZ2 may refer to a warm partition WARM where warm data WARM DATA is written, and the third characteristic partition CZ3 may refer to a cold partition COLD where cold data COLD DATA is written.
[0075] The controller 120 may receive a data write command including data characteristic information from the external device 150. In addition, the controller 120 may write the received data into a feature partition corresponding to the received data characteristic information among the plurality of feature partitions.
[0076] For example, when the controller 120 receives data and a write command including data characteristic information indicating that the data is hot data, the controller 120 may write the received data into the first characteristic partition (i.e., hot partition) CZ1. When the controller 120 receives a write command including data characteristic information indicating that the data is cold data, the controller 120 may write the received data into the third characteristic partition (i.e., cold partition) CZ3.
[0077] In some embodiments, the controller 120 may set a plurality of feature partitions according to the cell type. For example, the controller 120 may set the hot partition CZ1 and the warm partition CZ2 to include a cell partition consisting of a single-layer cell (SLC), and may set the cold partition CZ3 to include a cell partition consisting of a triple-layer cell (TLC). The hot partition CZ1 and the warm partition CZ2 may be set as a first type partition TZ1, and the cold partition CZ3 may be set as a second type partition TZ2. However, this setting is based on an embodiment, and each feature partition may be set according to various methods (e.g., mixing single-layer cells and triple-layer cells).
[0078] According to an embodiment, the number of unit partitions included in the hot partition CZ1, the warm partition CZ2, and the cold partition CZ3, respectively, may be different from each other, and the number of unit partitions included in the hot partition CZ1, the warm partition CZ2, or the cold partition CZ3 may be variable. For example, at least one unit partition corresponding to the feature partition is not pre-allocated, and a new unit partition may be allocated to the corresponding feature partition whenever a specific feature partition is needed. Therefore, the size of the feature partitions may be different from each other and may change over time. In some embodiments, each of the hot partition CZ1, the warm partition CZ2, and the cold partition CZ3 may be divided into a data partition and a node partition. A data partition is a partition for storing data, and a node partition is a partition for storing metadata of data. Therefore, the hot partition CZ1 may be divided into a hot data partition and a hot node partition, and the warm partition CZ2 may be divided into a warm data partition and a warm node partition. Moreover, the cold partition CZ3 may be divided into a cold data partition and a cold node partition.
[0079] According to an embodiment of the present disclosure, since the controller 120 can identify characteristics of stored data, the storage space of the storage device 100 can be effectively used.
[0080] The controller 120 may effectively utilize a storage space by performing compression on data stored in at least one of the hot zone CZ1 , the warm zone CZ2 , and the cold zone CZ3 .
[0081] After the user of the external device 150 has watched multimedia data such as a movie once, it is unlikely that the multimedia data will be watched again. Therefore, because the frequency of access to the multimedia data by the external device 150 is low, the multimedia data can be classified as cold data. Hereinafter, a method of performing partition compression when cold data such as multimedia is stored in a cold partition will be described in an embodiment.
[0082] Figure 4 is a flowchart for describing a partition compression operation in a partition storage device according to an embodiment of the present disclosure.
[0083] The controller 120 may divide the memory 110 into a plurality of different feature partitions, and each of the plurality of feature partitions may include at least one unit partition. The controller 120 may assign the unit partition to one of the plurality of feature partitions (S405). The controller 120 may receive a data write command including data feature information from the external device 150 (S410). That is, the external device 150 may provide the controller 120 with information indicating whether the data is hot data, warm data, or cold data.
[0084] The controller 120 may actively set a feature partition corresponding to the data feature information among a plurality of feature partitions, and may write data into the set specific feature partition (S420). According to another embodiment, at least one of the plurality of feature partitions may be pre-set before receiving the data. For example, when the external device 150 requests the storage device 100 to set a partition, the controller 120 may set a feature partition corresponding to the data feature information. The controller 120 may store data in a feature partition that is pre-set and corresponds to the data feature information. Moreover, if the remaining area of the pre-set feature partition is insufficient to store data, the external device 150 may additionally set a feature partition corresponding to the data feature information.
[0085] The controller 120 may receive partition compression activation setting information from the external device 150 (S430). When partition compression activation is set, all data written to a partition may be compressed.
[0086] According to an embodiment, the external device 150 may transmit the partition compression activation setting information through a command of an interface protocol (eg, UFS) applied between the external device 150 and the memory device 100. For example, the external device 150 may transmit a command for enabling forced refresh to the memory device 100.
[0087] Hereinafter, in an embodiment, a case where partition compression activation is set only in a cold partition will be described.
[0088] Data written to a cold partition in a partition completion state may be transferred to another address area before a certain point in time (eg, before a refresh operation is performed) due to garbage collection or wear leveling. For example, data written to a cold partition may be transferred to another cold partition or another hot partition.
[0089] In this case, the controller 120 may store the original address of the data transferred to another address area, and may compress the data transferred to another address area at a specific time point (S440, S460, S470). Examples of a method of storing the original address include tagging.
[0090] In this case, the external device 150 may separately transmit information about a specific time point at which the controller 120 performs partition compression to the controller 120 or may not separately transmit information about the specific time point.
[0091] When the external device 150 does not separately transmit information about a specific time point to the controller 120 , the controller 120 may compress data written to the cold partition at a predetermined specific time point (eg, a refresh time point).
[0092] When the data written to the cold partition is not transferred, the controller 120 may compress the data written to the cold partition at a specific time point ( S440 , S450 ).
[0093] Figure 5 is a diagram for describing a process of compressing data written to a cold partition according to an embodiment of the present disclosure. Figure 5 In the , LBA stands for Logical Block Address (LBA).
[0094] First, in operation 1 (initial state), when receiving a data write command from the external device 150, the controller 120 sequentially sets each unit partition of the hot partition, the warm partition, and the cold partition to a partition open state. For example, first, the first unit partition may be set to a partition open state.
[0095] In operation 2 (partition writing), the controller 120 may write data to a feature partition corresponding to the data feature received from the external device 150. According to an embodiment, the controller 120 may write the received data to an open unit partition included in the corresponding feature partition. The controller 120 writes data to an open unit partition included in the corresponding feature partition. When the controller 120 can no longer write data to the corresponding unit partition or the size of the data currently to be written is larger than the remaining area in the corresponding unit partition, the controller 120 may change the unit partition to a partition completion state and may set the new unit partition to a partition open state. For example, when data is written to a first partition (addresses 900 to 999) included in a cold partition, and then the data can no longer be written to the first partition (e.g., data is written to all areas of the first partition) or the size of the data currently to be written is larger than the remaining area in the first partition, the controller 120 may change the first partition to a partition completion state 510 according to a partition completion command received from the external device 150 and may set the second partition (addresses 1000 to 1099) to a partition open state.
[0096] In operation 3 (cold partition compression in refresh), the controller 120 may compress data written to a unit partition in a partition completion state among unit partitions included in the cold partition at a certain time point (e.g., a preset time point for performing refresh). According to an embodiment, when data has been compressed, compression may not be performed on the corresponding unit partition even when the refresh time point is reached.
[0097] When compression is performed, the size of data written to the corresponding unit partition may be reduced as shown (520).
[0098] Figure 6 is a diagram for describing a process of compressing data when data written to a cold partition is transferred to another address area according to an embodiment of the present disclosure.
[0099] First, in operation 1 (initial state), the controller 120 sets each unit partition of the hot partition, the warm partition, and the cold partition to a partition open state. For example, first, the first unit partition may be set to a partition open state.
[0100] In operation 2 (partition writing and cold partition migration), the controller 120 may write data to a feature partition corresponding to the data feature received from the external device 150. According to an embodiment, the controller 120 may write the received data to an open unit partition included in the corresponding feature partition. The controller 120 writes the data to the open unit partition included in the corresponding feature partition. When the corresponding unit partition is completely filled, the controller 120 may change the unit partition to a partition completion state, and may set the new unit partition to a partition open state. For example, when data is written to a first partition (addresses 900 to 999) and a second partition (addresses 1000 to 1099) included in a cold partition and the data is written to all areas of the first partition and the second partition, the controller 120 may change the first partition and the second partition to a partition completion state, and set the third partition (addresses 1100 to 1199) to a partition open state.
[0101] After the random cold partition is completely filled with data, the data in the corresponding cold partition may be transferred to another address area before a certain point in time (for example, before a refresh operation is performed) due to garbage collection or wear leveling performed according to the state of the storage device 100. For example, the data may be transferred to the data hot partition of the cell partition as the cold partition and written in the first partition (addresses 900 to 999) and the second partition (addresses 1000 to 1099).
[0102] In this case, the controller 120 may mark the original addresses of data written to the first partition (addresses 900 to 999) and the second partition (addresses 1000 to 1099) of the unit partition as the cold partition (610). Here, the original addresses of the data may be physical addresses.
[0103] In operation 3 (cold partition compression in refresh), when a refresh time point for data having a tag address is reached, the controller 120 may perform compression even if the data is not currently stored in the cold partition. When compression is performed, the size of the transferred data is reduced (620).
[0104] According to an embodiment of the present disclosure, the controller 120 may effectively utilize space by using unit partitions on which compression has been performed.
[0105] Figure 7 is a diagram for describing a unit partition in which data has been compressed using an embodiment of the present disclosure.
[0106] As shown in the figure, the controller 120 can set the unit partition uz5, that is, the new unit partition, by combining the unit partition uz1 and the unit partition uz2 that have formed the residual blocks by compression. In this case, the controller 120 can generate and store information such as a data structure connecting the unit partition uz1 and the unit partition uz2 that constitute the unit partition uz5. The size of the unit partition uz5, that is, the new unit partition, can be the same as the size of the unit partition uz1 and the unit partition uz2. For example, in the case where a first number of residual blocks are formed in the unit partition uz1 and a second number of residual blocks are formed in the unit partition uz2 by compression, when the sum of the first number and the second number is greater than or equal to the number of blocks constituting one unit partition, the unit partition uz5, that is, the new unit partition, can be set by combining the residual blocks of the unit partition uz1 with the residual blocks of the unit partition uz2.
[0107] Although the residual blocks of the unit partitions may be formed by compression, the residual blocks may be formed in each unit partition according to the size of data written to each unit partition regardless of whether the partition is compressed or not. For example, if the size of the data currently to be written is larger than the size of the empty area remaining in the partition, the partition may be in a partition completion state, and the empty area in the partition where no data is written may become the residual blocks. Therefore, the residual blocks formed may cause management costs and storage space waste of the storage device 100.
[0108] Figure 8 is a flowchart for describing a process of storing data in a storage device divided into partitions according to an embodiment of the present disclosure.
[0109] The controller 120 may divide the memory 110 into a plurality of partitions, and each of the plurality of partitions may include at least one unit partition. The controller 120 may allocate the unit partitions included in each of the plurality of partitions (S710).
[0110] The controller 120 may receive a data write command from the external device 150 ( S720 ).
[0111] The controller 120 may store data in a specific partition among the plurality of partitions according to the received write command.
[0112] In this case, if data can be stored in a first unit partition in a partition open state included in a specific partition, the controller 120 may store the data in the first unit partition (S730).
[0113] If data cannot be stored in a first unit partition in a partition open state included in a specific partition, the controller 120 may change the first unit partition to a partition completion state based on a partition completion command received from the external device 150, may allocate a second unit partition in a partition open state and include the second unit partition in the first partition, and may store the data in the second unit partition (S740).
[0114] The controller 120 may collect (or determine) remaining blocks that are empty blocks that exist in the unit partition in the partition completion state and have no stored data to form a new unit partition, and may set the new unit partition as a reserved space area (S750). Hereinafter, a method for processing the remaining blocks to prevent or improve the above-mentioned management cost and storage space waste will be described.
[0115] Fig. 9 is a flowchart for describing a process of processing remaining blocks existing in each partition according to an embodiment of the present disclosure.
[0116] The controller 120 may receive scatter gather list (SGL) activation information from the external device 150 (S810). The external device 150 may send a single command for activating the scatter gather list to the controller 120. Alternatively, the external device 150 may send a specific command including the scatter gather list activation information to the controller 120. When the scatter gather list activation information includes "enable", the controller 120 may maintain a state in which the scatter gather list can be generated. When the scatter gather list activation information includes "disable", the controller 120 may maintain a state in which the scatter gather list is not generated.
[0117] If the used capacity of the memory device 100 exceeds a predetermined amount (eg, 90%), the external device 150 may transmit activation information to the controller 120 by using a reserved field in a specific command or by using a single command.
[0118] When receiving the activation information from the external device 150 , the controller 120 may also receive type configuration information of a scatter gather list (SGL) ( S820 ).
[0119] The type configuration information of the scatter-gather list can be used to activate the scatter-gather list of a specific partition only. The type configuration information of the scatter-gather list is used to specify the specific partition for generating the scatter-gather list.
[0120] The controller 120 may maintain only the scatter list activation state of the unit partitions included in the set type partition according to the received type configuration information ( S830 ).
[0121] For example, when the controller 120 receives type configuration information (e.g., SLC SGL ENABLE) supporting only the scatter list of the first type partition TZ1 from the external device 150, the controller 120 may maintain only the scatter list activation state of the first type partition TZ1. When the controller 120 receives type configuration information (SLC+XLC(TLC / QLC) SGL ENABLE) supporting both the first type partition TZ1 and the second type partition TZ2 from the external device 150, the controller 120 may maintain the scatter list activation state of both the first type partition TZ1 and the second type partition TZ2.
[0122] The controller 120 may transmit information about the number of remaining blocks currently existing in each unit partition to the external device 150 (S840).
[0123] The external device 150 may transmit a scatter gather list (SGL) generation on command (SGL on) to the controller 120 based on the information about the number of remaining blocks.
[0124] The external device 150 may not receive information about the number of remaining blocks from the memory device 100 , but may transmit a scatter gather list (SGL) generation on command (SGL on) based on the data usage capacity of the memory device 100 .
[0125] When the controller 120 receives a scatter list (SGL on) generation start command from the external device 150, the controller 120 generates a scatter list for the type partition or data feature partition remaining active (S850 and 860). Hereinafter, a method of generating a scatter list for the type partition remaining active will be described.
[0126] In this case, when there are a plurality of type partitions that remain activated, the controller 120 may individually generate a scatter list for each type partition.
[0127] The controller 120 may extract physical addresses of remaining blocks present in each unit partition in a partition completion state, and may collect the extracted physical addresses of the remaining blocks to generate a scatter list.
[0128] When the controller 120 receives a scatter list (SGL) generation off command (SGL off) from the external device 150 ( S870 ), the controller 120 may stop generating the scatter list ( S880 ).
[0129] The controller 120 may set the remaining blocks corresponding to the physical addresses included in the generated scatter list as the over-provisioning area ( S890 ).
[0130] The over-provisioning area can be used during background operations. For example, the remaining blocks set as the over-provisioning area can be used during garbage collection (GC) and wear leveling (WL).
[0131] Fig.10 is a diagram for describing processing of residual blocks existing in each partition according to an embodiment of the present disclosure. Hereinafter, the embodiment will describe a case where a unit partition of a first type partition TZ1 includes an SLC and a unit partition of a second type partition TZ2 includes a TLC.
[0132] First, in operation 1 (partition write), the controller 120 may set a partition open state and may write data to each type of partition.
[0133] In operation 2 (partition write / complete and new partition open), when a specific unit partition included in a specific type partition is filled and becomes a partition complete state after the controller 120 writes data to each type partition, the controller 120 sets a new unit partition to a partition open state.
[0134] Reference numerals 910 and 920 denote unit partitions in a partitioning completed state.
[0135] In operation 3 (update SLC / TLC_SGL), the controller 120 may generate or update a scatter list for each type partition, respectively. For example, the scatter list of the first type partition TZ1 may extract the physical addresses (99, 199, ...) of the remaining blocks from the unit partitions in the partition completion state included in the first type partition TZ1, and the scatter list may be generated by combining the physical addresses of the extracted remaining blocks. Moreover, the scatter list of the second type partition TZ2 may extract the physical addresses (..., 1099, ...) of the remaining blocks from the unit partitions in the partition completion state included in the second type partition TZ2, and the scatter list may be generated by combining the physical addresses of the extracted remaining blocks.
[0136] Also, the controller 120 may set the remaining blocks corresponding to the physical addresses included in the scatter list generated as described above as the over-provisioned space area.
[0137] As described above, according to the embodiments of the present disclosure, the management cost and storage space waste of partition storage can be prevented or improved by processing the remaining blocks generated for each partition.
[0138] According to an embodiment of the present disclosure, storage space may be effectively utilized by collecting remaining blocks generated for each partition and setting the remaining blocks as a reserved space area.
[0139] According to an embodiment of the present disclosure, the storage space of partition storage can be effectively utilized by dividing data by characteristics, writing it into different partitions, and performing partition compression on the data written into a specific partition.
[0140] The above is only an exemplary description of the spirit of the present invention. Those skilled in the art may make various substitutions, modifications and changes to the present invention without departing from the basic features of the present invention. Therefore, the embodiments and drawings of the present invention are not intended to limit the spirit of the present invention, but are intended to describe the spirit of the present invention, and the spirit and scope of the present invention are not limited by the embodiments and drawings. The scope of the present invention should be interpreted by the attached claims. All spirits within the scope equivalent to the claims should be interpreted as included within the scope of the present invention.
Claims
1. A storage device, comprising: Memory; as well as Memory Controller: dividing the memory into a plurality of partitions; allocating at least one unit partition to each of the plurality of partitions; storing data received from an external device in a first partition among the plurality of partitions; When the first unit partition is in a partition open state and is included in the first partition, and the data can be stored in the first unit partition, storing the data in the first unit partition; When the data cannot be stored in the first unit partition, changing the state of the first unit partition to a partition completion state, assigning a second unit partition in the partition open state to the first partition, and storing the data in the second unit partition; as well as Empty blocks existing in the unit partition in the partition completion state are determined as remaining blocks, and the determined remaining blocks are set as the reserved space area.
2. The storage device according to claim 1, wherein: The memory controller: receiving scatter list activation information from the external device; and The scatter-gather list activation state is maintained according to the scatter-gather list activation information.
3. The storage device according to claim 2, wherein: The memory controller: receiving a scatter list generation start command from the external device; as well as A scatter list is generated according to the scatter list generation start command.
4. The storage device according to claim 3, wherein: The memory controller: Generating an open command based on the scatter list to extract the physical address of the remaining block; Generating the scatter list by collecting the extracted physical addresses; and An area corresponding to the physical address is set as the reserved space area.
5. The storage device according to claim 3, wherein: The memory controller transmits the number of remaining blocks to the external device.
6. The storage device according to claim 4, wherein: The memory controller: Dividing the plurality of partitions into first type partitions and second type partitions, the first type partitions comprising cell partitions including single-layer cells (SLCs), the second type partitions comprising cell partitions including X-layer cells (XLCs), where X is an integer greater than or equal to 2; and The scatter-gather lists are generated for the first type partitions and the second type partitions.
7. The storage device according to claim 6, wherein: The memory controller: receiving type configuration information of the scatter list from the external device; as well as Maintains the scatter-gather list activation status of the cell partitions included in the partition and specified by the received type configuration information.
8. The storage device according to claim 7, wherein: When the type configuration information of the scatter-gather list supports both the first type partition and the second type partition, the memory controller maintains the scatter-gather list activation states of both the first type partition and the second type partition.
9. The storage device according to claim 4, wherein: The memory controller: receiving a scatter list generation close command from the external device; as well as The generation of the scatter list is stopped according to the scatter list generation closing command.
10. A method for operating a memory controller, comprising: Divide the memory into multiple partitions; allocating at least one unit partition to each of the plurality of partitions; storing data received from an external device in a first partition among the plurality of partitions; as well as Determine the remaining blocks, which are empty blocks existing in the unit partition in the partition completion state, as a reserved space area; Wherein, storing the data received from the external device in the first partition among the plurality of partitions comprises: When the first unit partition is in a partition open state and is included in the first partition, and the data can be stored in the first unit partition, storing the data in the first unit partition; and When the data cannot be stored in the first unit partition, the state of the first unit partition is changed to the partition completion state, a second unit partition in the partition open state is allocated to the first partition, and the data is stored in the second unit partition.
11. A storage device, comprising: Memory; as well as Memory Controller: dividing the memory into a plurality of feature partitions; Allocating at least one unit partition to each of the plurality of feature partitions; storing data received from an external device in a feature partition among the plurality of feature partitions; receiving partition compression activation setting information from the external device; as well as Compression sets the data in the partition with partition compression activated.
12. The storage device according to claim 11, wherein: The time point for performing the compression is preset.
13. The storage device according to claim 11, wherein: After setting the partition compression activation, the memory controller receives information about a time point at which the compression is performed from the external device.
14. The storage device according to claim 12, wherein: The memory controller: receiving a data write command from the external device, wherein the data write command includes characteristic information of the data; as well as The data is written into a feature partition corresponding to the feature information of the data among the plurality of feature partitions.
15. The storage device according to claim 14, wherein: The characteristic information of the data includes hot data, warm data, and cold data divided according to the read or write frequency characteristics of the external device, and The plurality of characteristic partitions include a hot partition, a warm partition, and a cold partition for storing the hot data, the warm data, and the cold data, respectively.
16. The storage device according to claim 11, wherein: The unit partitions include unit partitions in a partition-open state and unit partitions in a partition-complete state, and The memory controller compresses data stored in a unit partition in the partition completion state among unit partitions of the feature partition in which the partition compression activation is set.
17. The storage device according to claim 15, wherein: The cell partition included in the cold partition includes X-layer cells, namely, XLC, where X is an integer greater than or equal to 2.
18. The storage device according to claim 16, wherein: The memory controller: A new unit partition is set by using remaining blocks of a plurality of unit partitions for which data compression is completed among unit partitions included in the feature partition for which the partition compression activation is set.
19. The storage device according to claim 16, wherein: When data written to a feature partition in which the partition compression activation is set is transferred to another address area before the time point when the compression is performed, the memory controller stores the original address of the data transferred to the other address area and compresses the data transferred to the other address area at the time point when the compression is performed.
Citation Information
Patent Citations
Apparatus and method for compensating for deflection of a manipulator using an tilt sensor
KR1020230133015A
Bungalow with solar self-powered structure
KR1020230133016A