The process and memory of Linux are two great mountains, and the understanding of the kernel is not complete without turning over the two mountain blocks.
For Linux memory management, do some preparatory work before you start.
First Bing to Quora's "How can one really learn Linux Kernel Memory Management?", which is the question for most beginners, or most Linux kernel developers?
As Vaishali Thakkar says, the best way to do this is to read the code, but in the face of such a complex code, it is often impossible. Vaishali Thakkar recommends starting with the LSF/MM forum to get to know the annual report, but these technologies are often at the forefront. The following path is relatively appropriate:
- Linuxmm-linux-mm.org Wiki
- Understanding the Linux Virtual Memory Manager's classic about the management of Linux memories, though a bit old 2.4, still has its merits.
- Some memory management maintainer blog:Rik van Riel's home page Mel Gorman
- Kernel coverage at LWN.net Core development details
- The most convenient kernel help documentation.
Other methods include asking questions through the IRC channel #mm on OFTC, reading the code in question using ' git blame ' to find the corresponding git, and then reading the comments to understand the background.
Finally, you can experiment by modifying the code or parameters to verify your ideas.
another one Chen Gang also mentioned the book Understanding the Linux Virtual Memory Manager. Also because the MMU is architecture-related, to understand memory management, not reading the MMU specification is not possible, for the ARM architecture on the official website to provide download. It also mentions the importance of reading code, though not immediately effective, but over time. In addition, you can do the experiment by modifying the MM related parameters, and reading mm related commits.
Add a Mel Gorman tool set mmtests for testing the core mm.
After some understanding, a brief summary, as follows: 1. Read ARM MMU related information "Read arm Memory (L1/L2/MMU) Notes"2. Memory Management related Books "Understanding the Linux Virtual Memory Manager》、《run, Linux kernel》、《Professional Linux Kernel architecture/in-depth Linux kernel architecture》、《Linux Kernel Development》、《Understanding the Linux Kernel"3. Kernel code reading, git blame/log viewing information, kernel Help document 4. modifying kernel VM parameters, testing; using mmtests
Finally, as Chen Gang said "MM is a tough topic", the road ahead is doomed to be uneven. rashness, step by step!
How to expand Linux Memory Management learning?