Techniques to group media blocks

Methods, systems, and devices for techniques to group media blocks are described. In some cases, a computing system may generate a memory map for a preconfigured size or chunk of data. For example, the computing system may divide files of media blocks into a set of fixed sized chunks of consecutive media blocks. Upon an application requesting a memory map for a set of media blocks, a storage layer of the computing system may generate a sub-map of the memory map for each chunk of data containing a media block of the set of requested media blocks. In some cases, the computing system may assign the chunks of data a continuous range of addresses in the virtual address space of the application. Upon generating the memory map, the storage layer may return an indication of the virtual address ranges of the requested media blocks to the application.

FIELD OF TECHNOLOGY

The following relates to one or more systems for memory, including techniques to group media blocks.

BACKGROUND

DETAILED DESCRIPTION

Some computing systems may make use of databases stored across multiple types of memory devices (e.g., magnetic hard disks, ROM devices, FeRAM devices, flash memory, PCM devices, self-selecting memory, chalcogenide memory technologies, solid states drives (SSDs)). A database may store data in the form of files containing media blocks, which may include a set of keys and a corresponding set of values. In some cases, to access media blocks within files, a computing system may memory map all or a portion of the file to obtain a virtual address for the media block (e.g., may associate a range of virtual addresses in a virtual address space for the application with a physical location in the memory device), which the application may then use to access the media block. In some cases, a computing system may generate a memory map for a whole file containing the media block, which may consume a relatively high portion of the virtual address space of the application. Alternatively, a computing system may generate a memory map for the media block without generating a memory map for the whole file containing the media block, which may reduce virtual address space consumption, but may result in a large quantity of memory maps (e.g., if the application requests many media blocks), which may increase overhead associated with managing memory maps. Such approaches may reduce performance, size, or scalability of memory mapped databases and other large-scale data storage systems.

As described herein, a computing system may generate a memory map for a preconfigured size or quantity of media blocks (e.g., a subset of media blocks). For example, the computing system may divide files of media blocks into a set of subsets of consecutive media blocks, and each subset may have a same quantity of media blocks. Upon an application requesting a memory map for a set of media blocks, a storage layer of the computing system may generate a sub-map of the memory map for each subset of media blocks containing a media block of the set of requested media blocks. In some cases, the computing system may assign the subsets of media blocks a continuous range of addresses (e.g., virtual addresses) in the virtual address space of the application. Upon generating the memory map, the storage layer may return an indication of the virtual address ranges of the requested media blocks to the application. That is, the storage layer may transmit an indication of the virtual addresses corresponding to the requested media blocks in the generated memory map to the application.

Features of the disclosure are initially described in the context of systems and dies as described with reference toFIG.1. Features of the disclosure are described in the context of a system and process flow as described with reference toFIGS.2through3. These and other features of the disclosure are further illustrated by and described with reference to an apparatus diagram and flowcharts that relate to techniques to group media blocks as described with reference toFIGS.4through5.

FIG.1illustrates an example of a system100that supports techniques to group media blocks in accordance with examples as disclosed herein. The system100may include a host device105, a memory system110-a, and a plurality of channels coupling the host device105with the memory system110-a. The system100may include one or more memory devices110-a, but aspects of the one or more memory devices110-amay be described in the context of a single memory device (e.g., memory system110-a).

Portions of the system100may be examples of the host device105. The host device105may be an example of a processor (e.g., circuitry, processing circuitry, a processing component) within a device that uses memory to execute processes, such as within a computing device, a mobile computing device, a wireless device, a graphics processing device, a computer, a laptop computer, a tablet computer, a smartphone, a cellular phone, a wearable device, an internet-connected device, a vehicle controller, a system on a chip (SoC), or some other stationary or portable electronic device, among other examples. In some examples, the host device105may refer to the hardware, firmware, software, or any combination thereof that implements the functions of an external memory controller120. In some examples, the external memory controller120may be referred to as a host (e.g., host device105).

A memory system110-amay be an independent device or a component that is operable to provide physical memory addresses/space that may be used or referenced by the system100. In some examples, a memory system110-amay be configurable to work with one or more different types of host devices. Signaling between the host device105and the memory system110-amay be operable to support one or more of: modulation schemes to modulate the signals, various pin configurations for communicating the signals, various form factors for physical packaging of the host device105and the memory system110-a, clock signaling and synchronization between the host device105and the memory system110-a, timing conventions, or other functions.

