Source
11
11
12
12
void show_mem(unsigned int filter, nodemask_t *nodemask)
13
13
{
14
14
pg_data_t *pgdat;
15
15
unsigned long total = 0, reserved = 0, highmem = 0;
16
16
17
17
printk("Mem-Info:\n");
18
18
show_free_areas(filter, nodemask);
19
19
20
20
for_each_online_pgdat(pgdat) {
21
-
unsigned long flags;
22
21
int zoneid;
23
22
24
-
pgdat_resize_lock(pgdat, &flags);
25
23
for (zoneid = 0; zoneid < MAX_NR_ZONES; zoneid++) {
26
24
struct zone *zone = &pgdat->node_zones[zoneid];
27
25
if (!populated_zone(zone))
28
26
continue;
29
27
30
28
total += zone->present_pages;
31
29
reserved += zone->present_pages - zone_managed_pages(zone);
32
30
33
31
if (is_highmem_idx(zoneid))
34
32
highmem += zone->present_pages;
35
33
}
36
-
pgdat_resize_unlock(pgdat, &flags);
37
34
}
38
35
39
36
printk("%lu pages RAM\n", total);
40
37
printk("%lu pages HighMem/MovableOnly\n", highmem);
41
38
printk("%lu pages reserved\n", reserved);
42
39
#ifdef CONFIG_CMA
43
40
printk("%lu pages cma reserved\n", totalcma_pages);
44
41
#endif
45
42
#ifdef CONFIG_QUICKLIST
46
43
printk("%lu pages in pagetable cache\n",