Initialization of Memory Management

In the context of memory management, initialization can have multiple meanings. On many CPUs, it is necessary to explicitly set the memory model suitable for the Linux kernel, for example, by switching to protected mode on IA-32 systems, before it is possible to detect the available memory and register it with the kernel. In the course of initialization, it is also necessary to set up the data structures of memory management, and much more. Because the kernel needs memory before memory management is fully initialized, a simple additional form of memory management is used during the boot process and is discarded thereafter.

As the CPU-specific parts of memory management initialization employ many minor, subtle details of the underlying architecture that reveal little of interest about the structure of the kernel and are simply best practices in assembly language programming, let's concern ourselves in this section only with initialization work on a higher level. The key aspect is initialization of the pg_data_t data structure (and its subordinate structures) introduced in Section 3.2.2 because this is already machine-independent.

The primary purpose of the aforementioned processor-specific operations whose details we will ignore is to investigate how much memory is available in total and how it is shared between the individual nodes and zones of the system.

Continue reading here: Data Structure Setup

Was this article helpful?

0 0