The memory system110-amay be operable to store data for the components of the host device105. In some examples, the memory system110-a(e.g., operating as a secondary-type device to the host device105, operating as a dependent-type device to the host device105) may respond to and execute commands provided by the host device105through the external memory controller120. Such commands may include one or more of a write command for a write operation, a read command for a read operation, a refresh command for a refresh operation, or other commands.

The host device105may include one or more of an external memory controller120, a processor125, a basic input/output system (BIOS) component130, or other components such as one or more peripheral components or one or more input/output controllers. The components of the host device105may be coupled with one another using a bus135.

The memory system110-amay include a memory system controller155-aand one or more memory dies160-a(e.g., memory chips) to support a capacity (e.g., a desired capacity, a specified capacity) for data storage. Each memory die160-a(e.g., memory die160-a-a, memory die160-a-b, memory die160-a-N) may include a local memory controller165-a(e.g., local memory controller165-a-a, local memory controller165-a-b, local memory controller165-a-N) and a memory array170-a(e.g., memory array170-a-a, memory array170-a-b, memory array170-a-N). In some examples, a local memory controller165-amay be a separate controller from the memory system controller155-a. For example, the local memory controller165-amay be present on and control the memory die160-a, while the memory system controller155-amay control the memory system110-a. Additionally or alternatively, a memory die160-amay not include a local memory controller165-a. A memory array170-amay be a collection (e.g., one or more grids, one or more banks, one or more tiles, one or more sections) of memory cells, with each memory cell being operable to store one or more bits of data. A memory system110-aincluding two or more memory dies160-amay be referred to as a multi-die memory or a multi-die package or a multi-chip memory or a multi-chip package. In some cases, the memory die160may be non-volatile memory devices such as ferroelectric RAM (FeRAM), magnetic RAM (MRAM), resistive RAM (RRAM), flash memory, phase change memory (PCM), self-selecting memory, chalcogenide memory technologies, not-or (NOR), or not-and (NAND) memory devices.

The memory system controller155-amay include components (e.g., circuitry, logic) operable to control operation of the memory system110-a. The memory system controller155-amay include hardware, firmware, or instructions that enable the memory system110-ato perform various operations and may be operable to receive, transmit, or execute commands, data, or control information related to the components of the memory system110-a. The memory system controller155-amay be operable to communicate with one or more of the external memory controller, the one or more memory dies160-a, or the processor125. In some examples, the memory system controller155-amay control operation of the memory system110-adescribed herein in conjunction with the local memory controller165-aof the memory die160-a.

A local memory controller165-a(e.g., local to a memory die160-a) may include components (e.g., circuitry, logic) operable to control operation of the memory die160-a. In some examples, a local memory controller165-amay be operable to communicate (e.g., receive or transmit data or commands or both) with the memory system controller155-a. In some examples, a memory system110-amay not include a memory system controller155-a, and a local memory controller165-aor the external memory controller120may perform various functions described herein. As such, a local memory controller165-amay be operable to communicate with the memory system controller155-a, with other local memory controllers165-a, or directly with the external memory controller120, or the processor125, or any combination thereof. Examples of components that may be included in the memory system controller155-aor the local memory controllers165-aor both may include receivers for receiving signals (e.g., from the external memory controller120), transmitters for transmitting signals (e.g., to the external memory controller120), decoders for decoding or demodulating received signals, encoders for encoding or modulating signals to be transmitted, or various other components operable for supporting described operations of the memory system controller155-aor local memory controller165-aor both.

The external memory controller may be operable to enable communication of information (e.g., data, commands, or both) between components of the system100(e.g., between components of the host device105, such as the processor125, and the memory system110-a). The external memory controller may process (e.g., convert, translate) communications exchanged between the components of the host device105and the memory system110-a. In some examples, the external memory controller, or other component of the system100or the host device105, or its functions described herein, may be implemented by the processor125. For example, the external memory controller may be hardware, firmware, or software, or some combination thereof implemented by the processor125or other component of the system100or the host device105. In some examples, the external memory controller, or its functions described herein, may be implemented by one or more components of a memory system110-a(e.g., a memory system controller155-a, a local memory controller165-a) or vice versa.

