Search

US-12625627-B2 - File system storage allocation based on zones of a memory device

US12625627B2US 12625627 B2US12625627 B2US 12625627B2US-12625627-B2

Abstract

A system and method for performing file system storage allocation using zones of a memory device. An example method involving a host system: receiving zone characteristic data from a memory sub-system that includes a memory device, wherein the memory device includes a plurality of zones and wherein the zone characteristic data comprises one or more locations in the memory device corresponding to the plurality of zones; identifying, by the host system, a write request that comprises file system data for a file system; determining, by the host system, whether the file system data is associated with at least one of the plurality of zones; allocating, by the host system, a storage unit in a zone based on the zone characteristic data; and providing, by the host system, a location of the storage unit to the memory sub-system to store the file system data on the memory device.

Inventors

  • Kumar VKH Kanteti

Assignees

  • MICRON TECHNOLOGY, INC.

Dates

Publication Date
20260512
Application Date
20210202

Claims (20)

  1. 1 . A method comprising: receiving, by a host system, zone characteristic data from a memory sub-system comprising a memory device, wherein the memory device comprises a plurality of zones and wherein the zone characteristic data indicates physical characteristics, logical characteristics, and virtual characteristics of the plurality of zones; identifying, by the host system, a write request that comprises file system data for a file system; analyzing the zone characteristic data to identify a zone of the plurality of zones to store the file system data; aggregating available storage spaces of one or more portions of the zone of the plurality of zones; determining that the aggregated available storage spaces are equal to or greater than a block group size; allocating, by the host system, based on the zone characteristic data and the file system data, a block group of the block group size in the zone of the plurality of zones, wherein the zone comprises a plurality of block groups, wherein the allocated block group comprises a contiguous area reserved for the file system data of the file system and is associated with a block group identifier; and providing, by the host system, a physical address of the block group to the memory sub-system, wherein the physical address references a location of the file system data in the block group.
  2. 2 . The method of claim 1 , wherein the memory sub-system comprises a Solid State Drive (SSD) and wherein the plurality of zones comprise Zoned Namespaces (ZNS).
  3. 3 . The method of claim 1 , wherein the file system comprises a copy on write (COW) file system that copies file data before modifying the file data, wherein the copy on write file system comprises a B-Tree File System (BTRFS).
  4. 4 . The method of claim 1 , wherein the block group comprises one or more extents of the file system, wherein the one or more extents comprise a contiguous group of blocks of the memory device that store a portion of a file.
  5. 5 . The method of claim 1 , wherein allocating the block group based on the zone characteristic data comprises: determining, by the host system, that the zone of the memory device has sufficient space for the block group, wherein the determining is based on a write pointer of the zone and an end location of the zone; and responsive to the zone having sufficient space, allocating the block group in the zone.
  6. 6 . The method of claim 1 , wherein the file system data comprises data of a new file, and wherein allocating the block group comprises: determining the file system data comprises different data types, wherein a first portion of the file system data comprises file data and a second portion of the file system data comprises file metadata; selecting different zones based on the different types of data, wherein a first zone is for data of a file and a second zone is for metadata of the file; and writing, by the host system, the file data to the first zone and the file metadata to the second zone.
  7. 7 . The method of claim 1 , wherein the write request comprises a plurality of write requests with changes to different portions of a superblock of the file system, and further comprising, determining, by the host system, that the superblock is associated with the zone; making a copy in main memory of all data in the zone; updating, by the host system, the copy to reflect the changes of the plurality of write requests; erasing all the data in the zone from the memory device; and initiating, by the host system, a single sequential write of the updated copy in main memory to the zone of the memory device.
  8. 8 . The method of claim 1 , wherein receiving the zone characteristic data comprises the host system receiving the zone characteristic data from a controller of the memory sub-system, the zone characteristic data indicating a size, a write pointer, and a state of each of the plurality of zones.
  9. 9 . The method of claim 1 , wherein the zone characteristic data sent from the memory sub-system to the host system comprises garbage collection data and one or more physical memory locations on the memory device.
  10. 10 . The method of claim 1 , wherein allocating the block group based on the zone characteristic data comprises allocating multiple block groups in non-adjacent zones and wherein providing the physical address comprises providing the physical address of each of the multiple block groups to a controller of the memory sub-system to stripe the file system data across the non-adjacent zones.
  11. 11 . The method of claim 1 , wherein allocating the block group based on the zone characteristic data comprises allocating multiple block groups in zones of different memory devices and wherein providing the physical address comprises providing physical addresses of the multiple block groups to a controller of the memory sub-system to stripe the file system data across the zones of the different memory devices.
  12. 12 . A system comprising: a memory; and a processing device, operatively coupled with the memory, to perform operations comprising: receiving zone characteristic data from a memory sub-system comprising a memory device, wherein the memory device comprises a plurality of zones and wherein the zone characteristic data indicates physical characteristics, logical characteristics, and virtual characteristics of the plurality of zones; identifying a write request that comprises file system data for a file system; analyzing the zone characteristic data to identify a zone of the plurality of zones to store the file system data; aggregating available storage spaces of one or more portions of the zone of the plurality of zones; determining that the aggregated available storage spaces are equal to or greater than a block group size; allocating, based on the zone characteristic data and the file system data, a block group of the block group size in the zone of the plurality of zones, wherein the zone comprises a plurality of block groups, wherein the allocated block group comprises a contiguous area reserved for the file system data of the file system and is associated with a block group identifier; and providing a physical address of the block group to the memory sub-system, wherein the physical address references a location of the file system data in the block group.
  13. 13 . The system of claim 12 , wherein each zone of the plurality of zones accepts sequential write operations from the system, wherein a first zone is associated with a first process executing on the system, and wherein a second zone is associated with a second process executing on the system.
  14. 14 . The system of claim 12 , wherein the processing device is a controller of a Solid State Drive (SSD) and wherein the plurality of zones comprise Zoned Namespaces (ZNS).
  15. 15 . The system of claim 12 , wherein the file system comprises a copy on write (COW) file system that copies file data before modifying the file data, wherein the copy on write file system comprises a B-Tree File System (BTRFS).
  16. 16 . The system of claim 12 , wherein the block group comprises one or more extents of the file system, wherein the one or more extents comprise a contiguous group of blocks of the memory device that store a portion of a file.
  17. 17 . A non-transitory computer-readable medium storing instructions, which when executed by a processing device, cause the processing device to perform operations comprising: receiving zone characteristic data from a memory sub-system comprising a memory device, wherein the memory device comprises a plurality of zones and wherein the zone characteristic data indicates physical characteristics, logical characteristics, and virtual characteristics of the plurality of zones; identifying a write request that comprises file system data for a file system; analyzing the zone characteristic data to identify a zone of the plurality of zones to store the file system data; aggregating available storage spaces of one or more portions of the zone of the plurality of zones; determining that the aggregated available storage spaces are equal to or greater than a block group size; allocating a block group of the block group size in the zone of the plurality of zones based on the zone characteristic data and the file system data, the zone comprising a plurality of block groups, wherein the allocated block group comprises a contiguous area reserved for the file system data of the file system and is associated with a block group identifier; and providing a physical address of the block group to the memory sub-system, wherein the physical address references a location of the file system data in the block group.
  18. 18 . The non-transitory computer-readable medium of claim 17 , wherein the memory sub-system comprises a Solid State Drive (SSD) and wherein the plurality of zones comprise Zoned Namespaces (ZNS).
  19. 19 . The non-transitory computer-readable medium of claim 17 , wherein the file system comprises a copy on write (COW) file system that copies file data before modifying the file data, wherein the copy on write file system comprises a B-Tree File System (BTRFS).
  20. 20 . The non-transitory computer-readable medium of claim 17 , wherein the block group comprises one or more extents of the file system, wherein the one or more extents comprise a contiguous group of blocks of the memory device that store a portion of a file.

