Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
A DEVICE CONTROLLER FOR A MEMORY DEVICE
Document Type and Number:
WIPO Patent Application WO/2012/113872
Kind Code:
A1
Abstract:
The invention provides a method for controlling writing of data to a data storage card having a device controller and a storage medium. The method comprises: the device controller receiving a meta data synchronization disable command and entering a first mode in response, the first mode being characterized in that the device controller does not synchronize meta data related to a data write request for writing the data to the storage medium, leaving corresponding unsynchronized meta data; the device controller receiving a data write request for writing the data; the device controller effecting the data write request, whereby the data are written on the storage medium but the meta data related to the data write request is not synchronized to the storage medium. Other aspects provide corresponding device controller and software/firware.

Inventors:
DAS PURKAYASTHA SAUGATA (IN)
Application Number:
PCT/EP2012/053080
Publication Date:
August 30, 2012
Filing Date:
February 23, 2012
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ST ERICSSON SA (CH)
DAS PURKAYASTHA SAUGATA (IN)
International Classes:
G06F3/06; G06F12/02
Foreign References:
US20050021764A12005-01-27
US20100250833A12010-09-30
US20100023682A12010-01-28
US20080077742A12008-03-27
Other References:
None
Attorney, Agent or Firm:
STRĂ–M & GULLIKSSON AB (LUND) (Lund, SE)
Download PDF:
Claims:
Claims

1. A method for controlling writing of data to a data storage card having a device controller and a storage medium, the method comprising: the device controller receiving a meta data synchronization disable command and entering a first mode in response, the first mode being characterized in that the device controller does not synchronize meta data related to a data write request for writing the data to the storage medium, leaving corresponding unsynchronized meta data;

the device controller receiving a data write request for writing the data;

the device controller effecting the data write request, whereby the data are written on the storage medium but the meta data related to the data write request is not synchronized to the storage medium.

2. A method in accordance with claim 1, further comprising: the device controller receiving a meta data synchronization enable command and entering a second mode in response, the second mode being characterized in that the device controller synchronizes the unsynchronized meta data, either in response to the meta data synchronization enable command, or following a subsequent data write request.

3. A method in accordance with claim 2, wherein the device controller remains in the second mode after synchronizing the unsynchronized meta data, whereby meta data related to any subsequent data write requests is synchronized to the storage medium as part of effecting the subsequent data write requests.

4. A method in accordance with claim 2 or 3, wherein the meta data synchronization enable command is received by the device controller while in the first mode, and the device controller synchronizes the unsynchronized meta data to the storage medium in response. Claims

1. A method for controlling writing of data to a data storage card having a device controller and a storage medium, the method comprising: the device controller receiving a meta data synchronization disable command and entering a first mode in response, the first mode being characterized in that the device controller does not synchronize meta data related to a data write request for writing the data to the storage medium, leaving corresponding unsynchronized meta data; the device controller receiving a data write request for writing the data;

the device controller effecting the data write request, whereby the data are written on the storage medium but the meta data related to the data write request is not synchronized to the storage medium.

2. A method in accordance with claim 1, further comprising: the device controller receiving a meta data synchronization enable command and entering a second mode in response, the second mode being characterized in that the device controller synchronizes the unsynchronized meta data, either in response to the meta data synchronization enable command, or following a subsequent data write request.

3. A method in accordance with claim 2, wherein the device controller remains in the second mode after synchronizing the unsynchronized meta data, whereby meta data related to any subsequent data write requests is synchronized to the storage medium as part of effecting the subsequent data write requests.

4. A method in accordance with claim 2 or 3, wherein the meta data synchronization enable command is received by the device controller while in the first mode, and the device controller synchronizes the unsynchronized meta data to the storage medium in response. 5. A method in accordance with any of the preceding claims, wherein the meta data synchronization disable command is sent to the device controller by a host controller.

6. A method in accordance with any of the preceding claims, wherein the meta data synchronization enable command is sent to the device controller by a host controller.

7. A method in accordance with any of the preceding claims, wherein while the device controller is in the first mode, meta data related to freeing up storage medium blocks is synchronized as part of effecting the freeing up.

