IP Library Granted Patent US 9,135,038
Granted Patent B1
US 9,135,038 · App. 13/468,742 · Granted Sep 15, 2015

Mapping free memory pages maintained by a guest operating system to a shared zero page within a machine frame

Inventors: Krzysztof Uchronski (Cambridge, GB); Martin O'Brien (Mountain View, CA); Jacob Gorm Hansen (Ryomgaard, DK); Kiran Bondalapati (Los Altos, CA); Ian Pratt (Cambridge, GB); Gaurav Banga (Cupertino, CA); Vikram Kapoor (Cupertino, CA)
Assignee: Bromium, Inc.
G06F9/45533G06F9/45558G06F2009/45583
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 9,135,038
App. No.
13/468,742
Granted
Sep 15, 2015
Kind
B1
Abstract

Reducing an amount of memory used by a virtual machine. A system includes multiple virtual machines that share common pages of memory. The number of private pages associated with each virtual machine is minimized by ensuring that pages that a guest operating system regards as now free or zeroed are efficiently mapped by the hypervisor to a shared zero page. Upon a hypervisor determining that one or more guest physical frame numbers are assigned to free memory pages, the hypervisor updates mapping data to map the one or more guest physical frame numbers to a shared zero page within the machine frame.

Claims (45)

1. One or more non-transitory computer-readable storage mediums storing one or more sequences of instructions, which when executed by one or more processors, cause:

upon a hypervisor determining that one or more guest physical frame numbers are assigned to free memory pages maintained by a guest operating system, the hypervisor updating mapping data to map the one or more guest physical frame numbers to a shared zero page within a machine frame.

2. The one or more non-transitory computer-readable storage mediums of claim 1 , wherein the hypervisor determines that the one or more guest physical frame numbers are assigned to free memory pages by the guest operating system informing the hypervisor using a modified zero thread.

3. The one or more non-transitory computer-readable storage mediums of claim 1 , wherein the hypervisor determines that the one or more guest physical frame numbers are assigned to free memory pages by the hypervisor performing introspection to read information within a guest operating system.

4. The one or more non-transitory computer-readable storage mediums of claim 1 , wherein execution of the one or more sequences of instructions further causes:

a modified zero thread instructing the hypervisor to map a particular guest physical frame number to the shared zero page in the machine frame.

5. The one or more non-transitory computer-readable storage mediums of claim 1 , wherein execution of the one or more sequences of instructions further causes:

the hypervisor traversing a list of free pages, maintained by the guest operating system, to map a portion of free pages in the list of free pages to the shared zero page in the machine frame and move that portion of free pages mapped to the shared zero page to a list of zeroed pages maintained by the guest operating system.

6. The one or more non-transitory computer-readable storage mediums of claim 1 , execution of the one or more sequences of instructions further causes:

the hypervisor traversing the list of zeroed pages, maintained by the guest operating system, to map a portion of pages in the list to the shared zero page in the machine frame.

7. The one or more non-transitory computer-readable storage mediums of claim 1 , wherein execution of the one or more sequences of instructions further causes:

the hypervisor traversing a list of free pages, maintained by the guest operating system, to map each free page in the list of free pages to the shared zero page in the machine frame and move each free page mapped to the shared zero page to a list of zeroed pages maintained by the guest operating system.

8. The one or more non-transitory computer-readable storage mediums of claim 1 , execution of the one or more sequences of instructions further causes:

the hypervisor traversing the list of zeroed pages, maintained by the guest operating system, to map each page in the list to the shared zero page in the machine frame.

9. The one or more non-transitory computer-readable storage mediums of claim 1 , wherein execution of the one or more sequences of instructions further cause:

zeroing any free pages in a guest physical frame for a newly instantiated virtual machine without the hypervisor periodically scanning pages of memory in the guest physical frame to identify pages of memory to map to the shared zero page.

10. The one or more non-transitory computer-readable storage mediums of claim 1 , wherein execution of the one or more sequences of instructions further cause:

ensuring that a certain number of pages at a head end of the list of zeroed pages are private zero pages.

11. The one or more non-transitory computer-readable storage mediums of claim 1 , wherein execution of the one or more sequences of instructions further cause:

in response to the hypervisor receiving a page fault for a page of memory previously listed on a list of zeroed pages, the hypervisor changing a number of pages on the head of the list of zeroed pages from being shared zeroed pages to private zeroed pages.

12. One or more non-transitory computer-readable storage mediums storing one or more sequences of instructions, which when executed by one or more processors, cause:

