Linux Kernel Architecture
Chapter3:MemoryManagement #endif ZONE_MOVABLE, MAX_NR_ZONES }; In contrast to all other zones in the system,ZONE_MOVABLEis not a ...
Chapter3:MemoryManagement be constructed from this information. Recall that architectures are required to established the follow ...
Chapter3:MemoryManagement free_area_init_nodesfirst has to analyze and rewrite the information provided by the architecture- spe ...
Chapter3:MemoryManagement The intervals for the other zones are then constructed in a straightforward manner: Thesmallestpage fr ...
Chapter3:MemoryManagement If the node is equipped with memory as indicated by thenode_present_pagesfield, this is reflected in t ...
Chapter3:MemoryManagement Empty nodes with no pages can obviously be skipped. If the memory map has not already been set up by a ...
Chapter3:MemoryManagement /* Initialize zone fields to default values, * and call helper functions */ ... } The kernel uses two ...
Chapter3:MemoryManagement ❑ get_zeroed_page(mask)allocates a page and returns apageinstance but fills the page with zeros (with ...
Chapter3:MemoryManagement Interestingly, there is no__GFP_NORMALconstant, although the main burden of allocation falls on this z ...
Chapter3:MemoryManagement Setting__GFP_MOVABLEwill not influence the kernel’s decision unless it is specified together with__GFP ...
Chapter3:MemoryManagement Some of the constants shown are used only in rare situations, so I won’t discuss them. The meanings of ...
Chapter3:MemoryManagement <gfp.h> #define GFP_ATOMIC (__GFP_HIGH) #define GFP_NOIO (__GFP_WAIT) #define GFP_NOFS (__GFP_WA ...
Chapter3:MemoryManagement Theclear_pagestandard function that must be implemented by all architectures helpsalloc_pagesfill page ...
Chapter3:MemoryManagement The relationship betweenfree_pagesand__free_pagesis established by means of a function instead of a ma ...
Chapter3:MemoryManagement the currently executing CPU. Work is then delegated to__alloc_pagesto which an appropriate set of para ...
Chapter3:MemoryManagement if (free_pages <= min + z->lowmem_reserve[classzone_idx]) return 0; for (o = 0; o < order; o+ ...
Chapter3:MemoryManagement if ((alloc_flags & ALLOC_CPUSET) && !cpuset_zone_allowed_softwall(zone, gfp_mask)) continu ...
Chapter3:MemoryManagement all when too little memory is available to satisfy a request or when available memory is slowly runnin ...
Chapter3:MemoryManagement alloc_flags |= ALLOC_HIGH; if (wait) alloc_flags |= ALLOC_CPUSET; page = get_page_from_freelist(gfp_ma ...
Chapter3:MemoryManagement The search can come to an end here for two reasons: __GFP_NOMEMALLOCis set. This flag prohibits using ...
«
8
9
10
11
12
13
14
15
16
17
»
Free download pdf