1. Linux kernel build
- The build is slow (case of virtual machine): allocate more processor, more memory resource.
- Permission error
- sudo [command]
2. Module build
- Modify kernel for using “smap_gather_stats”
- patch files: procrank-kernel
- cp mm.h linux-5.0.9/include/linux/mm.h
- cp task_mmu.c linux-5.0.9/fs/proc/task_mmu.c
- “killed” message
- You should check if p->mm is NULL
- The mm struct is null for kernel threads.
- You should print only “pid” and “process name” for kernel threads.
3. Result
- Process name
- You do not need to print the full name
- USS
- You refer to https://github.com/csimmonds/
procrank_linux -
pm_map_usage_flags() in libpagemap/pm_map.
- You refer to https://github.com/csimmonds/
- The output of module is different from that of procrank (some process)
- We will test “mem”, “mem2”