Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grahamperrin

macrumors 601
Original poster
Jun 8, 2007
4,942
648
A patent granted to Apple Inc. five days ago:

Systems and methods for handling non-volatile memory operating at a substantially full capacity

United States Patent: 8886875

Abstract

This can relate to handling a non-volatile memory ("NVM") operating at a substantially full memory. The non-volatile memory can report its physical capacity to an NVM driver. The NVM driver can scale-up the physical capacity a particular number of times to generate a "scaled physical capacity," which is then reported to the file system. Because the scaled physical capacity is greater than the NVM's actual physical capacity, the file system allocates a logical space to the NVM that is substantially greater than the NVM's capacity. This can cause less crowding of the logical block addresses within the logical space, thus making it easier for the file system to operate and improving system performance. A commitment budget can also be reported to the file system that corresponds to the NVM's physical capacity, and which can define the amount of data the file system can commit for storage in the NVM.​

Background of the disclosure

Non-volatile memory ("NVM"), such as NAND flash memory, is commonly used for mass storage. For example, consumer electronics such as portable media players or cellular telephones often include flash memory to store data such as music, videos, and other media.

In conventional NVM systems, the translation layer reports the logical capacity of the NVM to the file system, where this logical capacity can correspond to a value smaller than the amount of data the NVM can physically hold. This reduction is done to reserve NVM data space to, for example, accommodate garbage collection, accommodate bad data blocks, and improve system performance by reducing the amount of garbage collection. In conventional direct-mapped disk storage systems, the logical capacity is equal to the media size minus any remapping reserves. When the free space in an NVM becomes low, however, the system may be unable to allocate data pieces into the NVM that are ideally-sized. Thus, the allocated data may need to be fragmented. File systems with a greater amount of fragmentation can perform poorly compared to less-fragmented file systems. This reduction in performance can be caused by, for example, increased seek time on rotational media; increased per-transaction overhead; any serialization or single-dispatch constraints; and increased overhead required for mapping more chunks of data than is ideal.​

Summary of the disclosure

Systems and methods are disclosed for handling a non-volatile memory ("NVM") operating at a substantially full capacity. An NVM can report its physical capacity to an NVM interface. The NVM interface can scale-up the reported physical capacity a certain number of times, thus generating a "scaled physical capacity." For example, an NVM can report that its physical capacity is 32 gigabytes. The NVM driver can then scale this value upwards to a scaled physical capacity of 1 terabyte. The scaled physical capacity can then be reported to the file system. Since the file system believes it is working with a larger NVM than it really is (e.g., the file system believes the NVM can hold 1 terabyte of data), the file system can allocate a logical space to the NVM that corresponds to this larger size. Moreover, the scaled physical capacity can be any suitable number of times larger than the physical capacity of the NVM (e.g., including fractional scaling factors). For example, in some embodiments the scaled physical capacity can simply be the maximum logical space available for allocating to the NVM.

Since the logical space is significantly larger than the NVM's physical capacity, there can be ample free addresses in the logical space even when the NVM is nearing full capacity. This can prevent detrimental effects that occur when a logical space approaches full capacity, such as increased data fragmentation, slowed processing capabilities, more frequently required defragmentation, and the like.

In addition to the scaled physical capacity, a commitment budget can also be reported to the file system. The commitment budget can correspond to the NVM's physical capacity (e.g., can correspond to the physical volume of the NVM minus any space reserved for bad blocks, garbage collection, etc.), and can define the amount of data the file system can commit for storage in the NVM. In this manner, by using the scaled physical capacity and the commitment budget, the file system can operate in a larger logical space while still limiting the amount of data stored in the NVM to an amount the NVM can physically hold.​
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.