IP Library › Granted Patent US 7,747,838
Granted Patent B2
US 7,747,838 · App. 11/751,005 · Granted Jun 29, 2010

Method and apparatus for dynamically adjusting page size in a virtual memory range

Assignee: International Business Machines Corporation
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 7,747,838
App. No.
11/751,005
Granted
Jun 29, 2010
Kind
B2
Abstract

The illustrative embodiments described herein provide a computer implemented method, apparatus, and computer program product for adjusting a page size for a virtual memory range. The process identifies a set of pages in the virtual memory range that reside on a primary memory to form a page occupancy. Each of the set of pages has a first page size. The process changes the first page size to a second page size in response to a comparison of the page occupancy to a threshold value indicating that the first page size should be adjusted.

Claims (40)

1. A computer implemented method for adjusting a page size for a virtual memory range, comprising:

identifying a set of pages in the virtual memory range that reside on a primary memory to form a page occupancy, wherein the set of pages has a first page size;

responsive to a comparison of the page occupancy to a first threshold value in a set of threshold values indicating that the first page size should be adjusted, determining whether the set of pages have uniform page protections;

responsive to a determination that the set of pages have uniform page protections, changing the first page size to a second page size larger than the first page size; and

responsive to a second comparison of the page occupancy to a second threshold value in the set of threshold values indicating that the second page size should be adjusted, changing the second page size to a different page size.

2. The computer implemented method of claim 1 , wherein the comparison of the page occupancy to the threshold value indicating that the first page size should be adjusted, further comprises:

determining whether the page occupancy is equal to the threshold value; and

responsive to a determination that the first page size is equal to the threshold value, dynamically adjusting the first page size to the second page size.

3. The computer implemented method of claim 1 , wherein the comparison of the page occupancy to the threshold value indicating that the first page size should be adjusted, further comprises:

determining whether the page occupancy is greater than the threshold value; and

responsive to a determination that the first page size is greater than the threshold value, dynamically adjusting the first page size to the second page size.

4. The computer implemented method of claim 1 , wherein the threshold value is a first percentage value, and wherein the page occupancy is a second percentage value.

5. The computer implemented method of claim 1 , wherein the threshold value is a user-definable threshold.

6. The computer implemented method of claim 1 , wherein the threshold value is 100 percent page occupancy.

7. A computer program product in a computer-readable medium storing computer-usable program code for adjusting a page size for a virtual memory range, the computer program product comprising:

computer-usable program code for identifying a set of pages in the virtual memory range that reside on a primary memory to form a page occupancy, wherein each of the set of pages has a first page size;

computer-usable program code, responsive to a comparison of the page occupancy to a first threshold value in a set of threshold values indicating that the first page size should be adjusted, for determining whether the set of pages have uniform page protections;

computer-usable program code, responsive to a determination that the set of pages have uniform page protections, for changing the first page size to a second page size larger than the first page; and

computer-usable program code, responsive to a second comparison of the page occupancy to a second threshold value in the set of threshold values indicating that the second page size should be adjusted, for changing the second page size to a different page size.

8. The computer program product of claim 7 , wherein the comparison of the page occupancy to the threshold value indicating that the first page size should be adjusted, further comprises:

computer-usable program code for identifying that the page occupancy is equal to the threshold value.

9. The computer program product of claim 7 , wherein the comparison of the page occupancy to the threshold value indicating that the first page size should be adjusted, further comprises:

computer-usable program code for identifying that the page occupancy is greater than the threshold value.

10. A data processing system comprising:

a bus system;

a memory connected to the bus system, wherein the memory includes a set of instructions; and

a processing unit connected to the bus system, wherein the processing unit executes the set of instructions to identify a set of pages in the virtual memory range that reside on a primary memory to form a page occupancy in which each of the set of pages has a first page size; determine whether the set of pages have uniform page protections in response to a comparison of the page occupancy to a first threshold value in a set of threshold values indicating that the first page size should be adjusted;

change the first page size to a second page size larger than the first page size in response to determination that the set of pages have uniform page protections; and

change the second page size to a different page size in response to a second comparison of the page occupancy to a second threshold value in the set of threshold values indicating that the second page size should be adjusted.

11. The data processing system of claim 10 , wherein the processing unit further executes the set of instructions to identify that the page occupancy is equal to the threshold value.

12. The data processing system of claim 10 , wherein the processing unit further executes the set of instructions to identify that the page occupancy is greater than the threshold value.

13. The computer implemented method of claim 1 , further comprising:

responsive to a determination that the set of pages do not have uniform page protections, changing the first page size to a second page size smaller than the first page size.

14. The computer implemented method of claim 1 , wherein the comparison of the page occupancy to a threshold value indicating that the first page size should be adjusted comprises comparing the page occupancy to a threshold value in a set of threshold values, wherein each threshold value in the set of threshold values is associated with a particular virtual memory range of an application.

15. The computer implemented method of claim 1 , further comprising:

responsive to receiving instructions from a user to revert to a default page size, changing a current page size of the set of pages to the default page size.

16. The computer implemented method of claim 1 , further comprising:

responsive to a determination that the primary memory is over-committed, preventing the changing of the first page size to the second page size larger than the first page size.

17. The computer implemented method of claim 5 , wherein the threshold value is set by a user at a system-wide level.

18. The computer implemented method of claim 5 , wherein the threshold value is set by a user at a process-wide level.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 19, 2007
From: HEPKIN, DAVID ALAN; SWANBERG, RANDAL CRAIG
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 019316/0572 →
Continuity (1)
Related Publication 20080288742A1 · Nov 20, 2008