8. A method in accordance with any of the preceding claims, wherein while the device controller is in the first mode, meta data related to storage medium bad blocks is synchronized as part of the storage medium bad block management.

9. A method in accordance with any of the preceding claims, wherein an explicit meta data synchronization command is sent to the device controller by the host controller and the device controller synchronizes the unsynchronized meta data in response.

10. A method in accordance with claim 9, wherein the explicit meta data synchronization command leaves the device controller in the first mode.

11. A data storage card device controller for controlling writing of data to a data storage card having a storage medium, the device controller being configured to receive a meta data synchronization disable command and entering a first mode in response, the first mode being characterized in that the device controller does not synchronize meta data related to a data write request for writing the data to the storage medium, leaving corresponding unsynchronized meta data; and to receive a data write request for writing the data; and to effect the data write request, whereby the data are written on the storage medium but the meta data related to the data write request is not synchronized to the storage medium. 12. A data storage card device controller in accordance with claim 11, further configured to receive a meta data synchronization enable command and enter a second mode in response, the second mode being characterized in that the device controller synchronizes the unsynchronized meta data to the storage medium, either in response to the meta data synchronization enable command, or following a subsequent data write request. 13. A method in accordance with claim 12, wherein the device controller remains in the second mode after synchronizing the unsynchronized meta data, whereby meta data related to any subsequent data write requests is synchronized to the storage medium as part of effecting the subsequent data write requests.

14. A data storage card device controller in accordance with claim 12 or 13, wherein the meta data synchronization enable command is received by the device controller while in the first mode, and the device controller synchronizes the unsynchronized meta data to the storage medium in response.

15. A data storage card device controller in accordance with any of claims 11-14, wherein while the device controller is in the first mode, meta data related to freeing up storage medium blocks is synchronized as part of effecting the freeing up.

16. A data storage card device controller in accordance with any of claims 11-15, wherein while the device controller is in the first mode, meta data related to storage medium bad blocks is synchronized as part of the storage medium bad block management.

17. A data storage card device controller in accordance with any of claims 11-16, further configured to receive an explicit meta data synchronization command and synchronize the unsynchronized meta data in response.

18. A data storage card device controller in accordance with claim 17, wherein the explicit meta data synchronization command leaves the device controller in the first mode. 19. A data storage card device controller in accordance with any of claims 11-18, wherein at least one of the commands is received from a host controller.

20. Software for embedding in a controller unit, the software, when embedded, enabling the controller unit to perform at least one of the methods of claims 1-10.

Description:
A device controller for a memory device Background of the invention

Today embedded platforms such as mobile phones include support for embedded or removable memory devices connected over well known interfaces like SD (Secure Digital), MMC (Multimedia card), UFS (Unix file system) or SATA (Serial Advanced Technology Attachment) protocol as illustrated in Figure 1. A host controller 110 is in communication 131 with a memory device 120. The memory device 120 comprises a device controller 122 and a storage medium 121 connected via a bus 132. A memory device includes single or multiple instances of non volatile memory, such as NAND. Each memory instance is split into equal sized NAND blocks and each NAND block is split into NAND pages. The pages are basic unit of read or write to NAND. Each NAND page is split into MMC blocks (typically 512B). The read or write transfer over SD, MMC or UFS happens in multiples of MMC blocks (also known as just "block" in the SD/MMC specification). The management of these memories is complex since they have limited read or write cycle at every NAND block. An embedded controller within the memory device takes care of the memory management and moves the data around so that read or write are equally distributed across NAND blocks.