In some examples, the host device105may execute an application175, which may make use of a database stored in a memory system110-a. The application175may communicate, via a storage layer180, with an operating system185of the host device105to manage mappings between virtual addresses accessible by the application175and physical locations of data, such as media blocks, stored in the memory system110-a. For example, the application175may issue a request for virtual addresses corresponding to one or more media blocks to the storage layer180, and the storage layer180may obtain an allocation in a virtual address space of a second memory system110-b(e.g., a main memory of the host device105), along with an indication of a virtual address range for the requested media blocks in the virtual address space from the operating system185. The storage layer180may then return an indication of the virtual address ranges for the requested media blocks to the application175.

In some examples, a host device105may generate a memory map for a preconfigured size or chunk of data. For example, the host device105may divide files of media blocks stored in a memory system110-ainto a set of fixed sized subsets of consecutive media blocks. Upon an application175requesting a memory map for a set of media blocks, a storage layer180of the host device105may generate a sub-map of the memory map for each subset of data containing a media block of the set of requested media blocks. In some cases, the host device105may assign the sub-maps to a continuous range of addresses (e.g., virtual addresses) in the virtual address space of a second memory system110-bfor the application175. Upon generating the memory map, the storage layer180may return an indication of the virtual address ranges of the requested media blocks to the application175. That is, the storage layer180may transmit an indication of the virtual addresses corresponding to the requested media blocks in the generated memory map to the application175.

FIG.2illustrates an example of a system200that supports techniques to group media blocks in accordance with examples as disclosed herein. In some examples, a host system may implement the system200as part retrieving data of a database stored across multiple types of memory devices, such as NAND devices, magnetic hard disks, ROM devices, FeRAM devices, flash memory, PCM devices, self-selecting memory, chalcogenide memory technologies, SSDs, or other non-volatile memory device, which may be referred to as storage devices.

The database may store the data in one or more files205containing sets of keys and corresponding values. In some cases, a file205may include one or more media blocks210containing data, such as one or more key blocks containing keys, one or more value blocks containing values corresponding to keys of the key blocks, a header block containing metadata for the file205, or any combination thereof. In some cases, a header block for a file205may include metadata for media blocks210stored in the file205. For example, the header block may include an indication of identifiers for media blocks210stored in the file205, and may include a mapping between the identifiers and the associated addresses of the media blocks210. In some examples, the size of a media block210(e.g., a size of data of the media block210) may be fixed, and may correspond to a quantity of memory cells of a non-volatile memory device for the database, such as a quantity of memory cells corresponding to one or more pages or blocks of memory cells of a NAND memory device. For example, a media block210may correspond to 32 megabytes of data.

In some cases, the database may store the media blocks210using a log structured merge (LSM) tree. For example, the media blocks210may be examples of read-only data, and may be added by the host system to a first layer of the database. As the first layer becomes populated with media blocks210, the database may merge media blocks210into files205, which may be transferred to one or more lower levels of the data base. In some cases, to access media blocks within files, the operating system of the host system may memory map all or a portion of the file to obtain a virtual address for the media block (e.g., may associate a range of virtual addresses in a virtual address space for the application with a physical location in the memory device), which the application may then use to access the media block. The memory map may be stored in a virtual address space of a higher-tier memory device (e.g., a volatile memory device having a higher access speed than the non-volatile memory devices used to store data of the database), such as a DRAM memory device or main memory of the host system. In some cases, a set of addresses (e.g., virtual addresses) corresponding to the requested media blocks may be referred to as a memory map, and associating virtual addresses with a physical location of data in a storage device may be referred to as memory mapping the data.

By way of example, an application running on the host system may issue a request215to a storage layer of the host system for a memory map of a set of media blocks210, such as the media block210-a, the media block210-b, the media block210-c, the media block210-d, or any combination thereof. For example, the host system may query the database to retrieve values associated with keys stored in the media blocks210-athrough210-d. In some cases, as part of issuing the request215, the application may issue an identifier of the requested media blocks210to the storage layer. The storage layer may be configured to use an identifier of a media block210to determine a physical location (e.g., a physical address within a storage device) of the media block210.

In response to the request, the storage layer may generate a cache map225for the requested media blocks210. In some cases, the cache map225may include an indication of a virtual address range230for each media block210. For example, the cache map225may include a virtual address range230-afor the media block210-a, a virtual address range230-bfor the media block210-b, a virtual address range230-cfor the media block210-c, a virtual address range230-dfor the media block210-d, or any combination thereof. In some examples, a virtual address range230may include an indication of a starting virtual address and an ending virtual address for a memory mapped media block210. Additionally or alternatively the virtual address range230may include the indication of the starting virtual address along with an indication of the size of the corresponding medial block210.

