IP Library Granted Patent US 10,019,193
Granted Patent B2
US 10,019,193 · App. 14/932,356 · Granted Jul 10, 2018

Checkpointing a journal by virtualization of non-volatile random access memory

Inventors: Xiaoshan Zuo (San Jose, CA); Tomasz Barszczak (San Jose, CA)
Assignee: Hewlett Packard Enterprise Development LP
G06F3/065G06F3/061G06F3/0619G06F3/0635G06F3/0664G06F3/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,019,193
App. No.
14/932,356
Granted
Jul 10, 2018
Kind
B2
Abstract

Methods, systems, and computer programs are presented for virtualizing Non-Volatile Random Access Memory (NVRAM). A first area in RAM is labeled as active area and a second area as non-active area, and an active journal and a non-active journal are created in permanent storage. A transaction is created for each write made to the virtual NVRAM, and the created transactions are written to the active journal and to the active area. When the active journal is greater than a predetermined size or a timeout occurs, a checkpoint is created by copying contents from the active area to the non-active area, switching status of the active area and the non-active areas (the active area becomes the non-active area and the non-active area becomes the active area), switching status of the active journal and the non-active journal, and copying the content of the current non-active area to permanent storage.

Claims (73)

1. A method comprising:

labeling a first area in Random Access Memory (RAM) as an active area of a virtual non-volatile RAM (NVRAM) and a second area in RAM as a non-active area of the virtual NVRAM;

creating, in permanent storage, a first journal and a second journal, wherein the first journal is an active journal associated with the first area labeled as the active area and the second journal is a non-active journal associated with the second area labeled as the non-active area;

creating a transaction for each write made to the virtual NVRAM;

writing the created transactions to the active journal and to the active area; and

based on a size of the active journal exceeding a predetermined threshold, creating a checkpoint, wherein creating the checkpoint includes:

copying contents from the active area to the non-active area;

switching status of the active area and the non-active area, wherein the first area becomes the non-active area and the second area becomes the active area to store writes made to the virtual NVRAM;

switching status of the active journal and the non-active journal, wherein the first journal becomes the non-active journal and the second journal becomes the active journal; and

copying contents of the currently non-first area to permanent storage as the checkpoint, wherein the checkpoint is a last state of the virtual NVRAM from which to begin recovery.

2. The method as recited in claim 1 , wherein writing the created transactions to the active journal and to the active area includes:

storing a plurality of transactions into a record;

writing the record into the active journal; and

updating contents of the active area based on the record written to the active journal.

3. The method as recited in claim 1 , wherein creating the checkpoint further includes:

before copying contents from the active area, blocking new writes to the virtual NVRAM;

after switching status of the active journal and the non-active journal, unblocking the new writes to the virtual NVRAM; and

resetting the current non-active journal.

4. The method as recited in claim 1 , wherein switching status of the active journal and the non-active journal further includes:

initializing the currently active journal.

5. The method as recited in claim 1 , further comprising keeping information on the currently active journal in a first superblock in permanent storage.

6. The method as recited in claim 5 , further including:

after a warm recovery of a system hosting the virtual NVRAM:

reading the first superblock to identify the currently active area and the currently non-active area;

writing the currently active area to a non-active checkpoint on permanent storage; and

switching active and non-active checkpoints on permanent storage.

7. The method as recited in claim 5 , further including:

after a cold recovery of a system hosting the virtual NVRAM:

reading the first superblock to identify the currently active area and the currently non-active area;

loading a valid checkpoint into the currently active area;

replaying records on the active journal to be loaded into the currently active area; and

saving the currently non-active area to a non-active checkpoint on permanent storage.

8. A system for virtualizing Non-Volatile Random Access Memory (NVRAM), the system comprising:

a processor;

a Random Access Memory (RAM), wherein the processor labels a first area in the RAM as an active area of a virtual NVRAM and a second area in the RAM as a non-active area of the virtual NVRAM; and

a permanent storage storing a first journal and a second journal, wherein the first journal is an active journal associated with the first area labeled as the active area and the second journal is a non-active journal associated with the second area labeled as the non-active area, wherein the processor creates a transaction for each write made to the virtual NVRAM and the processor writes the created transactions to the active journal and to the active area;

wherein, based on a size of remaining space on the active journal falling below a predetermined threshold, the processor creates a checkpoint in the permanent storage, wherein, to create the checkpoint, the processor is to:

copy contents from the active area to the non-active area;

