Scratchpad cache for gaming and IoT hosts
Aspects of a data storage device are provided that optimize utilization of a scratchpad memory. The data storage device includes an NVM and a controller which allocates a memory location of the NVM as scratchpad memory for a host. The controller receives a command including data from a submission queue associated with the scratchpad memory, stores the data in the scratchpad memory, and disables first updates to the L2P mapping table for the data in the scratchpad memory across power cycles. The controller also receives commands from other submission queues for other memory locations than the scratchpad memory, stores data in the other memory locations, and stores second updates to a L2P mapping table. The first and second updates may include different data lengths. Thus, the device accounts for differences between scratchpad memory and NVM in at least data alignment, L2P granularity, and response, resulting in efficient scratchpad memory management.
1. A data storage device, comprising:
non-volatile memory (NVM) including a first memory location and a second memory location; and
one or more processors coupled to the NVM, the one or more processors, individually or in combination, configured to:
allocate the first memory location of the NVM as scratchpad memory for a host;
store first data from the host in the scratchpad memory;
disable a first update to a logical-to-physical (L2P) mapping table for the first data in the scratchpad memory;
store second data from the host in the second memory location; and
store a second update to the L2P mapping table for the second data in the second memory location;
wherein the first update includes a first amount of data in a first L2P entry for the stored first data and the second update includes a second amount of data in a second L2P entry for the stored second data different than the first amount of data, the first amount of data being a first L2P granularity of the stored first data, and the second amount of data being a second L2P granularity of the stored second data, the first L2P granularity and the second L2P granularity being associated with different ranges of logical addresses, and the first L2P granularity being unique for scratchpad data.
2. The data storage device of claim 1 ,
wherein a data length of the first data is at least one sector of the NVM.
3. The data storage device of claim 2 ,
wherein the first data is data segregated from other host data;
wherein a data length of the other host data is less than one sector of the NVM;
wherein the first data is associated with a lower quality of service (QoS) than the other host data.
4. The data storage device of claim 1 ,
wherein the one or more processors, individually or in combination, are further configured to receive an indication from the host of the first L2P granularity for the first update.
5. The data storage device of claim 1 ,
wherein the one or more processors, individually or in combination, are further configured to:
store third data from the host in the scratchpad memory; and
disable a third update to the L2P mapping table for the third data in the scratchpad memory; and
wherein the third data is associated with a different application program than the first data;
wherein the third update includes a third L2P granularity of the stored third data that is different than the first L2P granularity of the first update.
6. The data storage device of claim 5 ,
wherein the one or more processors, individually or in combination, are further configured to receive an indication from the host of the first L2P granularity for the first update and the third L2P granularity for the third update.
7. The data storage device of claim 5 ,
wherein the one or more processors, individually or in combination, are further configured to associate the third L2P granularity of the third update with an application program associated with the third data in response to a host write pattern of other data associated with the application program.
8. The data storage device of claim 1 ,
wherein the one or more processors, individually or in combination, are further configured to:
allocate a first region and a second region of the scratchpad memory;
store the first data in the first region of the scratchpad memory;
store third data in the second region of the scratchpad memory; and
disable a third update to the L2P mapping table for the third data in the scratchpad memory;
wherein the third update includes a third L2P granularity of the stored third data that is different than the first L2P granularity of the first update.
9. The data storage device of claim 8 ,
wherein the first region and the second region are associated with different hosts.
10. The data storage device of claim 8 ,
wherein the third data is associated with an application program;
wherein the one or more processors, individually or in combination, are further configured to associate the third L2P granularity of the third update with the second region of the scratchpad memory in response to a host write pattern of other data associated with the application program.
11. The data storage device of claim 1 ,
wherein the one or more processors, individually or in combination, are further configured to:
receive a first command including the first data from a first submission queue associated with the scratchpad memory, the first submission queue including requests for volatile data; and
receive a second command including the second data from a second submission queue associated with the NVM, the second submission queue including requests for non-volatile data.
12. A data storage device, comprising:
non-volatile memory (NVM) including a first memory location and a second memory location; and
one or more processors coupled to the NVM, the one or more processors, individually or in combination, configured to:
allocate the first memory location of the NVM as scratchpad memory for a host;
receive a first command including first data from a first submission queue associated with the scratchpad memory, the first submission queue including requests for volatile data;
store the first data in the scratchpad memory;
disable a first update to a logical-to-physical (L2P) mapping table for the first data in the scratchpad memory;
receive a second command including second data from a second submission queue associated with the NVM, the second submission queue including requests for non-volatile data;
store the second data in the second memory location; and
store a second update to the L2P mapping table for the second data in the second memory location;
wherein the first update includes a first amount of data in a first L2P entry for the stored first data and the second update includes a second amount of data in a second L2P entry for the stored second data different than the first amount of data, the first amount of data being a first L2P granularity of the stored first data, and the second amount of data being a second L2P granularity of the stored second data, the first L2P granularity and the second L2P granularity being associated with different ranges of logical addresses, and the first L2P granularity being unique for scratchpad data.
13. The data storage device of claim 12 ,
wherein the one or more processors, individually or in combination, are further configured to receive a third command including third data from a third submission queue associated with the scratchpad memory, the third submission queue including other requests for volatile data;
wherein the first submission queue and the third submission queue are associated with different hosts.
14. The data storage device of claim 12 ,
wherein the one or more processors, individually or in combination, are further configured to receive a third command including third data from a third submission queue associated with the scratchpad memory, the third submission queue including other requests for volatile data;
wherein the first submission queue is associated with a different weightage than the third submission queue.
15. The data storage device of claim 12 ,
wherein the first submission queue is associated with a greater weightage than a weightage of the second submission queue.
16. The data storage device of claim 12 ,
wherein the one or more processors, individually or in combination, are further configured to:
allocate a first region and a second region of the scratchpad memory; and
receive a third command including third data from a third submission queue associated with the scratchpad memory, the third submission queue including other requests for volatile data;
wherein the first submission queue is associated with the first region and the third submission queue is associated with the second region.
17. The data storage device of claim 12 ,
wherein the one or more processors, individually or in combination, are further configured to:
receive a third command including third data from a third submission queue associated with the scratchpad memory, the third submission queue including other requests for volatile data; and
disable a third update to the L2P mapping table for the third data in the scratchpad memory; and
wherein the third update includes a third L2P granularity of the third data different than the first L2P granularity;
wherein the first submission queue is associated with the first L2P granularity and the third submission queue is associated with the third L2P granularity.
18. The data storage device of claim 17 ,
wherein the one or more processors, individually or in combination, are further configured to allocate a first region and a second region of the scratchpad memory;
wherein the first L2P granularity is associated with the first region and the third L2P granularity is associated with the second region.
19. The data storage device of claim 18 ,
wherein the first region is associated with a different host than that of the second region.
20. A data storage device, comprising:
non-volatile memory (NVM) including a first memory location and a second memory location;
means for allocating the first memory location of the NVM as scratchpad memory for a host;
means for receiving a first command including first data from a first submission queue associated with the scratchpad memory and a second command including second data from a second submission queue associated with the NVM, the first submission queue including requests for volatile data and the second submission queue including requests for non-volatile data;
means for storing the first data in the scratchpad memory, the second data in the second memory location, and an update to a logical-to-physical (L2P) mapping table for the second data in the second memory location; and
means for disabling another update to the L2P mapping table for the first data in the scratchpad memory;
wherein the another update includes a first amount of data in a first L2P entry for the stored first data and the update includes a second amount of data in a second L2P entry for the stored second data different than the first amount of data, the first amount of data being a first L2P granularity of the stored first data, and the second amount of data being a second L2P granularity of the stored second data, the first L2P granularity and the second L2P granularity being associated with different ranges of logical addresses, and the first L2P granularity being unique for scratchpad data.