To the host controller, embedded controller exposes a "disk like" interface where host can read or write MMC block to any location without any restriction. The MMC blocks seen on the "disk like" interface are known as virtual MMC blocks and embedded controller hides the actual location of the MMC blocks within the device. Embedded controller maintains a mapping table from the virtual MMC block to physical MMC block. On every new write to a virtual MMC block, embedded controller writes to a free physical MMC block which is written least number of times, marks the previous physical location of the MMC block as dirty and updates the mapping table. Mapping table is part of meta-data maintained by the embedded controller. In addition to mapping table, meta-data also stores bad block table, wear table. Bad block table contains the block numbers of the bad NAND blocks. Wear table stores the read and write count of every NAND block. Embedded controller also needs to store blocks which are free, used and dirty. Some embedded controller may derive this information indirectly from the mapping table and some embedded controller may choose to explicitly store the free blocks, used blocks and dirty blocks in its meta-data. Some embedded controller may store the meta-data in the spare area of the pages of NAND. Some embedded controller stores the meta-data in separate blocks.

A typical multi block write transfer on e MC is shown in Figure 2. At the end of each MMC block (213, 214, 215) write (CMD25), element 211 in figure 2, with response 212 (e.g. l), the mapping table is updated. At the end of the programming (CMD12), element 216 in figure 2, with response 217 (e.g. Rl), eMMC guarantees the data availability by committing the metadata write or synchronizes the meta-data 218 to the memory 121 (e.g. in some dedicated NAND blocks). After this point, if host reads back these MMC blocks then embedded controller will fetch the updated content of these MMC blocks.

The overhead of meta-data synchronization is sometimes very significant on a high capacity NAND. On a high capacity NAND, the NAND write could be slower and meta-data could be bigger. This overhead of synchronization becomes significant when small numbers of MMC blocks are transferred in each multi block write and it impacts the write throughput. This problem impacts any embedded storage device such as MMC, SD, UFS and SATA embedding a non-volatile memory such as NAND, NOR, PRAM, PCM. This impacts severely the applications (e.g. data base applications) which continuously updates small amount of data to the embedded memory.

As per POSIX standard, file system layer on host need to guarantee file data synchronization at the non-volatile memory only when the file is closed or when there is explicit user

synchronization.

One approach to solving this problem is with large cache on host side and combining small requests to make the overall request size big. But this solution cannot handle situation when the individual write requests are not in contiguous virtual MMC blocks. The UFS and SATA specifications address cache synchronization but not controlling meta-data synchronization. Summary of the invention

A first aspect of the invention provides a method for controlling writing of data to a data storage card having a device controller and a storage medium. The method comprises:

- the device controller receiving a meta data synchronization disable command and entering a first mode in response, the first mode being characterized in that the device controller does not synchronize meta data related to a data write request for writing the data to the storage medium, leaving corresponding unsynchronized meta data; the device controller receiving a data write request for writing the data;

the device controller effecting the data write request, whereby the data are written on the storage medium but the meta data related to the data write request is not synchronized to the storage medium.

In a second aspect, the invention provides a data storage card device controller for controlling writing of data to a data storage card having a storage medium. The device controller is configured to receive a meta data synchronization disable command and entering a first mode in response, the first mode being characterized in that the device controller does not synchronize meta data related to a data write request for writing the data to the storage medium, leaving corresponding unsynchronized meta data; and to receive a data write request for writing the data; and to effect the data write request, whereby the data are written on the storage medium but the meta data related to the data write request is not synchronized to the storage medium.

The first aspect also provides a meta data synchronization enable command and an explicit meta data synchronization command. The commands are described in detail below. A third aspect provides software for embedding in a controller unit, the software, when embedded, enabling the controller unit to perform a method in accordance with the first aspect or one of the described embodiments thereof. The software either be in the form of source code, or it can be compiled and applied to the controller unit as firmware. It is clear to the person skilled in the art that the invention can be applied to different interfaces, including for instance SD, MMC, and UFS. As far as implementation goes, the inventive commands described above and in the following can be implemented as part of existing commands, for instance as parameters, or in new, separate commands.

Brief description of the drawings When MMC is embedded, it is often referred to as eMMC. Figure 1 illustrates a generic host-memory device interface. Figure 2 illustrates a multi write transfer to eMMC.

Figure 3 illustrates an example of state machine for meta data synchronization.

Figure 4 illustrates multi write transfer on eMMC with meta data synchronization disable command.

Figure 5 illustrates multi write transfer on eMMC with explicit meta data synchronization command.

