IA-64 Linux Kernel: Design and Implementation
The authoritative guide to the IA-64 Linux kernel implementation.
- Authoritative and complete description of the Linux kernel for IA-64/IPF (Itanium Processor Family)
- Provides an in-depth discussion of the ideas and concepts behind the Linux hardware abstraction interfaces, the IA-64 design space, and their actual realization
- From the lead architects and developers of the IA-64 Linux kernel
The IA-64 architecture and Itanium processors are designed to offer unprecedented levels of performance, expandability, and reliability - and with the delivery of the IA-64 Linux kernel, that power is now accessible to every Linux developer. In this authoritative book, the IA-64 Linux kernel project's leaders take you "under the hood" with Linux for IA-64, demonstrating exactly how it makes the most of the IA-64's breakthrough capabilities.
Linux processes execute in a virtual environment that makes it appear as if each process had the entire address space of the CPU available to itself. This virtual address space extends from address 0 all the way to the maximum address. On a 32-bit platform, such as IA-32, the maximum address is 2^32 - 1 or
0xffffffff. On a 64-bit platform, such as IA-64, this is 2^64 -1 or
While it is obviously convenient for a process to be able to access such a huge address space, there are really three distinct, but equally important, reasons for using virtual memory.
- Resource virtualization. On a system with virtual memory, a process does not have to concern itself with the details of how much physical memory is available or which physical memory locations are already in use by some other process. In other words, virtual memory takes a limited physical resource (physical memory) and turns it into an infinite, or at least an abundant, resource (virtual memory).
- Information isolation. Because each process runs in its own address space, it is not possible for one process to read data that belongs to another process. This improves security because it reduces the risk of one process being able to spy on another process and, e.g., steal a password.
- Fault isolation. Processes with their own virtual address spaces cannot overwrite each other's memory. This greatly reduces the risk of a failure in one process triggering a failure in another process. That is, when a process crashes, the problem is generally limited to that process alone and does not cause the entire machine to go down.
In this chapter, we explore how the Linux kernel implements its virtual memory system and how it maps to the underlying hardware. This mapping is illustrated specifically for IA-64. The chapter is structured as follows. The first section provides an introduction to the virtual memory system of Linux and establishes the terminology used throughout the remainder of the chapter. The introduction is followed by a description of the software and hardware structures that form the virtual memory system. Specifically, the second section describes the Linux virtual address space and its representation in the kernel. The third section describes the Linux page tables, and the fourth section describes how Linux manages the translation lookaside buffer (TLB), which is a hardware structure used to accelerate virtual memory accesses. Once these fundamental structures are introduced, the chapter describes the operation of the virtual memory system. Section five explores the Linux page fault handler, which can be thought of as the engine driving the virtual memory system. Section six describes how memory coherency is maintained, that is, how Linux ensures that a process sees the correct values in the virtual memory locations it can access. Section seven discusses how Linux switches execution from one address space to another, which is a necessary step during a process context switch. The chapter concludes with section eight, which provides the rationale for some of the virtual memory choices that were made for the virtual memory system implemented on IA-64.