How are the data structures described so far brought to use? As with the page migration approach, allocation flags play a crucial role. They are discussed below in Section 3.5.4 in more detail. Here, it suffices to say that all movable allocations must specify both_gfp_highmem and_gfp_movable.

Since the kernel determines the zone from which an allocation is fulfilled by the allocation flags, it can select zone_movable when the said flags are set. This is the only change required to integrate zone_movable into the buddy system! The rest is done by generic routines that work on all zones, discussed below.

Continue reading here: Initializing the Zone and Node Data Structures

Was this article helpful?

0 0