Figure 6 illustrates multi write transfer on eMMC with meta data synchronization enable command. Detailed description of embodiments

The invention provides three synchronization commands to a data storage card device controller. The device controller controls writing of data to a data storage card having a storage medium. The commands can be implemented on for instance MC, SD or UFS protocol. The first command is a meta data synchronization disable command. This command can be sent to the device controller when a host application wants to disable synchronization of meta data related to data write requests (multi block writes). The device controller enters into a first mode, "sync, disable", where it does not do meta-data synchronization for any write request.

The second command is a meta data synchronization enable command. This command can be sent to the device controller when a host application wants the device controller to perform meta-data synchronization and enter into the a second mode, "sync, enable", where it performs meta-data synchronization at the end of any write transfer.

The third command is an explicit meta data synchronization command, "meta sync". This command can be sent to the device controller when a host application wants meta data to be synchronized. The host application can also send explicit meta data synchronization command if a file remains open for a while, whereby no meta data synchronization is performed. The host application can also automatically cause a periodic explicit meta data synchronization (e.g. based on a timer or some system or host application event). Depending on the embodiment, the device controller can remain in the "sync, disable" mode or it can go to the "sync, enable" mode.

These commands can have normal Rl response command on MMC or SD. On UFS and SATA, the commands can be implemented as UFS/SATA-specific commands and associated responses. The state machine for meta-data sync at embedded controller is shown in Figure 3. In "sync, disable" state, embedded controller does not do any meta data synchronization at the end of the write transfer as shown in Figure 4.

Figure 4 illustrate the storage medium programming in the sync, disable mode. The sync, disable command 411, which may for instance give a response 412, such as l, is sent to the device controller 122. The command causes the device controller to not synchronize meta data for following writes, MMC blocks 415 and 416, even after a write command CMD25 (element 413), with response Rl, 414, has been terminated by CMD12, 417, with response Rl, 418. A new write command/response 419/420 of MMC blocks 421, 422, terminated by

command/response 423/424, will still not cause a meta data synchronization, the device controller 122 being in the sync, disable mode.

A similar picture is shown in Figure 5. Elements 411-424 are the same as in Figure 4, but the response 424 is followed at a later point by an explicit meta data synchronization command 525, which causes the unsynchronized meta data resulting from the writing of blocks 415, 416, 421, 422, to be synchronized 527 to the storage medium 121. The time-consuming meta data synchronization events that would otherwise have occurred as part of terminating the transfer via commands 417 and 423 in Figure 4, has now been postponed and is effected at a later point 527. Similarly to the meta data synchronization disable command 411, the explicit meta data synchronization command 525 can have an associated response 526, such as Rl.

Figure 6 illustrates another command, the meta data synchronization enable command, "sync. enable". Similar to figures 4 and 5, the illustrated steps begin with a sync, disable

command/response 411/412. While in the sync, disable state, no MMC block write request (CMD25) meta data will be written to the storage medium, as shown by steps/blocks 413-424 in figure 4. At a subsequent time, the sync, enable command 613 is issued (with respone 614, e.g. Rl), and further writes, such as 615 (with response Rl, 616) writing blocks 617 and 618, and terminated here by CMD12 (619, with response 620), will cause a synchronization 621 of unsynchronized meta data. The meta data are from writing MMC blocks 415, 416, 421, 422, 617 and 618. The synchronization would equally well be performed immediately after issuing the sync, enable command, i.e. following 615 (or 616), but this is at the expense of an extra meta data synchronization since another one comes up sooner or later after, in figure 6 one related to blocks 617 and 618.

In the "sync, disable" mode, the host can do explicit synchronization with an explicit meta data synchronization command as shown in Figure 5.

With the "sync, enable" command, the host indicates to the device controller to perform meta-data synchronization at the end of each write transfer as shown in Figure 6.

In some embodiments, the device controller should perform meta data synchronization at least in one of the following cases, irrespective of the meta data synchronization disable mode.

When it runs out of free blocks (NAND blocks) and needs to erase some dirty blocks.

When it encounters a bad block, it needs to copy the bad block content to a good block and synchronize the meta data with the bad block table.