switch status of the active area and the non-active area, wherein the first area becomes the non-active area and the second area becomes the active area to store writes made to the virtual NVRAM;

switch status of the active journal and the non-active journal, wherein the first journal becomes the non-active journal and the second journal becomes the active journal; and

copy contents of the currently non-first area to permanent storage as the checkpoint, wherein the checkpoint is a last state of the virtual NVRAM from which to begin recovery.

9. The system as recited in claim 8 , wherein when writing the created transactions to the active journal and to the active area, the processor stores a plurality of transactions into a record, writes the record into the active journal, and updates contents of the active area based on the record written to the active journal.

10. The system as recited in claim 8 , wherein, to create the checkpoint, the processor, before copying contents from the active area, is to block new writes to the virtual NVRAM, wherein after switching status of the active journal and the non-active journal, the processor is to unblock the new writes to the virtual NVRAM; and to reset the current non-active journal.

11. The system as recited in claim 8 , wherein when switching status of the active journal and the non-active journal the processor is to initialize the currently active journal.

12. The system as recited in claim 8 , wherein the processor is to keep information on the currently active journal in a first superblock in the permanent storage.

13. The system as recited in claim 12 , wherein after a warm recovery of a system hosting the virtual NVRAM, the processor is to read the first superblock to identify the currently active area and the currently non-active area, to write the currently active area to a non-active checkpoint on the permanent storage, and to switch active and non-active checkpoints on the permanent storage.

14. The system as recited in claim 12 , wherein after a cold recovery of a system hosting the virtual NVRAM, the processor is to read the first superblock to identify the currently active area and the currently non-active area, to load a valid checkpoint into the currently active area, to replay records on the active journal to be loaded into the currently active area, and to save the non-active area to a non-active checkpoint on the permanent storage.

15. A non-transitory computer-readable storage medium storing a computer program for virtualizing Non-Volatile Random Access Memory (NVRAM), wherein the program, when executed by a processor, is to cause the processor to:

label a first area in Random Access Memory (RAM) as an active area of a virtual NVRAM and a second area in RAM as a non-active area of the virtual NVRAM;

create, in permanent storage, a first journal and a second journal, wherein the first journal is an active journal associated with the first area labeled as the active area and the second journal is a non-active journal associated with the second area labeled as the non-active area;

create a transaction for each write made to the virtual NVRAM;

write the created transactions to the active journal and to the active area; and

based on a size of the active journal being greater than a predetermined size or a timeout occurring, create a checkpoint, wherein creating a checkpoint includes:

copying contents from the active area to the non-active area;

switching status of the active area and the non-active area, wherein the first area becomes the non-active area and the second area becomes the active area to store writes made to the virtual NVRAM;

switching status of the active journal and the non-active journal, wherein the first journal becomes the non-active journal and the second journal becomes the active journal; and

copying contents of the currently non-first area to permanent storage as the checkpoint, wherein the checkpoint is a last state of the virtual NVRAM from which to begin recovery.

16. The storage medium as recited in claim 15 , wherein, to write the created transactions to the active journal and to the active area, the program is further to cause the processor to:

store a plurality of transactions into a record;

write the record into the active journal; and

update contents of the active area based on the record written to the active journal.

17. The storage medium as recited in claim 15 , wherein, to create the checkpoint, the program is further to cause the processor to:

before copying contents from the active area, block new writes to the virtual NVRAM;

after switching status of the active journal and the non-active journal, unblock the new writes to the virtual NVRAM; and

reset the current non-active journal.

18. The storage medium as recited in claim 15 , wherein, to switch status of the active journal and the non-active journal, the program is further to cause the processor to:

initialize the current active journal.

19. The storage medium as recited in claim 15 , wherein the instructions are further to cause the processor to keep information on the currently active journal in a first superblock in permanent storage.

20. The storage medium as recited in claim 19 , wherein the instructions are further to cause the processor to:

after a warm recovery of a system hosting the virtual NVRAM,

read the first superblock to identify the currently active area and the currently non-active area;

write the currently active area to a non-active checkpoint on permanent storage; and

switch active and non-active checkpoints on permanent storage.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 14, 2017
From: NIMBLE STORAGE, INC.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 042810/0906 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 5, 2015
From: ZUO, XIAOSHAN; BARSZCZAK, TOMASZ
To: NIMBLE STORAGE, INC.
Reel/Frame 036974/0751 →
Continuity (1)
Related Publication 20170123685A1 · May 4, 2017
Cited By (1)
US 12,210,417