mm: page_alloc: Add a tracepoint to trace the call of __alloc_pages()
openeuler inclusion category: feature bugzilla: https://portrait.gitee.com/openeuler/open-source-summer/issues/I56LAR CVE: NA ---------------------------------------------------------------------- /proc/meminfo is the main way for user to know the physical memory usage, but it cannot know every operation of allocating physical pages. Some kernel modules can call alloc_pages to get physical pages directly, which part of physical memory will not be counted by /proc/meminfo. In order to trace the specific process of physical page allocation and release, one solution is to use ebpf to trace the calls of __alloc_pages and __free_pages, a better solution is to insert a new modules into kernel and register tracepoint handlers to obtain the physical page allocation information. So i also export the relative tracepoint symbols so that kernel module can use them. Physical pages allocation may be a time-consuming operation, so i added a new tracepoint named mm_page_alloc_enter at the entrance of __alloc_pages. Before that, a tracepoint has been added in the kernel at the end of the page allocation operation. The tracepoints can be used to calculate the time consumption of the allocation operation. Signed-off-by:Gong Yuchen <gyc8787@163.com>
Showing
想要评论请 注册 或 登录