upon a hypervisor determining that one or more guest physical frame numbers are assigned to free memory pages, the hypervisor updating mapping data to map the one or more guest physical frame numbers to a shared zero page within a machine frame; and

in response to the hypervisor receiving a page fault for a page of memory previously listed on a list of zeroed pages, the hypervisor changing a number of pages on the head of the list of zeroed pages from being shared zeroed pages to private zeroed pages, wherein the hypervisor changing the number of shared zeroed pages to private zeroed pages comprises:

the hypervisor identifying when pages in the list of zeroed pages should be changed from being shared zeroed pages to private zeroed pages by performing introspection upon the guest operating system or identifying when a certain number of pages have been allocated from the list of zeroed pages.

13. One or more non-transitory computer-readable storage mediums storing one or more sequences of instructions, which when executed by one or more processors, cause:

upon a hypervisor determining that one or more guest physical frame numbers are assigned to free memory pages, the hypervisor updating mapping data to map the one or more guest physical frame numbers to a shared zero page within a machine frame; and

in response to the hypervisor receiving a page fault for a page of memory previously listed on a list of zeroed pages, the hypervisor changing a number of pages on the head of the list of zeroed pages from being shared zeroed pages to private zeroed pages,

wherein the number of pages corresponds to those pages on the list of zeroed pages which were added to the list of zeroed pages before the page of memory on which the page fault was received in addition to a certain number of pages which were added to the list of zeroed pages after said page of memory on the list of zeroed pages.

14. A machine-implemented method for reducing an amount of memory used by a virtual machine, comprising:

upon a hypervisor determining that one or more guest physical frame numbers are assigned to free memory pages maintained by a guest operating system, the hypervisor updating mapping data to map the one or more guest physical frame numbers to a shared zero page within a machine frame.

15. The method of claim 14 , wherein the hypervisor determines that the one or more guest physical frame numbers are assigned to free memory pages by the guest operating system informing the hypervisor using a modified zero thread.

16. The method of claim 14 , wherein the hypervisor determines that the one or more guest physical frame numbers are assigned to free memory pages by the hypervisor performing introspection to read information within a guest operating system.

17. A client capable of creating a virtual machine with reduced memory requirements, comprising:

one or more processors; and

a machine-readable storage medium storing one or more sequences of instructions, which when executed by the one or more processors, cause: upon a hypervisor determining that one or more guest physical frame numbers are assigned to free memory pages maintained by a guest operating system, the hypervisor updating mapping data to map the one or more guest physical frame numbers to a shared zero page within a machine frame.

18. The client of claim 17 , wherein the hypervisor determines that the one or more guest physical frame numbers are assigned to free memory pages by the guest operating system informing the hypervisor using a modified zero thread.

19. The client of claim 17 , wherein the hypervisor determines that the one or more guest physical frame numbers are assigned to free memory pages by the hypervisor performing introspection to read information within a guest operating system.

20. The client of claim 17 , wherein execution of the one or more sequences of instructions further cause:

a modified zero thread instructing the hypervisor to map a particular guest physical frame number to the shared zero page in the machine frame.

21. The client of claim 17 , wherein execution of the one or more sequences of instructions further cause:

the hypervisor traversing a list of free pages, maintained by the guest operating system, to map a portion of free pages in the list of free pages to the shared zero page in the machine frame and move that portion of free pages mapped to the shared zero page to a list of zeroed pages maintained by the guest operating system.

22. The client of claim 17 , execution of the one or more sequences of instructions further cause:

the hypervisor traversing the list of zeroed pages, maintained by the guest operating system, to map a portion of pages in the list to the shared zero page in the machine frame.

23. The client of claim 17 , wherein execution of the one or more sequences of instructions further cause:

zeroing any free pages in a guest physical frame for a newly instantiated virtual machine without the hypervisor periodically scanning pages of memory in the guest physical frame to identify pages of memory to map to the shared zero page.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 16, 2019
From: BROMIUM, INC.
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 051305/0894 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2012
From: UCHRONSKI, KRZYSZTOF; O'BRIEN, MARTIN; HANSEN, JACOB GORM; BONDALAPATI, KIRAN; PRATT, IAN; BANGA, GAURAV; KAPOOR, VIKRAM
To: BROMIUM, INC.
Reel/Frame 028841/0383 →
Continuity (2)
Continuation In Part 13115354 · May 25, 2011
Provisional Application 61349717 · May 28, 2010