Cache synchronization for solid state disks
First Claim
1. A method of synchronizing, by a media controller, data cached in a buffer of the media controller corresponding to data stored in one or more sectors of a solid-state memory, the method comprising:
- by a flash translation layer module of the media controller;
mapping a physical address in the solid-state memory to a logical sector address, wherein the logical sector address corresponds to mapping data comprising;
(i) a page index, (ii) a block index, and (iii) a superblock number of the solid-state memory;
storing the mapping data in at least one summary page corresponding to the superblock containing the physical address;
storing one or more page offsets of an active block in the superblock in at least one active block table corresponding to the superblock; and
storing a block index and a page index of the at least one summary page and an address of the at least one active block table, for each superblock of the storage device, in a page global directory corresponding to the solid-state memory;
by a host layer module of the media controller;
receiving a data request to transfer data between a host device coupled to the media controller and one or more sectors of the solid-state memory, wherein the data request comprises at least one of;
(i) a starting logical sector address, (ii) a total number of sectors to be accessed, and (iii) data to be written to the sectors;
by a buffer layer module of the media controller;
segmenting the span of the data request into a plurality of chunks, wherein each chunk corresponds to one or more contiguous sectors of the solid-state memory;
determining a number of sectors to be accessed in the solid-state memory;
allocating storage space in the buffer corresponding to the number of sectors to be accessed;
caching data transferred between the buffer and the one or more sectors of the solid-state memory in the allocated storage space;
updating a status corresponding to each chunk of the cached data;
scanning the status corresponding to a first chunk of cached data;
determining, based on the corresponding status, whether the first chunk of cached data is more recent than the corresponding data stored on the solid-state memory;
if the first chunk of cached data contains more recent data;
adding the chunk to a group of chunks to be synchronized;
scanning a next chunk of cached data, if present;
when the group of chunks to be synchronized reaches a threshold;
providing to the flash translation layer module chunks having data to be written;
by the flash translation layer module;
identifying for the chunks having data to be written, based on the starting logical sector address, a corresponding (i) superblock number, (ii) block index and (iii) page index within the solid-state memory;
locating, from the page global directory of the storage device, the at least one active block table and the summary page corresponding to the superblock number; and
iteratively identifying physical addresses for sectors in the span of sectors to be accessed based on (i) the at least one active block table of the superblock, if the physical address is in an active block of the superblock, otherwise, (ii) the summary page of the superblock, based on the block index and page index;
retrieving, from the solid-state memory, page data corresponding to the chunks having data to be written;
synchronizing the retrieved page data with the cached data corresponding to the group of chunks;
transferring, to the solid-state memory, the synchronized page data; and
updating the status corresponding the group of one or more sectors corresponding to the group of chunks.
8 Assignments
0 Petitions
Accused Products
Abstract
Described embodiments provide a media controller that synchronizes data cached in a buffer and corresponding data stored in one or more sectors of a storage device. A buffer layer module of the media controller caches data transferred between the buffer and the storage device. One or more contiguous sectors are associated with one or more chunks. The buffer layer module updates a status corresponding to each chunk of the cached data and scans the status corresponding to a first chunk of cached data. If, based on the status, the first chunk of cached data is more recent than the corresponding data stored on the storage device, a media layer module synchronizes the data on the storage device with the cached data. The status corresponding to the group of one or more sectors is updated. The media layer module scans a next chunk of cached data, if present.
-
Citations
20 Claims
-
1. A method of synchronizing, by a media controller, data cached in a buffer of the media controller corresponding to data stored in one or more sectors of a solid-state memory, the method comprising:
-
by a flash translation layer module of the media controller; mapping a physical address in the solid-state memory to a logical sector address, wherein the logical sector address corresponds to mapping data comprising;
(i) a page index, (ii) a block index, and (iii) a superblock number of the solid-state memory;storing the mapping data in at least one summary page corresponding to the superblock containing the physical address; storing one or more page offsets of an active block in the superblock in at least one active block table corresponding to the superblock; and storing a block index and a page index of the at least one summary page and an address of the at least one active block table, for each superblock of the storage device, in a page global directory corresponding to the solid-state memory; by a host layer module of the media controller; receiving a data request to transfer data between a host device coupled to the media controller and one or more sectors of the solid-state memory, wherein the data request comprises at least one of;
(i) a starting logical sector address, (ii) a total number of sectors to be accessed, and (iii) data to be written to the sectors;by a buffer layer module of the media controller; segmenting the span of the data request into a plurality of chunks, wherein each chunk corresponds to one or more contiguous sectors of the solid-state memory; determining a number of sectors to be accessed in the solid-state memory; allocating storage space in the buffer corresponding to the number of sectors to be accessed; caching data transferred between the buffer and the one or more sectors of the solid-state memory in the allocated storage space; updating a status corresponding to each chunk of the cached data; scanning the status corresponding to a first chunk of cached data; determining, based on the corresponding status, whether the first chunk of cached data is more recent than the corresponding data stored on the solid-state memory; if the first chunk of cached data contains more recent data; adding the chunk to a group of chunks to be synchronized; scanning a next chunk of cached data, if present; when the group of chunks to be synchronized reaches a threshold; providing to the flash translation layer module chunks having data to be written; by the flash translation layer module; identifying for the chunks having data to be written, based on the starting logical sector address, a corresponding (i) superblock number, (ii) block index and (iii) page index within the solid-state memory; locating, from the page global directory of the storage device, the at least one active block table and the summary page corresponding to the superblock number; and iteratively identifying physical addresses for sectors in the span of sectors to be accessed based on (i) the at least one active block table of the superblock, if the physical address is in an active block of the superblock, otherwise, (ii) the summary page of the superblock, based on the block index and page index; retrieving, from the solid-state memory, page data corresponding to the chunks having data to be written; synchronizing the retrieved page data with the cached data corresponding to the group of chunks; transferring, to the solid-state memory, the synchronized page data; and updating the status corresponding the group of one or more sectors corresponding to the group of chunks. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A non-transitory machine-readable storage medium, having encoded thereon program code, wherein, when the program code is executed by a machine, the machine implements a method of synchronizing, by a media controller, data cached in a buffer of the media controller corresponding to data stored in one or more sectors of a solid-state memory, the method comprising:
-
by a flash translation layer module of the media controller; mapping a physical address in the solid-state memory to a logical sector address, wherein the logical sector address corresponds to mapping data comprising;
(i) a page index, (ii) a block index, and (iii) a superblock number of the solid-state memory;storing the mapping data in at least one summary page corresponding to the superblock containing the physical address; storing one or more page offsets of an active block in the superblock in at least one active block table corresponding to the superblock; and storing a block index and a page index of the at least one summary page and an address of the at least one active block table, for each superblock of the storage device, in a page global directory corresponding to the solid-state memory; by a host layer module of the media controller; receiving a data request to transfer data between a host device coupled to the media controller and one or more sectors of the solid-state memory, wherein the data request comprises at least one of;
(i) a starting logical sector address, (ii) a total number of sectors to be accessed, and (iii) data to be written to the sectors;by a buffer layer module of the media controller; segmenting the span of the data request into a plurality of chunks, wherein each chunk corresponds to one or more contiguous sectors of the solid-state memory; determining a number of sectors to be accessed in the solid-state memory; allocating storage space in the buffer corresponding to the number of sectors to be accessed; caching data transferred between the buffer and the one or more sectors of the solid-state memory in the allocated storage space; updating a status corresponding to each chunk of the cached data; scanning the status corresponding to a first chunk of cached data; determining, based on the corresponding status, whether the first chunk of cached data is more recent than the corresponding data stored on the solid-state memory; if the first chunk of cached data contains more recent data; adding the chunk to a group of chunks to be synchronized; scanning a next chunk of cached data, if present; when the group of chunks to be synchronized reaches a threshold; providing to the flash translation layer module chunks having data to be written; by the flash translation layer module; identifying for the chunks having data to be written, based on the starting logical sector address, a corresponding (i) superblock number, (ii) block index and (iii) page index within the solid-state memory; locating, from the page global directory of the storage device, the at least one active block table and the summary page corresponding to the superblock number; and iteratively identifying physical addresses for sectors in the span of sectors to be accessed based on (i) the at least one active block table of the superblock, if the physical address is in an active block of the superblock, otherwise, (ii) the summary page of the superblock, based on the block index and page index; retrieving, from the solid-state memory, page data corresponding to the chunks having data to be written; synchronizing the retrieved page data with the cached data corresponding to the group of chunks; transferring, to the solid-state memory, the synchronized page data; and updating the status corresponding the group of one or more sectors corresponding to the group of chunks. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A media controller, the media controller implemented as at least one integrated circuit, for synchronizing data cached in a buffer of the media controller corresponding to data stored in one or more sectors of a solid-state memory, the media controller coupled to a communication link, the sectors of the solid-state memory organized into blocks and superblocks, the media controller comprising:
-
a host layer module configured to; send data to, and receive data from, the communication link, wherein data requests are received from the at least one external device, and wherein the data requests comprise (i) a starting logical sector address and (ii) a span of sectors to be transferred; a flash translation layer module configured to; maintain at least one active block table corresponding to each superblock, the active block table for storing one or more page offsets of an active block in the corresponding superblock; maintain at least one summary page for storing mapping data corresponding to each superblock, wherein the mapping data maps a physical address in the storage device to a logical sector address, the mapping data comprising;
(i) a page index, (ii) a block index, and (iii) a superblock number;maintain a page global directory for storing a block index and a page index of the at least one summary page and an address of the at least active block table for each superblock of the storage device; a buffer layer module configured to; segment the span of the write request into a plurality of chunks, wherein each chunk corresponds to one or more contiguous sectors; determine a number of sectors to be written to the solid-state memory; allocate storage space in the buffer corresponding to the number of sectors to be written; cache data being read from, or written to, one or more sectors of the solid-state memory in the allocated buffer space; update a status corresponding to each chunk of cached data; scan the status corresponding to each chunk of cached data; determine, based on the corresponding status, if each chunk of cached data contains data that is more recent than the corresponding data stored on the solid-state memory; provide chunks that contain data that is more recent than the corresponding data stored on the storage device to a flash translation layer module of the media controller, based on the skip mask; the flash translation layer module further configured to; identify for the chunks having data to be written, based on the starting logical sector address, a corresponding (i) superblock number, (ii) block index and (iii) page index within the solid-state memory; locate, from the page global directory of the storage device, the at least one active block table and the summary page corresponding to the superblock number; and iteratively identify physical addresses for sectors in the span of sectors to be accessed based on (i) the at least one active block table of the superblock, if the physical address is in an active block of the superblock, otherwise, (ii) the summary page of the superblock, based on the block index and page index retrieve, from the solid-state memory, page data corresponding to the chunks having data to be written; synchronize the retrieved page data with the cached data corresponding to the group of chunks; transfer, to the solid-state memory, the synchronized page data; and update the status corresponding the group of one or more sectors corresponding to the group of chunks. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification