# US 2010/0250834 A1 · Method and system to perform caching based on file-level heuristics

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2010/0250834 A1
- Document ID: US20100250834A1
- Status: Published application
- Kind: A1
- Application number: 12/415,595
- Filed: 2009-03-31
- Published: 2010-09-30
- Earliest claimed: 2009-03-31
- Assignees: Intel Corporation
- Inventors: Sanjeev N. Trika; Amber D. Huffman; James A. Boyd; Frank T. Hady; Glenn J. Hinton; Dale J. Juenemann; Oscar P. Pinto; Scott R. Tetrick; Thomas J. Barnes; Scott E. Burridge
- Web page: https://patentgrep.com/patent/US20100250834A1

## CPC

- G06F 12/0862: with prefetch
- G06F 3/061: {Improving I/O performance}
- G06F 3/0643: {Management of files}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 12/0888: using selective caching, e.g. bypass
- G06F 12/121: using replacement algorithms
- G06F 12/0866: for peripheral storage systems, e.g. disk cache
- G06F 2212/222: Non-volatile memory
- G06F 2212/6028: Prefetching based on hints or prefetch instructions
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and system to perform caching based at least on one or more file-level heuristics. The caching of a storage medium in a caching device is performed by a cache policy engine. The cache policy engine receives file-level information of input/output access of data of the storage medium and caches or evicts the data of the storage medium in the caching device based on the received file-level information. By utilizing information about the files and file operations associated with the disk sectors or logical block addresses of the storage medium, the cache policy engine can make a better decision on the data selection of the storage medium to be cached in or evicted from the caching device in one embodiment of the invention. Higher cache hit rates can be achieved and the performance of the system utilizing the cache policy engine is improved.

## Claims

### Claim 1

A system comprising:
a storage medium to store data;
a NAND flash memory to cache the data of the storage medium; and
a cache policy engine to cache or evict the data of the storage medium in the NAND flash memory based at least on one or more file-level heuristics associated with the data.

### Claim 2 (depends on 1)

The system of claim 1, wherein the NAND flash memory has a faster access rate than the storage medium.

### Claim 3 (depends on 1)

The system of claim 1, wherein the cache policy engine is part of a block driver, and wherein the block driver is to facilitate access of the NAND flash memory and the storage medium by the system.

### Claim 4 (depends on 1)

The system of claim 1, wherein the one or more file-level heuristics comprises evicting the data when a file associated with the data is deleted by an operating system (OS) executing on the system.

### Claim 5 (depends on 1)

The system of claim 1, wherein the cache policy engine is further to update logical block address (LBA) information of cached data of the storage medium when a file associated with the data is moved from a LBA location to another LBA location by an operating system (OS) executing on the system without writing the data again to the storage medium.

### Claim 6 (depends on 1)

The system of claim 1, wherein the one or more file-level heuristics comprises caching at least a portion of the data when a file associated with the data is opened by an operating system (OS) executing on the system.

### Claim 7 (depends on 1)

The system of claim 1, wherein the one or more file-level heuristics comprises no caching of the data when a file associated with the data is a media streaming file.

### Claim 8 (depends on 1)

The system of claim 1, wherein the one or more file-level heuristics comprises no caching, evicting, reducing a priority, or increasing an age of the data when a size of a file associated with the data is larger than a threshold.

### Claim 9

A method comprising:
receiving file-level information of input/output (I/O) access of data stored in a storage medium; and
caching or evicting the data stored in the storage medium into a caching device based at least on the received file-level information.

### Claim 10 (depends on 9)

The method of claim 9, wherein caching or evicting the data stored in the storage medium into the caching device comprises caching or evicting data stored in one or more logical block addresses (LBAs) of the storage medium into the caching device.

### Claim 11 (depends on 9)

The method driver of claim 9, wherein the file-level information comprises at least one of file deletion, file copying, file opening, file reading, file size, file type, and file movement information.

### Claim 12 (depends on 9)

The method of claim 9, wherein caching or evicting the data stored in the storage medium into the caching device comprises caching the data when a file type or a file extension of the data belongs to an inclusion list and no caching of the data, or evicting the data when the file type of the data belongs to an exclusion list.

### Claim 13 (depends on 9)

The method of claim 9, wherein the file-level information comprises access priority of the data by an operating system (OS), and wherein caching or evicting the data stored in the storage medium into the caching device comprises no caching of the data, or evicting the data when the access priority of the data is low and caching of the data when the access priority of the data is high.

### Claim 14 (depends on 9)

The method of claim 9, wherein the file-level information comprises information of an application performing the IO access of the data and wherein caching or evicting the data stored in the storage medium into the caching device comprises no caching of the data when the application is a mining application.