The media blocks210may be stored in a continuous range of addresses (e.g., physical addresses) or locations of a file205, or may be stored in a discontinuous range of addresses of a file205or across multiple files205. For example, the media block210-amay be stored in a file205-a, the media blocks210-band210-cmay be stored in file205-b, and the media block210-dmay be stored in a file205-c. In some examples, keys and values corresponding to the keys may be stored in a same media block210and file205, or may be stored in separate media blocks210and separate files205. For example, a key of a key-value pair may be stored in the media block210-aof file205-a, while a value of the key-value pair may be stored in the media block210-bof file205-b.

In some cases, the virtual address ranges230may each be a portion of a larger sub-map220. For example, a sub-map220may include a range of virtual addresses corresponding to a fixed quantity of media blocks210of the files205. In some examples, a sub-map220may correspond to the virtual address range for a subset of media blocks210of a file having a continuous range of addresses (e.g., physical addresses) of a storage device storing the file205containing the sub-map220. Accordingly, each requested media block210may be included in a subset, and a virtual address range230for each requested media block210may be included in a sub-map220(e.g., the virtual address range230-amay be included in a sub-map220-aof the file205-a, the virtual address range230-bmay be included in a sub-map220-bof the file205-b, the virtual address range230-cmay be included in a sub-map220-cof the file205-b, and the virtual address range230-dmay be included in a sub-map220-dof the file205-c).

In some cases, the storage layer may divide each of the files205into the set of fixed-size chunks or subsets of media blocks210. For example, a subset may include a fixed quantity of media blocks210or may include a fixed size of data. In some examples, a subset may correspond to a continuous range of addresses (e.g., physical addresses) of a storage device storing the file205containing the subset.

In some cases, the storage layer may determine whether each of subsets containing the requested media blocks210have been memory mapped (e.g., whether each of the subsets has been allocated a virtual address range of a sub-map220in the virtual address space). If a subset has not been memory mapped, the storage layer may issue an instruction to the operating system to memory map the subset. Accordingly, the storage layer may receive an allocation of the virtual address space from the operating system for the subset, and the operating system may associate virtual addresses of the allocation with physical locations of media blocks210if the subset generates a sub-map220. Upon receiving the allocation, the storage layer may determine the virtual address ranges230of the media blocks210included in the memory mapped subsets, and may add the virtual address ranges to the cache map225.

After generating the cache map225, the storage layer may return the cache map225to the application, for example as a result of a function call by the application, and the application may use the cache map225to access the media blocks210. For example, the application may issue a read command for data (e.g., for a value associated with a key of the media blocks210) which includes a virtual address range230of the cache map225, and the operating system may retrieve the data from the main memory of the host system.

In some cases, the system200may support multiple cache maps225. For example, the application may issue a second request215to the storage layer for a second set of media blocks210. In such cases, the storage layer may determine that a sub-map220containing one or more of the requested media blocks210may have already been memory mapped, and thus may already be associated with a virtual address range. In such cases, the storage layer may increment a counter associated with the sub-map220(e.g., may reference count the sub-map220) to track references to the sub-map220. The storage layer may identify the virtual address range230of the requested media block210and return the virtual address range230in response to the second request215.

In some examples, the application may issue an unmap command for a media block210. In such cases, the storage layer may decrement the counter associated with a sub-map220containing the media block210. If the value of the counter is greater than a threshold (e.g., greater than zero), the storage layer may determine that another media block210of the sub-map220may still be active (e.g., that the application may have issued a request for the other media block210, but has not issued an unmap command for the other media block210). Alternatively, if the value of the counter satisfies the threshold (e.g., if the value of the counter is zero), the storage layer may determine that no media blocks210of the sub-map220are active. Accordingly, the storage layer may instruct the operating system to unmap the sub-map220, for example by freeing virtual addresses associated with the sub-map220.

FIG.3illustrates an example of a process flow300that supports techniques to group media blocks in accordance with examples as disclosed herein. Operations of the process flow300may be performed by a host device305and one or more memory devices310, which may be examples of the respective devices described with reference toFIGS.1and2. Aspects of the process flow300may be implemented by one or more controllers (e.g., one or more respective controllers at a host device305or a memory device310), among other components. Additionally, or alternatively, aspects of the process flow300may be implemented as instructions stored in memory (e.g., respective firmware stored in a memory of or coupled with a host device305or a memory device310). For example, the instructions, when executed by a controller, may cause a controller to perform one or more operations of the process flow300.