Description

TECHNICAL FIELD Embodiments of the disclosure relate generally to memory sub-systems, and more specifically, relate to file system allocation based on zones of a memory device. BACKGROUND A memory sub-system can include one or more memory devices that store data. The memory devices can be, for example, non-volatile memory devices and volatile memory devices. In general, a host system can utilize a memory sub-system to store data at the memory devices and to retrieve data from the memory devices. BRIEF DESCRIPTION OF THE DRAWINGS The disclosure will be understood more fully from the detailed description given below and from the accompanying drawings of various embodiments of the disclosure. The drawings, however, should not be taken to limit the disclosure to the specific embodiments, but are for explanation and understanding only. FIG. 1 illustrates an example computing system that includes a host system and a memory sub-system, in accordance with some embodiments of the present disclosure. FIG. 2 is a detailed block diagram of the computing system of FIG. 1 in accordance with some embodiments of the present disclosure. FIG. 3 is a detailed block diagram of the storage allocator of the file system of FIG. 2, in accordance with some embodiments of the present disclosure. FIG. 4 is a flow chart of a method for file system storage allocation based on zones of a memory device, in accordance with some embodiments of the present disclosure. FIG. 5 is another flow chart of a method for file system storage allocation based on zones of a memory device, in accordance with some embodiments of the present disclosure. FIG. 6 is a schematic diagram that illustrates a computing system including host file system association of stream identifiers (IDs) with data types and of the stream IDs with particular zones, in accordance with some embodiments of the present disclosure. FIG. 7 is a block diagram of an example computer system in which embodiments of the present disclosure can operate. DETAILED DESCRIPTION Aspects of the present disclosure are directed to file system storage allocation that is based on zones of a memory sub-system. The memory sub-system can be a storage device, a memory module, or a combination of a storage device and memory module. Examples of storage devices and memory modules are described below in conjunction with FIG. 1. In general, a host system can utilize a memory sub-system that includes one or more memory devices that store data. The host system can provide data to be stored at the memory sub-system and can request data to be retrieved from the memory sub-system. The memory sub-system and memory devices can store data from the host system in storage media, e.g., integrated circuit (IC) dies having addressable memory cells that individually store the data. Processing in certain memory sub-systems today is generally performed with random allocations to the memory devices and in small increments of data, e.g., four kilobytes (KB). These random allocations of a page or a block of data include non-sequential and/or random writes to the memory devices. This practice results in high costs in memory, e.g., dynamic random access memory (DRAM), static random access memory (SRAM), or persistent memory, for storing mapping data structures that track logical-to-physical (LTP) address mapping between logical block address (LBA) space and physical address space of the IC dies. For example, mapping overhead is about a gigabyte (GB) per terabyte (TB) of host addressable media, and thus, a 16 TB solid-state drive (SSD) requires a significant 16 GB of memory mapping overhead. Additionally, periodic snapshotting and logging is done to persist the mapping data structures across shutdowns and surprise power failure situations. This adds additional write overhead to the IC dies and performance loss. Storage stacks are in the process of being modified to take advantage of sequential input-output (IO) memory device efficiencies. For example, storage stacks included in file systems group data by locality (e.g., according to thread, process, or application) and write the data sequentially to storage devices. File systems can then write data of different localities as parallel sequential streams to storage devices, each stream having its own locality. Reference to locality can reference either temporal locality or spatial locality. Data having temporal locality is data that a processor tends to access at the same memory locations repetitively over a short period of time, e.g., data written, over-written, and trimmed around the same time. Data having spatial locality captures the tendency that when a memory device references a particular storage location at a particular time, then the memory device is likely to reference nearby memory locations in the near future. In this case, a processor can attempt to determine the size and shape of the area around the current reference for which it is worthwhile to prepare for faster ac