Systems and methods for servicing memory access requests
Systems and methods for managing memory devices are disclosed. A device may include a controller, a first non-volatile memory (NVM) device, and a second NVM device. The controller may be configured to: detect a first condition; set, based on the first condition, the first NVM device for operating in a first operation mode and the second NVM device for operating in a second operation mode; receive a request from a computing device; and select one of the first NVM device or the second NVM device based on the request being respectively one of a first type or a second type, wherein the first NVM device is configured take a first action according to the first operation mode, and the second NVM device is configured take a second action according to the second operation mode.
1 . A device comprising:
a controller;
a first non-volatile memory (NVM) device;
a second NVM device;
a cache memory; and
a buffer memory configured to store at least a portion of data stored in the first NVM device,
wherein the controller is configured to:
detect a first condition, wherein the first condition includes a threshold fullness of the buffer memory;
set, based on the first condition, the first NVM device for operating in a write operation mode and the second NVM device for operating in a read operation mode;
receive a write request from a computing device for writing data into a memory address;
select the first NVM device based on the first NVM device being set in the write operation mode;
store the data in the first NVM device and in the buffer memory based on the write request;
receive a read request from a computing device for the data;
determine presence of the data in the cache memory, and generate a result;
based on the result, generate a read command for the data; and
based on the read command:
determine that the data is stored in the buffer memory; and
retrieve the data from the buffer memory into the cache memory.
2 . The device of claim 1 , wherein the first condition includes at least one of expiration of a time period, loss of power, or a command from the computing device.
3 . The device of claim 1 , wherein the controller is further configured to:
detect a second condition;
store second data in the buffer memory to the second NVM device; and
set the first NVM device to the read operation mode and the second NVM device to the write operation mode.
4 . The device of claim 1 , wherein the controller is further configured to:
detect a second condition;
based on detecting the second condition, the controller is further configured to:
set the first NVM device and the second NVM device to operate in the first write operation mode.
5 . The device of claim 4 , wherein the second condition includes loss of power to the device, wherein the controller is further configured to:
read first data and second data stored in the cache memory device; and
store the first data into the first NVM device and the second data into the second NVM device.
6 . The device of claim 4 , wherein the second condition includes detecting power to the device, wherein the controller is further configured to:
identify first data in the first NVM device and second data in the second NVM device;
read the first data and the second data from respectively the first NVM device and the second NVM device; and
store the first data and the second data in the cache memory.
7 . The device of claim 1 , wherein the controller being configured to set the first NVM device for operating in a first operation mode and the second NVM device for operating in a second operation mode further includes the controller being configured to:
set in a memory a first value for the first NVM device for identifying the first operation mode, and a second value for the second NVM device for identifying the second operation mode.
8 . A method comprising:
detecting, by a controller of a storage device, a first condition, wherein the first condition includes a threshold fullness of a buffer memory storing at least a portion of data stored in a first non-volatile memory (NVM) device;
setting, by the controller, based on the first condition, the first NVM device for operating in a first operation mode and a second NVM device for operating in a read operation mode;
receiving, by the controller, a write request from a computing device for writing data into a memory address;
selecting, by the controller, the first NVM device based on the first NVM device being set in the write operation mode;
storing, by the controller, the data in the first NVM device and in the buffer memory based on the write request;
receiving, by the controller, a read request from a computing device for the data;
determining, by the controller, presence of the data in a cache memory, and generating a result;
based on the result, generating a read command for the data; and
based on the read command:
determining that the data is stored in the buffer memory; and
retrieving the data from the buffer memory into the cache memory.
9 . The method of claim 8 , wherein the first condition includes at least one of expiration of a time period, loss of power, or a command from the computing device.
10 . The method of claim 8 further comprising:
detecting, by the controller, a second condition;
storing, by the controller, second data in the buffer memory to the second NVM device; and
setting the first NVM device to the read operation mode and the second NVM device to the write operation mode.
11 . The method of claim 8 further comprising:
detecting a second condition;
based on detecting the second condition:
setting, by the controller, the first NVM device and the second NVM device to operate in the write operation mode.
12 . The method of claim 11 , wherein the second condition includes loss of power to the device, wherein the method further comprises:
reading first data and second data stored in the cache memory device; and
storing the first data into the first NVM device and the second data into the second NVM device.
13 . The method of claim 11 , wherein the second condition includes detecting power to the device, wherein the method further comprises:
identifying first data in the first NVM device and second data in the second NVM device;
reading the first data and the second data from respectively the first NVM device and the second NVM device; and
storing the first data and the second data in the cache memory.
14 . The method of claim 8 , wherein the setting of the first NVM device for operating in a first operation mode and the setting of the second NVM device for operating in a second operation mode further includes:
setting in a memory a first value for the first NVM device for identifying the first operation mode, and a second value for the second NVM device for identifying the second operation mode.