IP Library › Granted Patent US 11,645,241
Granted Patent B2
US 11,645,241 · App. 16/812,833 · Granted May 9, 2023

Persistent memory file store for directly mapped persistent memory database

Inventors: J. William Lee (Saratoga, CA); William H. Bridge, Jr. (Alameda, CA); Ankur Kemkar (San Jose, CA); Vipin Gokhale (San Ramon, CA); Sivaram Prasad Soma (Cupertino, CA); Vishvesh Mohanarangam Selvakumaar (Vancouver, CA); Juan R. Loaiza (Woodside, CA); Wei-Ming Hu (Palo Alto, CA); Neil J. S. MacNaughton (Los Gatos, CA); Adam Y. Lee (Palo Alto, CA)
Assignee: Oracle International Corporation
G06F16/182G06F9/4411G06F9/5027G06F9/524G06F12/0246G06F12/123G06F16/164G06F2212/163
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 11,645,241
App. No.
16/812,833
Granted
May 9, 2023
Kind
B2
Abstract

Techniques herein store database blocks (DBBs) in byte-addressable persistent memory (PMEM) and prevent tearing without deadlocking or waiting. In an embodiment, a computer hosts a DBMS. A reader process of the DBMS obtains, without locking and from metadata in PMEM, a first memory address for directly accessing a current version, which is a particular version, of a DBB in PMEM. Concurrently and without locking: a) the reader process reads the particular version of the DBB in PMEM, and b) a writer process of the DBMS replaces, in the metadata in PMEM, the first memory address with a second memory address for directly accessing a new version of the DBB in PMEM. In an embodiment, a computer performs without locking: a) storing, in PMEM, a DBB, b) copying into volatile memory, or reading, an image of the DBB, and c) detecting whether the image of the DBB is torn.

Claims (70)

1. A method comprising:

without locking,

a reader process of a database management system (DBMS) obtaining, from metadata in persistent memory (PMEM), a first memory address for directly accessing a current version, which is a particular version, of a database block in the PMEM, wherein the PMEM does not comprise at least one selected from the group consisting of a disk and a block-oriented device;

concurrently:

the reader process reading the particular version of the database block in the PMEM, and

a writer process of the DBMS replacing, in the metadata in the PMEM, the first memory address with a second memory address for directly accessing a new version of the database block in the PMEM,

wherein said reading the particular version of the database block in the PMEM comprises using at least one selected from the group consisting of: byte addressable direct access (DAX) to hardware and a filesystem in userspace (FUSE).

2. The method of claim 1 wherein said replacing, in the metadata in the PMEM, the first memory address with the second memory address is atomic.

3. The method of claim 1 wherein said reading the particular version of the database block in the PMEM does not use: a block device driver nor a block-oriented input/output (I/O) system call of an operating system (OS).

4. The method of claim 1 wherein said reading the particular version of the database block in the PMEM comprises:

copying the particular version of the database block from the PMEM to volatile memory, and

said reader process or a different reader process reading the particular version of the database block in the volatile memory.

5. The method of claim 4 wherein said copying the particular version of the database block to the volatile memory comprises copying the particular version of the database block into a block cache.

6. The method of claim 5 further comprising allocating said new version of the database block in the block cache after said replacing, in the metadata in PMEM, the first memory address with the second memory address.

7. The method of claim 5 wherein after said replacing, in the metadata in PMEM, the first memory address with the second memory address: the block cache contains the particular version of the database block but not said new version of the database block.

8. The method of claim 4 further comprising detecting that a previous version of the database block in the volatile memory is stale based on said obtaining, from said metadata in the PMEM, the first memory address for directly accessing the particular version of the database block in PMEM.

9. A method comprising:

without locking:

a reader process of a database management system (DBMS) obtaining, from metadata in persistent memory (PMEM), a first memory address for directly accessing a current version, which is a particular version, of a database block in the PMEM;

concurrently without locking:

the reader process reading the particular version of the database block in the PMEM, and

a writer process of the DBMS replacing, in the metadata in the PMEM, the first memory address with a second memory address for directly accessing a new version of the database block in the PMEM;

detecting that a copy of the particular version of the database block is torn.

10. One or more non-transitory computer-readable media storing instruction that, when executed by one or more processors, cause:

without locking,

a reader process of a database management system (DBMS) obtaining, from metadata in persistent memory (PMEM), a first memory address for directly accessing a current version, which is a particular version, of a database block in the PMEM, wherein the PMEM does not comprise at least one selected from the group consisting of a disk and a block-oriented device;

concurrently:

the reader process reading the particular version of the database block in the PMEM, and

a writer process of the DBMS replacing, in the metadata in the PMEM, the first memory address with a second memory address for directly accessing a new version of the database block in the PMEM,

wherein said reading the particular version of the database block in the PMEM comprises using at least one selected from the group consisting of: byte addressable direct access (DAX) to hardware and a filesystem in userspace (FUSE).

11. The one or more non-transitory computer-readable media of claim 10 wherein said replacing, in the metadata in the PMEM, the first memory address with the second memory address is atomic.

