IP Library Granted Patent US 10,466,922
Granted Patent B2
US 10,466,922 · App. 15/085,479 · Granted Nov 5, 2019

Accelerating concurrent access to a file in a memory-based file system

Inventors: Amit Golander (Tel Aviv, IL); Sagi Manole (Petah Tikva, IL); Boaz Harrosh (Hertzlia, IL)
Assignee: NETAPP, INC.
G06F3/0643G06F3/0623G06F3/0673
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,466,922
App. No.
15/085,479
Granted
Nov 5, 2019
Kind
B2
Abstract

A method, apparatus and product for accelerating concurrent access to a file in a memory-based file system. The method comprising receiving a request issued by a program, for accessing a file stored in a memory-based file system; and subject to the request being associated with data modification of data within the file, and subject to the modification not necessitating change in a structure of a data structure used for content lookup for the file, acquiring a lock to the file to the program, wherein the lock is acquired in a shared mode.

Claims (36)

1. A method, comprising:

mapping a file of a memory-based file system to an address range of a persistent memory, without reading content of the file for the memory-based file system to access the file from the persistent memory, the memory-based file system stored at the persistent memory;

maintaining a data structure for representing the file by the memory-based file system at the persistent memory, the data structure being hierarchical and used for file content lookup and includes a data unit for storing file data accessible by a data lock and a metadata unit storing file metadata with a first portion accessible by a metadata lock and a second portion that is updateable by an atomic operation accessible without a lock;

wherein the metadata lock is acquired without the data lock when a request is to access the first portion of the metadata, the data lock is acquired without the metadata lock when the request is to access the data without modification of a structure of the data structure, and both the data lock and the metadata data lock are acquired when the request modifies the first portion of the metadata and the structure of the data structure;

estimating, based on a request type and prior to acquiring at least one of the data lock and the metadata lock, whether the request will result in modification of file data and change the structure of the data structure, wherein the structure is unchanged for certain request types after existing content of the data unit is updated; and

using the data lock and the metadata lock in a shared mode when data modification for the request results in change to the structure of the data structure and the data modification is delayed, based on the estimating.

2. The method of claim 1 , wherein the data modification is executed as a batch operation.

3. The method of claim 1 , wherein the data structure is a log tree comprising at least one tree element and the request is a write request that does not cause a tree element within the log tree to shift.

4. The method of claim 1 , wherein the request is associated with a page fault generated by a machine-level store instruction for the file system that supports direct access to the persistent memory.

5. The method of claim 1 , wherein the second portion of the metadata are metadata fields that are not protected by the metadata lock.

6. The method of claim 5 , wherein metadata fields not protected by the metadata lock are updated using the atomic operation on a memory location without acquiring a lock.

7. The method of claim 1 , wherein a timestamp metadata of the second portion of the metadata for the file is updated without a lock using the atomic operation.

8. A system, comprising:

a memory containing a non-transitory machine readable medium comprising machine executable code having stored thereon instructions; and a processor coupled to the memory, the processor configured to execute the machine executable code to:

map a file of a memory-based file system to an address range of a persistent memory, without reading content of the file for the memory-based file system to access the file from the persistent memory, the memory-based file system stored at the persistent memory;

maintain a data structure for representing the file by the memory-based file system at the persistent memory, the data structure being hierarchical and used for file content lookup and includes a data unit for storing file data accessible by a data lock and a metadata unit storing file metadata with a first portion accessible by a metadata lock and a second portion that is updateable by an atomic operation accessible without a lock;

wherein the metadata lock is acquired without the data lock when a request is to access the first portion of the metadata, the data lock is acquired without the metadata lock when the request is to access the data without modification of a structure of the data structure, and both the data lock and the metadata data lock are acquired when the request modifies the first portion of the metadata and the structure of the data structure;

estimate, based on a request type and prior to acquiring at least one of the data lock and metadata lock, whether the request will result in modification of file data and change the structure of the data structure, wherein the structure is unchanged for certain request types after existing content of the data unit is updated; and

use the data lock and the metadata lock in a shared mode when data modification for the request results in change to the structure of the data structure and the data modification, executed as a batch operation, is delayed, based on the estimate.

9. The system of claim 8 , wherein in response to the request, a lock for the data structure is acquired before traversing the data structure and released after traversal is completed.

10. The system of claim 8 , wherein the data structure is a log tree comprising at least one tree element and the request is a write request that does not cause a tree element within the log tree to shift.

11. The system of claim 8 , wherein the request is associated with a page fault generated by a machine-level store instruction for the file system that supports direct access to the persistent memory.

12. The system of claim 8 , wherein the second portion of the metadata are metadata fields that are not protected by the metadata lock.

13. The system of claim 12 , wherein metadata fields not protected by the metadata lock are updated using the atomic operation on a memory location without acquiring a lock.

14. The system of claim 8 , wherein a timestamp metadata of the second portion of the metadata for the file is updated without a lock using the atomic operation.

15. A non-transitory machine-readable storage medium having stored thereon instructions for performing a method, comprising machine executable code which when executed by at least one machine, causes the machine to:

map a file of a memory-based file system to an address range of a persistent memory, without reading content of the file for the memory-based file system to access the file from the persistent memory, the memory-based file system stored at the persistent memory;

maintain a data structure for representing the file by the memory-based file system at the persistent memory, the data structure being hierarchical and used for file content lookup and includes a data unit for storing file data accessible by a data lock and a metadata unit storing file metadata with a first portion accessible by a metadata lock and a second portion that is updateable by an atomic operation accessible without a lock;

wherein the metadata lock is acquired without the data lock when a request is to access the first portion of the metadata, the data lock is acquired without the metadata lock when the request is to access the data without modification of a structure of the data structure, and both the data lock and the metadata data lock are acquired when the request modifies the first portion of the metadata and the structure of the data structure;

estimate, based on a request type and prior to acquiring at least one of the data lock and metadata lock, whether the request will result in modification of file data and change the structure of the data structure, wherein the structure is unchanged for certain request types after existing content of the data unit is updated; and

use the data lock and the metadata lock in a shared mode when data modification for the request results in change to the structure of the data structure and the data modification, executed as a batch operation, is delayed, based on the estimate.

16. The storage medium of claim 15 , wherein a timestamp metadata of the second portion of the metadata for the file is updated without a lock using the atomic operation.

17. The storage medium of claim 15 , wherein the data structure is a log tree comprising at least one tree element and the request is a write request that does not cause a tree element within the log tree to shift.

18. The storage medium of claim 15 , wherein the request is associated with a page fault generated by a machine-level store instruction for the file system that supports direct access to the persistent memory.

19. The storage medium of claim 15 , wherein the second portion of the metadata are metadata fields that are not protected by the metadata lock.

20. The storage medium of claim 19 , wherein metadata fields not protected by the metadata lock are updated using the atomic operation on a memory location without acquiring a lock.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2017
From: PLEXISTOR LTD.
To: NETAPP, INC.
Reel/Frame 043375/0358 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 30, 2016
From: GOLANDER, AMIT; MANOLE, SAGI; HARROSH, BOAZ
To: PLEXISTOR LTD.
Reel/Frame 038141/0440 →
Continuity (2)
Provisional Application 62263948 · Dec 7, 2015
Related Publication 20170160980A1 · Jun 8, 2017