The host device305may implement aspects of the system200to access data of a database stored in the memory device310. For example, an application375running on the host device305may access an LSM tree having a set of files containing media blocks stored in a non-volatile or persistent memory device, such as the memory device310. In some cases, the application375may query the database using one or more keys to retrieve one or more corresponding values, the keys and values being stored in media blocks of the database. To access the media blocks stored in the memory device310, the host device305may, via a storage layer380and an operating system385, memory map portions of files (e.g., sub-maps) containing media blocks of interest, for example by maintaining a virtual address space for the memory mapped portions.

In some examples, at315, the host device305may configure a size of the sub-maps of the files stored in the memory device310. For example, as part of an initialization of the application375(e.g., as part of starting the application375, booting up the application375), the host device may identify a quantity of media blocks for each subset of media blocks of a file, or may identify a data size (e.g., an amount of data) for each subset. Accordingly, subsequent memory maps of sub-maps requested by the application375may be of the configured size.

At320, the application375may issue a request for a cache map of one or more media blocks to the storage layer380. In some examples, the request may include a vector of media block identifiers, each media bock identifier corresponding to a requested media block. Accordingly, at325, the storage layer380may generate a memory map which includes the requested media blocks. For example, the storage layer380may create a cache map as described with reference toFIG.2to hold virtual address ranges of a virtual address space associated with the application375.

At330, as part of generating the memory map, the storage layer380may determine whether one or more sub-maps containing the requested media blocks have already been memory mapped. For example, the storage layer380determine whether a sub-map containing a media block or media block identifier included in the request is present in the virtual address space. If the storage layer380finds a requested media block, the storage layer380may return the virtual address range of the media block in response to the request. In some cases, if the sub-map is present in the virtual address space, the storage layer380may increment a counter associated with the sub-map (e.g., the storage layer380may reference count the sub-map).

Additionally or alternatively, if the storage layer380does not find a sub-map containing a media block of the requested media blocks in the virtual address space, the storage layer380may memory map the sub-map containing the media block. For example, at335, the storage layer380may issue a request to the operating system385for an allocation of the virtual address space (e.g., a request for a range of addresses of the virtual address space for the sub-map).

Upon receiving the request, the operating system385may, at340, map a subset of the virtual address space to a subset of consecutive media blocks (e.g., to the physical addresses of the consecutive media blocks). In some cases, the storage layer380may provide a logical file offset range corresponding to the media blocks to the operating system385, and the operating system385may translate the logical file offset range to the physical addresses of the consecutive media blocks. In some cases, the storage layer may identify a file containing a requested media block using the identifier associated with the media block.

At350, the operating system385may allocate a range of addresses in the virtual address space for the one or more media blocks requested at335, and may issue an indication of the allocation to the storage layer380. The range of virtual addresses may correspond to the range of addresses (e.g., logical addresses) of the one or more sub-maps in the memory device310. In some cases, the indication may include the range of virtual addresses, as well as the an indication of the virtual addresses for each of the requested media blocks.

Upon receiving the allocation, the storage layer380may add virtual address ranges for each of the requested media blocks in the allocated virtual address space to the cache map created at325. Subsequently, at355, the storage layer may return the cache map to the application375, for example as a response to the request received at320.