12. The one or more non-transitory computer-readable media of claim 10 wherein said reading the particular version of the database block in the PMEM does not use: a block device driver nor a block-oriented input/output (I/O) system call of an operating system (OS).

13. The one or more non-transitory computer-readable media of claim 10 wherein said reading the particular version of the database block in the PMEM comprises:

copying the particular version of the database block from the PMEM to volatile memory, and

said reader process or a different reader process reading the particular version of the database block in the volatile memory.

14. The one or more non-transitory computer-readable media of claim 13 wherein said copying the particular version of the database block to the volatile memory comprises copying the particular version of the database block into a block cache.

15. The one or more non-transitory computer-readable media of claim 14 wherein the instructions further cause allocating said new version of the database block in the block cache after said replacing, in the metadata in PMEM, the first memory address with the second memory address.

16. The one or more non-transitory computer-readable media of claim 14 wherein after said replacing, in the metadata in PMEM, the first memory address with the second memory address: the block cache contains the particular version of the database block but not said new version of the database block.

17. The one or more non-transitory computer-readable media of claim 13 wherein the instructions further cause detecting that a previous version of the database block in the volatile memory is stale based on said obtaining, from said metadata in the PMEM, the first memory address for directly accessing the particular version of the database block in PMEM.

18. One or more non-transitory computer-readable media storing instruction that, when executed by one or more processors, cause:

without locking:

a reader process of a database management system (DBMS) obtaining, from metadata in persistent memory (PMEM), a first memory address for directly accessing a current version, which is a particular version, of a database block in the PMEM;

concurrently without locking:

the reader process reading the particular version of the database block in the PMEM, and

a writer process of the DBMS replacing, in the metadata in the PMEM, the first memory address with a second memory address for directly accessing a new version of the database block in the PMEM;

detecting that a copy of the particular version of the database block is torn.

19. A method comprising:

without locking:

a reader process of a database management system (DBMS) obtaining, from metadata in persistent memory (PMEM), a first memory address for directly accessing a current version, which is a particular version, of a database block in the PMEM, wherein the PMEM does not comprise at least one selected from the group consisting of a disk and a block-oriented device;

concurrently without locking:

the reader process reading the particular version of the database block in the PMEM, and

a writer process of the DBMS writing content into a new version of the database block in the PMEM,

wherein said reading the particular version of the database block in the PMEM comprises using at least one selected from the group consisting of: byte addressable direct access (DAX) to hardware and a filesystem in userspace (FUSE).

20. The method of claim 1 wherein a chip contains the PMEM.

21. One or more non-transitory computer-readable media storing instruction that, when executed by one or more processors, cause:

without locking:

a reader process of a database management system (DBMS) obtaining, from metadata in persistent memory (PMEM), a first memory address for directly accessing a current version, which is a particular version, of a database block in the PMEM, wherein the PMEM does not comprise at least one selected from the group consisting of a disk and a block-oriented device;

concurrently without locking:

the reader process reading the particular version of the database block in the PMEM, and

a writer process of the DBMS writing content into a new version of the database block in the PMEM,

wherein said reading the particular version of the database block in the PMEM comprises using at least one selected from the group consisting of: byte addressable direct access (DAX) to hardware and a filesystem in userspace (FUSE).

22. The method of claim 8 wherein comprising detecting that the previous version of the database block in the volatile memory is stale comprises, after said copying the particular version of the database block from the PMEM to the volatile memory, the reader process detecting, in the metadata in the PMEM, the second memory address for directly accessing the new version of the database block in the PMEM.

23. The method of claim 9 wherein the detecting that the copy of the particular version of the database block is torn does not comprise calculating a checksum.

24. The method of claim 9 wherein:

the method further comprises, without locking, the reader process reading, from the metadata in the PMEM, a first reading of a status indicator for the database block;

the detecting that the copy of the particular version of the database block is torn comprises, after said reading the particular version of the database block in the PMEM:

rereading, from the metadata in the PMEM, a second reading of the status indicator for the database block, and

detecting that the second reading of the status indicator for the database block does not match the first reading of the status indicator for the database block.

25. The method of claim 24 wherein the detecting that the second reading of the status indicator does not match the first reading of the status indicator comprises detecting that the second reading of the status indicator contains at least one selected from the group consisting of a particular Boolean value, an incremented count, and a particular arithmetic sign of a number.

26. The one or more non-transitory computer-readable media of claim 18 wherein the detecting that the copy of the particular version of the database block is torn does not comprise calculating a checksum.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 10, 2020
From: LEE, J. WILLIAM; BRIDGE, WILLIAM H., JR.; KEMKAR, ANKUR; GOKHALE, VIPIN; SOMA, SIVARAM PRASAD; SELVAKUMAAR, VISHVESH MOHANARANGAM; LOAIZA, JUAN R.; HU, WEI-MING; MACNAUGHTON, NEIL J.S.; LEE, ADAM Y.
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 052899/0963 →
Continuity (2)
Provisional Application 62899943 · Sep 13, 2019
Related Publication 20210081372A1 · Mar 18, 2021