File page table management technology
AssigneeHuawei Technologies Co., Ltd.
InventorsHuan Zhang, Jun Xu, Guanyu Zhu
Life of this patent
Estimating the term…
Abstract
A file page table management method. The file page table management method is applied to a storage system in which a file system is created in a memory. According to the file page table management method, a mapping manner of a file page table can be dynamically adjusted based on an access type of an access request for accessing the memory, thereby improving memory access efficiency and saving memory space.
Claims18
A file page table management method applied to a storage system with a processor, a memory, and a file system created based on the memory, the method comprising:
- collecting, by the processor, statistics about types of access to a first file in the file system within a first time period;
- performing a first determination, by the processor, that a quantity of first access types is greater than a quantity of second access types during the access to the first file within the first time period, wherein the first access type includes sequential access and large-granularity random access, and the second access type includes small-granularity random access;
- performing a second determination, by the processor, that a mapping manner of a first file page table is a first mapping manner, wherein the first file page table is used to record a mapping relationship between a virtual address of an operating system and a memory page that stores data of the first file in the memory, wherein the first mapping manner establishes a mapping relationship between the virtual address of the operating system and a first-type page in the memory, wherein the first-type page stores the data of the first file;
- and
- in response to the first determination and the second determination, adjusting, by the processor, the first file page table from the first mapping manner to a second mapping manner, wherein the second mapping manner establishes a mapping relationship between the virtual address of the operating system and a second-type page in the memory, and a size of the second-type page is greater than a size of the first-type page.
A file page table management method applied to a storage system with a processor, a memory, and a file system created based on the memory, the method comprising:
- collecting, by the processor, statistics about types of access to a second file in the file system within a first time period;
- performing a first determination, by the processor, that a quantity of first access types is not greater than a quantity of second access types during the access to the second file within the first time period, wherein the first access type includes sequential access and large-granularity random access, and the second access type includes small-granularity random access;
- performing a second determination, by the processor, that a mapping manner of a second file page table is a second mapping manner, wherein the second file page table is used to record a mapping relationship between a virtual address of an operating system and a memory page that stores data of the second file in the memory, wherein the second mapping manner establishes a mapping relationship between the virtual address of the operating system and a second-type page in the memory, wherein the second-type page stores data of the second file;
- and
- in response to the first determination and the second determination, adjusting, by the processor, the second file page table from the second mapping manner to a first mapping manner, wherein the first mapping manner establishes a mapping relationship between the virtual address of the operating system and a first-type page in the memory, and a size of the first-type page is less than a size of the second-type page.
A storage system, comprising:
- a memory and a file system;
- a processor connected to the memory, the processor configured to:
- collect statistics about types of access to a first file in the file system within a first time period;
- perform a first determination that a quantity of first access types is greater than a quantity of second access types during the access to the first file within the first time period, wherein the first access type includes sequential access and large-granularity random access, and the second access type includes small-granularity random access;
- perform a second determination that a mapping manner of a first file page table is a first mapping manner, wherein the first file page table is used to record a mapping relationship between a virtual address of an operating system and a memory page that stores data of the first file in a memory, wherein the first mapping manner establishes a mapping relationship between the virtual address of the operating system and a first-type page in the memory, wherein the first-type page stores the data of the first file;
- and
- in response to the first determination and the second determination, adjust the first file page table from the first mapping manner to a second mapping manner, wherein the second mapping manner establishes a mapping relationship between the virtual address of the operating system and a second-type page in the memory, and a size of the second-type page is greater than a size of the first-type page.
A storage system, comprising:
- a memory and a file system;
- a processor connected to the memory, the processor configured to:
- collect statistics about types of access to a second file in the file system within a first time period;
- perform a first determination that a quantity of first access types is not greater than a quantity of second access types during the access to the second file within the first time period, wherein the first access type includes sequential access and large-granularity random access, and the second access type includes small-granularity random access;
- perform a second determination that a mapping manner of a second file page table is a second mapping manner, wherein the second file page table is used to record a mapping relationship between a virtual address of an operating system and a memory page that stores data of the second file in a memory, wherein the second mapping manner establishes a mapping relationship between the virtual address of the operating system and a second-type page in the memory, wherein the second-type page stores data of the second file;
- and
- in response to the first determination and the second determination, adjust the second file page table from the second mapping manner to a first mapping manner, wherein the first mapping manner establishes a mapping relationship between the virtual address of the operating system and a first-type page in the memory, and a size of the first-type page is less than a size of the second-type page.
Dependencies are inferred from the claim text.