In some cases, upon receiving the cache map, the application375may issue a read command to access one or more media blocks. For example, at360, the application may issue a read command to the operating system385, and the operating system385may transmit the read command to the memory device310. In some cases, the read command may include the virtual address range for the media block included in the cache map (e.g., the read command may be an example of an address read command). Accordingly, at365, the operating system385may translate the virtual address range to a physical location for the media block. In some case, the media block may not be located in a main memory for the host device305(e.g., in a second memory device, such as a DRAM device for the host device305. In such cases, the operating system385may read the media block into the second memory device and issue the media block to the application375. Additionally or alternatively, if the media block is located in the main memory for the host device305, the application375may retrieve the media block directly from the main memory.

In some examples, at368, the application375may issue an unmap command for a media block. In such cases, the storage layer380may, at370, decrement the counter associated with a sub-map containing the media block. If the value of the counter is greater than a threshold (e.g., greater than zero), the storage layer380may determine that another media block of the sub-map may still be active (e.g., that the application375may have issued a request for the other media block, but has not issued an unmap command for the other media block). Alternatively, if the value of the counter satisfies the threshold (e.g., if the value of the counter is zero), the storage layer380may determine that no media blocks of the sub-map are active. Accordingly, the storage layer380may, at372, instruct the operating system to unmap the sub-map, for example by freeing virtual addresses associated with the sub-map.

FIG.4shows a block diagram400of a host device420that supports chunked media block maps in accordance with examples as disclosed herein. The host device420may be an example of aspects of a host device as described with reference toFIGS.1through3. The host device420, or various components thereof, may be an example of means for performing various aspects of chunked media block maps as described herein. For example, the host device420may include a storage layer interface component425, a memory map control component430, an application interface component435, a counter control component440, a memory device interface component445, an operating system interface component450, or any combination thereof. Each of these components may communicate, directly or indirectly, with one another (e.g., via one or more buses).

The storage layer interface component425may be configured as or otherwise support a means for receiving, by a storage layer, a request from an application for a set of virtual addresses of a memory map of a set of media blocks of a memory device, where the memory device includes a set of files, each file including a respective set of media blocks. The memory map control component430may be configured as or otherwise support a means for generating, by the storage layer, the memory map in a virtual address space for the application, where the memory map includes a plurality of sub-maps within a consecutive region of the virtual address space, and where each sub-map of the plurality of sub-maps corresponds to a respective subset of consecutive media blocks of one of the set of files. The application interface component435may be configured as or otherwise support a means for returning, to the application based on receiving the request, the set of virtual addresses of the memory map corresponding to the set of media blocks.

In some examples, to support generating the memory map, the memory map control component430may be configured as or otherwise support a means for mapping a subset of the virtual address space to a subset of consecutive media blocks of a sub-map, the sub-map including a first media block of the set of media blocks.

In some examples, to support generating the memory map, the memory map control component430may be configured as or otherwise support a means for mapping a second subset of the virtual address space to a subset of consecutive media blocks of a second sub-map, the second sub-map including a second media block of the set of media blocks, where the sub-map and the second sub-map correspond to different files of the set of files.

In some examples, to support generating the memory map, the memory map control component430may be configured as or otherwise support a means for mapping a second subset of the virtual address space to a subset of consecutive media blocks of a second sub-map, the second sub-map including a second media block of the set of media blocks, where the sub-map and the second sub-map correspond to a same file of the set of files.

In some examples, the memory map control component430may be configured as or otherwise support a means for determining whether the sub-map is present in the virtual address space. In some examples, the operating system interface component450may be configured as or otherwise support a means for requesting, from an operating system, a quantity of addresses of the virtual address space for the sub-map based on determining that the sub-map is not present in the virtual address space. In some examples, the operating system interface component450may be configured as or otherwise support a means for receiving an allocation of the quantity of addresses of the virtual address space, where mapping the sub-map is based on receiving the allocation of the quantity of addresses.

In some examples, the storage layer interface component425may be configured as or otherwise support a means for receiving, by the storage layer, a second request from the application for a second set of virtual addresses of a second memory map of a second set of media blocks of the memory device, where the memory map and the second memory map include a same sub-map. In some examples, the counter control component440may be configured as or otherwise support a means for increasing a value of a counter of the sub-map based on generating the second memory map. In some examples, the application interface component435may be configured as or otherwise support a means for returning, to the application based on receiving the second request, the second set of virtual addresses of the second memory map corresponding to the second set of media blocks.

In some examples, the storage layer interface component425may be configured as or otherwise support a means for receiving, by the storage layer, a third request to unmap a media block of the sub-map. In some examples, the counter control component440may be configured as or otherwise support a means for decreasing the value of the counter of the sub-map based on the third request. In some examples, the counter control component440may be configured as or otherwise support a means for determining whether the value of the counter satisfies a threshold. In some examples, the operating system interface component450may be configured as or otherwise support a means for suppressing unmapping the media block based on determining that the value of the counter does not satisfy the threshold.

In some examples, the storage layer interface component425may be configured as or otherwise support a means for receiving, by the storage layer, a fourth request to unmap the media block of the sub-map. In some examples, the counter control component440may be configured as or otherwise support a means for decreasing the value of the counter of the sub-map based on the fourth request. In some examples, the counter control component440may be configured as or otherwise support a means for determining whether the value of the counter satisfies the threshold. In some examples, the operating system interface component450may be configured as or otherwise support a means for unmapping the media block based on determining that the value of the counter satisfies the threshold.

In some examples, each media block of the set of media blocks is associated with a respective identifier of a plurality of identifiers. In some examples, generating the memory map is based at least in part the plurality of identifiers.

In some examples, the application interface component435may be configured as or otherwise support a means for receiving, from the application, a request for a media block of the set of media blocks. In some examples, the memory device interface component445may be configured as or otherwise support a means for retrieving the media block from a second memory device based on the memory map. In some examples, the memory device interface component445may be configured as or otherwise support a means for returning the media block to the application based on retrieving the media block.

In some examples, the application interface component435may be configured as or otherwise support a means for configuring a size of each sub-map of the plurality of sub-maps as part of an initializing procedure for the application.

In some examples, a size of a media block of the set of media blocks corresponds to a preconfigured quantity of pages of the first memory device.

In some examples, the respective virtual addresses of the set of media blocks are discontinuous.

FIG.5shows a flowchart illustrating a method500that supports chunked media block maps in accordance with examples as disclosed herein. The operations of method500may be implemented by a host device or its components as described herein. For example, the operations of method500may be performed by a host device as described with reference toFIGS.1through4. In some examples, a host device may execute a set of instructions to control the functional elements of the device to perform the described functions. Additionally, or alternatively, the host device may perform aspects of the described functions using special-purpose hardware.

At505, the method may include receiving, by a storage layer, a request from an application for a set of virtual addresses of a memory map of a set of media blocks of a memory device, where the memory device includes a set of files, each file including a respective set of media blocks. The operations of505may be performed in accordance with examples as disclosed herein. In some examples, aspects of the operations of505may be performed by a storage layer interface component425as described with reference toFIG.4.

At510, the method may include generating, by the storage layer, the memory map in a virtual address space for the application, where the memory map includes a plurality of sub-maps within a consecutive region of the virtual address space, and where each sub-map of the plurality of sub-maps corresponds to a respective subset of consecutive media blocks of one of the set of files. The operations of510may be performed in accordance with examples as disclosed herein. In some examples, aspects of the operations of510may be performed by a memory map control component430as described with reference toFIG.4.

At515, the method may include returning, to the application based on receiving the request, the set of virtual addresses of the memory map corresponding to the set of media blocks. The operations of515may be performed in accordance with examples as disclosed herein. In some examples, aspects of the operations of515may be performed by an application interface component435as described with reference toFIG.4.

In some examples, an apparatus as described herein may perform a method or methods, such as the method500. The apparatus may include features, circuitry, logic, means, or instructions (e.g., a non-transitory computer-readable medium storing instructions executable by a processor), or any combination thereof for performing the following aspects of the present disclosure:Aspect 1: A method, apparatus, or non-transitory computer-readable medium including operations, features, circuitry, logic, means, or instructions, or any combination thereof for receiving, by a storage layer, a request from an application for a set of virtual addresses of a memory map of a set of media blocks of a memory device, where the memory device includes a set of files, each file including a respective set of media blocks; generating, by the storage layer, the memory map in a virtual address space for the application, where the memory map includes a plurality of sub-maps within a consecutive region of the virtual address space, and where each sub-map of the plurality of sub-maps corresponds to a respective subset of consecutive media blocks of one of the set of files; and returning, to the application based on receiving the request, the set of virtual addresses of the memory map corresponding to the set of media blocks.Aspect 2: The method, apparatus, or non-transitory computer-readable medium of aspect 1, where generating the memory map includes operations, features, circuitry, logic, means, or instructions, or any combination thereof for mapping a subset of the virtual address space to a subset of consecutive media blocks of a sub-map, the sub-map including a first media block of the set of media blocks.Aspect 3: The method, apparatus, or non-transitory computer-readable medium of aspect 2, where generating the memory map further includes operations, features, circuitry, logic, means, or instructions, or any combination thereof for mapping a second subset of the virtual address space to a subset of consecutive media blocks of a second sub-map, the second sub-map including a second media block of the set of media blocks, where the sub-map and the second sub-map correspond to different files of the set of files.Aspect 4: The method, apparatus, or non-transitory computer-readable medium of any of aspects 2 through 3, where generating the memory map further includes operations, features, circuitry, logic, means, or instructions, or any combination thereof for mapping a second subset of the virtual address space to a subset of consecutive media blocks of a second sub-map, the second sub-map including a second media block of the set of media blocks, where the sub-map and the second sub-map correspond to a same file of the set of files.Aspect 5: The method, apparatus, or non-transitory computer-readable medium of any of aspects 2 through 4, further including operations, features, circuitry, logic, means, or instructions, or any combination thereof for determining whether the sub-map is present in the virtual address space; requesting, from an operating system, a quantity of addresses of the virtual address space for the sub-map based on determining that the sub-map is not present in the virtual address space; and receiving an allocation of the quantity of addresses of the virtual address space, where mapping the sub-map is based on receiving the allocation of the quantity of addresses.Aspect 6: The method, apparatus, or non-transitory computer-readable medium of any of aspects 1 through 5, further including operations, features, circuitry, logic, means, or instructions, or any combination thereof for receiving, by the storage layer, a second request from the application for a second set of virtual addresses of a second memory map of a second set of media blocks of the memory device, where the memory map and the second memory map include a same sub-map; increasing a value of a counter of the sub-map based on generating the second memory map; and returning, to the application based on receiving the second request, the second set of virtual addresses of the second memory map corresponding to the second set of media blocks.Aspect 7: The method, apparatus, or non-transitory computer-readable medium of aspect 6, further including operations, features, circuitry, logic, means, or instructions, or any combination thereof for receiving, by the storage layer, a third request to unmap a media block of the sub-map; decreasing the value of the counter of the sub-map based on the third request; determining whether the value of the counter satisfies a threshold; and suppressing unmapping the media block based on determining that the value of the counter does not satisfy the threshold.Aspect 8: The method, apparatus, or non-transitory computer-readable medium of aspect 7, further including operations, features, circuitry, logic, means, or instructions, or any combination thereof for receiving, by the storage layer, a fourth request to unmap the media block of the sub-map; decreasing the value of the counter of the sub-map based on the fourth request; determining whether the value of the counter satisfies the threshold; and unmapping the media block based on determining that the value of the counter satisfies the threshold.Aspect 9: The method, apparatus, or non-transitory computer-readable medium of any of aspects 1 through 8, where each media block of the set of media blocks is associated with a respective identifier of a plurality of identifiers and generating the memory map is based at least in part the plurality of identifiers.Aspect 10: The method, apparatus, or non-transitory computer-readable medium of any of aspects 1 through 9, further including operations, features, circuitry, logic, means, or instructions, or any combination thereof for receiving, from the application, a request for a media block of the set of media blocks; retrieving the media block from a second memory device based on the memory map; and returning the media block to the application based on retrieving the media block.Aspect 11: The method, apparatus, or non-transitory computer-readable medium of any of aspects 1 through 10, further including operations, features, circuitry, logic, means, or instructions, or any combination thereof for configuring a size of each sub-map of the plurality of sub-maps as part of an initializing procedure for the application.Aspect 12: The method, apparatus, or non-transitory computer-readable medium of any of aspects 1 through 11, where a size of a media block of the set of media blocks corresponds to a preconfigured quantity of pages of the first memory device.Aspect 13: The method, apparatus, or non-transitory computer-readable medium of any of aspects 1 through 12, where the respective virtual addresses of the set of media blocks are discontinuous.

A switching component (e.g., a transistor) discussed herein may represent a field-effect transistor (FET), and may comprise a three-terminal component including a source (e.g., a source terminal), a drain (e.g., a drain terminal), and a gate (e.g., a gate terminal). The terminals may be connected to other electronic components through conductive materials (e.g., metals, alloys). The source and drain may be conductive, and may comprise a doped (e.g., heavily-doped, degenerate) semiconductor region. The source and drain may be separated by a doped (e.g., lightly-doped) semiconductor region or channel. If the channel is n-type (e.g., majority carriers are electrons), then the FET may be referred to as a n-type FET. If the channel is p-type (e.g., majority carriers are holes), then the FET may be referred to as a p-type FET. The channel may be capped by an insulating gate oxide. The channel conductivity may be controlled by applying a voltage to the gate. For example, applying a positive voltage or negative voltage to an n-type FET or a p-type FET, respectively, may result in the channel becoming conductive. A transistor may be “on” or “activated” when a voltage greater than or equal to the transistor's threshold voltage is applied to the transistor gate. The transistor may be “off” or “deactivated” when a voltage less than the transistor's threshold voltage is applied to the transistor gate.

For example, the various illustrative blocks and modules described in connection with the disclosure herein may be implemented or performed with a processor, such as a DSP, an ASIC, an FPGA, discrete gate logic, discrete transistor logic, discrete hardware components, other programmable logic device, or any combination thereof designed to perform the functions described herein. A processor may be an example of a microprocessor, a controller, a microcontroller, a state machine, or any type of processor. A processor may also be implemented as a combination of computing devices (e.g., a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration).