/* * Generic show_mem() implementation * * Copyright (C) 2008 Johannes Weiner <hannes@saeurebad.de> * All code subject to the GPL version 2. */ #include <linux/mm.h> #include <linux/quicklist.h> #include <linux/cma.h> void show_mem(unsigned int filter) { pg_data_t *pgdat; unsigned long total = 0, reserved = 0, highmem = 0; printk("Mem-Info:\n"); show_free_areas(filter); for_each_online_pgdat(pgdat) { unsigned long flags; int zoneid; pgdat_resize_lock(pgdat, &flags); for (zoneid = 0; zoneid < MAX_NR_ZONES; zoneid++) { struct zone *zone = &pgdat->node_zones[zoneid]; if (!populated_zone(zone)) continue; total += zone->present_pages; reserved += zone->present_pages - zone->managed_pages; if (is_highmem_idx(zoneid)) highmem += zone->present_pages; } pgdat_resize_unlock(pgdat, &flags); } printk("%lu pages RAM\n", total); printk("%lu pages HighMem/MovableOnly\n", highmem); printk("%lu pages reserved\n", reserved); #ifdef CONFIG_CMA printk("%lu pages cma reserved\n", totalcma_pages); #endif #ifdef CONFIG_QUICKLIST printk("%lu pages in pagetable cache\n", quicklist_total_size()); #endif #ifdef CONFIG_MEMORY_FAILURE printk("%lu pages hwpoisoned\n", atomic_long_read(&num_poisoned_pages)); #endif } n value='packet-rx-pump-back'>packet-rx-pump-back</option> </select> <input type='submit' value='switch'/></form></td></tr> <tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table> <table class='tabs'><tr><td> <a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=f4563a75fb93d6a756416d97e13f0773ac373a24'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/include/net/bluetooth/bluetooth.h'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/include/net/bluetooth/bluetooth.h?id=f4563a75fb93d6a756416d97e13f0773ac373a24'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/include/net/bluetooth/bluetooth.h?id=f4563a75fb93d6a756416d97e13f0773ac373a24'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/include/net/bluetooth/bluetooth.h?id=f4563a75fb93d6a756416d97e13f0773ac373a24'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/include/net/bluetooth/bluetooth.h'> <input type='hidden' name='id' value='f4563a75fb93d6a756416d97e13f0773ac373a24'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=f4563a75fb93d6a756416d97e13f0773ac373a24'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/include?id=f4563a75fb93d6a756416d97e13f0773ac373a24'>include</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/net?id=f4563a75fb93d6a756416d97e13f0773ac373a24'>net</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/net/bluetooth?id=f4563a75fb93d6a756416d97e13f0773ac373a24'>bluetooth</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/net/bluetooth/bluetooth.h?id=f4563a75fb93d6a756416d97e13f0773ac373a24'>bluetooth.h</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/include/net/bluetooth/bluetooth.h?id=f4563a75fb93d6a756416d97e13f0773ac373a24&showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>