Linux kernel page table replacement-based method for tracking memory access model

A memory access and page table technology, which is applied in the field of operating system and program analysis, can solve the problem of the explosion of statistical data storage space, etc., and achieve the effect of fast tracking speed and small data volume

Inactive Publication Date: 2009-12-16
BEIHANG UNIV
View PDF0 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Some memory access address tracking tools have also been implemented abroad, such as valgrind, etc. Their implementation does not need to change the Linux kernel, and they trac

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Linux kernel page table replacement-based method for tracking memory access model
  • Linux kernel page table replacement-based method for tracking memory access model
  • Linux kernel page table replacement-based method for tracking memory access model

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0024] The present invention adopts the following steps:

[0025] (1) Main variable settings

[0026] / / The pid of the target process, 0 means it is not started

[0027] pid_t _mt_pid_;

[0028] / / Whether the first address of the fake page table has been passed to the cr3 register

[0029] bool _mt_tran_cr3_;

[0030] / / The first address of the fake page table

[0031] pgd_t* _mt_pgd_;

[0032] / / Used to back up the first address of the real page table

[0033] pgd_t* _mt_gd_pgd_;

[0034] / / The address that triggered the page fault interrupt last time

[0035] unsigned long_l_mt_add_;

[0036] (2) Add system call

[0037] The present invention adds 3 new system calls to the Linux kernel. System call a is used to start the statistical process, system call b is used to end the statistical process, and system call c is used to fetch the traced memory access model to the user state. In this way, the statistical process can be started for a specific target process when needed, and the...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a Linux kernel page table replacement-based method for tracking a memory access model. As different between the speed of a processor and the memory access speed becomes larger and larger, a memory system becomes a bottleneck of system performance. Application programs of different natures have different memory access models and different memory behavior optimization modes. However, the prior tool cannot track the memory accesses of the programs effectively and therefore causes complex memory optimization. The method of the invention is used in a Linux system and replaces the page table of a target process by changing Linux kernel. A new page table stores only one item of a non-code segment web page, so missing page interrupt occurs every time the target process accesses a memory and virtual page access sequence of the specific target process, namely, the memory access model of programs can be tracked by recording corresponding address when the kernel processes the missing page. The method has the characteristic of light weight, and can quickly track memory access, track out a small amount of data and avoid influencing the normal operation of other processes in an operation system. The method for tracking the memory access model can guide the optimization of memory behaviors.

Description

technical field [0001] The invention relates to the field of operating system and program analysis. Background technique [0002] Now, the gap between processor speed and memory access speed is getting bigger and bigger, and has reached several orders of magnitude. According to the principle that the slowest part determines the performance of the system, the memory system becomes the bottleneck of performance, so it is urgent to optimize the memory behavior of the program. . Applications of different nature have different types of memory access models, and the optimization methods are also different. Therefore, if we can determine the memory access model of the program, we can prescribe the right medicine and perform prefetch optimization. [0003] The program memory access model is the description of the program memory behavior. There is no clear definition in the existing literature, and the existing tools cannot efficiently track the memory access of the program, which ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/34
Inventor 王雷王政李子星
Owner BEIHANG UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products