Sequential access to page metadata stored in a multi-level page table
AssigneeAvast Software s.r.o.
InventorJakub Jermá{hacek over (r)}
Life of this patent
Estimating the term…
Abstract
Systems and methods enable initializing and accessing page metadata stored in the last level of a multi-level page table, wherein an effort is made to reduce the number of metadata initializations and the number of page table walks for sequential accesses in comparison with a naïve method realized by a sequence of random accesses.
Claims21
A system for prefaulting page metadata, wherein said system comprises at least one electronic processor for performing the steps of:
- receiving a request to prefault a page range having a first address;
- determining a first-level index from the first address;
- determining if an address of a mid-level page table is in a first entry of a first-level page table at a position determined from the first-level index;
- in response to determining that the address of the mid-level page table is not in the first entry, allocating the mid-level page table and storing the address of the mid-level page table in the first entry;
- determining a mid-level index from the first address;
- determining if an address of a last-level page table is in a second entry of the mid-level page table determined from the mid-level index;
- in response to determining that the address of the last-level page table is not in the second entry, allocating the last-level page table and storing the address of the last-level page table in the second entry;
- determining whether partial initialization was requested;
- in response to determining that partial initialization was requested, determining a complement of the page range and initializing the page metadata of the determined complement;
- and
- in response to determining that partial initialization was not requested, initializing the last-level page table.
A method for prefaulting page metadata, the method comprising:
- receiving a request to prefault a page range having a first address;
- determining a first-level index from the first address;
- determining if an address of a mid-level page table is in a first entry of a first-level page table at a position determined from the first-level index;
- in response to determining that the address of the mid-level page table is not in the first entry, allocating the mid-level page table and storing the address of the mid-level page table in the first entry;
- determining a mid-level index from the first address;
- determining if an address of a last-level page table is in a second entry of the mid-level page table determined from the mid-level index;
- in response to determining that the address of the last-level page table is not in the second entry, allocating the last-level page table and storing the address of the last-level page table in the second entry;
- determining whether partial initialization was requested;
- in response to determining that partial initialization was requested, determining a complement of the page range and initializing the page metadata of the determined complement;
- and
- in response to determining that partial initialization was not requested, initializing the last-level page table.
A non-transitory computer readable medium for prefaulting page metadata having instructions that when executed cause one or more electronic processors to perform the steps of:
- receiving a request to prefault a page range having a first address;
- determining a first-level index from the first address;
- determining if an address of a mid-level page table is in a first entry of a first-level page table at a position determined from the first-level index;
- in response to determining that the address of the mid-level page table is not in the first entry, allocating the mid-level page table and storing the address of the mid-level page table in the first entry;
- determining a mid-level index from the first address;
- determining if an address of a last-level page table is in a second entry of the mid-level page table determined from the mid-level index;
- in response to determining that the address of the last-level page table is not in the second entry, allocating the last-level page table and storing the address of the last-level page table in the second entry;
- determining whether partial initialization was requested;
- in response to determining that partial initialization was requested, determining a complement of the page range and initializing the page metadata of the determined complement;
- and
- in response to determining that partial initialization was not requested, initializing the last-level page table.
Dependencies are inferred from the claim text.