### Claim 15 (depends on 10)

The method of claim 10, wherein the one or more LBAs of the storage medium are mapped to a virtual memory page file and wherein caching or evicting the data stored in the storage medium into the caching device comprises caching the one or more LBAs mapped to the virtual memory page file into the caching device.

### Claim 16

A computer readable storage medium having instructions stored thereon which, when executed, cause a processor to perform the following method:
receiving file-level information of input/output (I/O) access of data stored in a storage medium; and
caching or evicting the data stored in the storage medium into a caching device based at least on the received file-level information.

### Claim 17 (depends on 16)

The medium of claim 16, wherein the processor to cache or evict the data stored in the storage medium into the caching device is to cache or evict data stored in one or more logical block addresses (LBAs) of the storage medium into the caching device.

### Claim 18 (depends on 16)

The medium of claim 16, wherein the file-level information comprises at least one of file deletion, file copying, file opening, file reading, file size, file type, and file movement, information.

### Claim 19 (depends on 17)

The medium of claim 17, wherein the processor is further to update LBA information of cached data of the storage medium when a file associated with the data is moved by an operating system (OS) executing on the processor.

### Claim 20 (depends on 17)

The medium of claim 17, wherein the processor is further to update LBA information of cached data of the storage medium when a file associated with the data is moved from a LBA to another LBA by an operating system (OS) executing on the processor.

### Claim 21 (depends on 16)

The medium of claim 16, wherein the file-level information comprises access information of the data and wherein the processor to cache or evict the data stored in the storage medium into the caching device is to:
pre-fetch the data stored in the storage medium; and
cache the data stored in the storage medium into the caching device when the access information indicates that a file associated with the data is opened for a read operation.

### Claim 22 (depends on 16)

The medium of claim 16, wherein the file-level information comprises access information of the data and wherein the processor to cache or evict the data stored in the storage medium into the caching device is to evict the data when the access information indicates that a file associated with the data is opened for an overwrite operation.

### Claim 23

An apparatus comprising:
a cache policy engine to cache or evict data stored in a storage medium into NAND flash memory based at least on one or more file-level heuristics associated with the data.

### Claim 24 (depends on 23)

The apparatus of claim 23, wherein the cache policy engine is part of a file system filter driver, and wherein the cache policy engine is to facilitate access of the NAND flash memory and the storage medium by the system.

### Claim 25 (depends on 23)

The apparatus of claim 23, wherein the one or more file-level heuristics comprises access information of the data and wherein the cache policy engine to cache or evict the data stored in the storage medium into the NAND flash memory is to evict the data when the access information indicates that a file associated with the data is closed.

### Claim 26 (depends on 23)

The apparatus of claim 23, wherein the one or more file-level heuristics comprises access information of the data and wherein the cache policy engine to cache or evict the data stored in the storage medium into the NAND flash memory is to evict the data when the access information indicates that a file associated with the data is opened for a read operation and a fast I/O flag of the file is set.

### Claim 27 (depends on 23)

The apparatus of claim 23, wherein the one or more file-level heuristics comprises access information of the data and wherein the cache policy engine to cache or evict the data stored in the storage medium into the NAND flash memory is to cache data associated with a read ahead command when the access information indicates that the read ahead command is issued during a fast I/O read operation of the data.

### Claim 28 (depends on 23)

The apparatus of claim 23, wherein the one or more file-level heuristics comprises access information of the data, and wherein the cache policy engine is further to mark a cached data of a file to allow reference of the cached data by other files when the access information indicates that the file is copied.

### Claim 29 (depends on 23)

The apparatus of claim 23, wherein the one or more file-level heuristics comprises access information of the data, and wherein the cache policy engine to cache or evict the data stored in the storage medium into the caching device is to evict the data when the access information indicates that a file associated with the data is replaced by another file with an identical file name.

### Claim 30 (depends on 23)

The apparatus of claim 23, wherein the one or more file-level heuristics comprises access information of the data, and wherein the cache policy engine to cache or evict the data stored in the storage medium into the caching device is to evict the data when the access information indicates that the file associated with the data is moved from a cached storage device to a non-cached storage device.

### Claim 31 (depends on 23)

The apparatus of claim 23, wherein the one or more file-level heuristics comprises access information of the data, and wherein the cache policy engine is further to de-prioritize the data associated with a file in the caching device when the access information indicates that the file associated with the data is copied from a cached storage device to a non-cached storage device.

### Claim 32 (depends on 23)

The apparatus of claim 23, wherein the one or more file-level heuristics comprises access information of the data, and wherein the cache policy engine to cache or evict the data stored in the storage medium into the NAND flash memory is to cache the data associated with a file when the access information indicates that an application to access the file is marked as high priority.
