The Virtual Movable Zone
Grouping pages by mobility order is one possible method to prevent fragmentation of physical memory, but the kernel additionally provides another means to fight this problem: the virtual zone ZONE_MOVABLE. The mechanism has even found its way into the kernel during the development of kernel 2.6.23, one release before the mobility grouping framework was merged. In contrast to mobility grouping, the ZONE_MOVABLE feature must be explicitly activated by the administrator.
The basic idea is simple: The available physical memory is partitioned into one zone used for movable allocations, and one zone used for non-movable allocations. This will automatically prevent any non-movable pages from introducing fragmentation into the movable zone.
This immediately raises the question of how the kernel is supposed to decide how the available memory will be distributed between the two competitors. Clearly, this asks too much of the poor kernel, so the system administrator has to make the decision. After all, a human can predict much better which scenarios the machine will handle and what the expected distribution of allocations into the various types will be.
Continue reading here: Data Structures
Was this article helpful?