Systems and methods for prefetching data via a host-accessible prefetcher queue
Systems and methods for prefetching data are disclosed. A processor executes a first command for moving first data stored in a storage device. Based on the first command, the processor stores, into a first queue of the storage device, a first address associated with the first data. The storage device further retrieves the first address from the first queue, retrieves the first data from the first storage medium based on the first address, and stores the first data to the second storage medium. In some embodiments, a process for prefetch optimization is also disclosed. A processor identifies a value for prefetching data. The processor runs an application, measures performance of the application, modifies the value based on the performance, and determines that the performance satisfies a criterion.
1 . A computing system comprising:
a storage device including a first queue, a first storage medium, and a second storage medium;
a processor configured to communicate with the storage device; and
a memory coupled to the processor, the memory storing instructions that, when executed by the processor, cause the processor to:
map the first queue onto an address space of the memory for generating a mapped queue;
identify a program including a first function call and a second function call, the first function call having as a first argument, a reference to the mapped queue, and as a second argument, a reference to first data;
execute the first function call, wherein the executing of the first function call causes the processor to execute instructions of the first function call based on the first argument and the second argument to access the mapped queue and store, into the mapped queue, a first address associated with the first data, wherein the storage device is configured to retrieve the first address from the first queue, retrieve the first data from the first storage medium based on the first address, and store the first data to the second storage medium; and
execute the second function call, wherein the executing of the second function call causes the processor to transmit a request to the storage device to retrieve the first data from the second storage medium.
2 . The system of claim 1 , wherein the instructions further cause the processor to:
based on storing the first address in the first queue, modify a pointer identifying a location in the first queue.
3 . The system of claim 1 , wherein the first function call is to prefetch data stored in a location associated with the first address.
4 . The system of claim 1 , wherein the first storage medium includes non-volatile memory, and the second storage medium includes volatile memory.
5 . The system of claim 1 , wherein the first queue is mapped to a user space associated with an application, wherein the first function call is executed in the user space.
6 . The system of claim 1 , wherein the first function call is generated by a first application associated with the program, wherein the instructions further cause the processor to:
execute a third function call for moving second data stored in the storage device, wherein the third function call is generated by a second application;
based on the third function call, store, into the first queue, a second address associated with the second data, wherein the storage device is configured to retrieve the second address from the first queue, retrieve the second data from the first storage medium based on the second address, and store the second data to the second storage medium.
7 . The system of claim 6 , wherein the first function call includes a first call to an operating system, and the third function call includes a second call to the operating system, wherein the operating system is configured to manage storing of the first address and the second address into the first queue.
8 . The system of claim 6 , wherein the first queue is allocated to the first application, and a second queue is allocated to the second application.
9 . The system of claim 1 , wherein the processor is configured to:
modify a pointer associated with the first queue, based on storing of the first address into the first queue.
10 . The computer system of claim 1 , wherein the instructions that cause the processor to execute instructions of the first function call include instructions that cause the processor to:
execute a copy command identifying the mapped queue as a destination for copying the first data.
11 . A method comprising:
mapping, by a processor of a computing system having a memory coupled to the processor, a first queue onto an address space of the memory for generating a mapped queue, wherein the first queue is included in a storage device having a first storage medium and a second storage medium;
identifying, by the processor, a program including a first function call and a second function call, the first function call having as a first argument, a reference to the mapped queue, and as a second argument, a reference to first data;
executing, by the processor, instructions of the first function call based on the first argument and the second argument for accessing the mapped queue; and
storing, into the mapped queue, a first address associated with the first data, wherein the storage device is configured to retrieve the first address from the first queue, retrieve the first data from the first storage medium based on the first address, and store the first data to the second storage medium; and
executing, by the processor, the second function call, wherein the executing of the second function call includes transmitting, by the processor, a request to the storage device to retrieve the first data from the second storage medium.
12 . The method of claim 11 further comprising:
based on storing the first address in the first queue, modifying a pointer identifying a location in the first queue.
13 . The method of claim 11 , wherein the first function call includes a command to prefetch data stored in a location associated with the first address.
14 . The method of claim 11 , wherein the first storage medium includes non-volatile memory, and the second storage medium includes volatile memory.