kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Question about page count
@ 2011-06-20 13:10 Jui-Hao Chiang
  2011-06-21  1:46 ` Wick
  2011-06-21  5:15 ` Mulyadi Santosa
  0 siblings, 2 replies; 6+ messages in thread
From: Jui-Hao Chiang @ 2011-06-20 13:10 UTC (permalink / raw)
  To: kernelnewbies

Hi,

I am currently analyzing the memory pages footprint in 2.6.18.8 kernel (1GB ram,
32-bit, Flat model, no NUMA), and got a question. Does page_count(page)==0
really means the page is free because the source code says so?

If I just traverse mem_map for all memory descriptor, and count how many of them
has page_count 0, then the number of free page will exceed the MemFree number
reported from /proc/meminfo (actually from the zone list).

After some investigation, I figure out that page->flags actually encode the zone
information (DMA, NORMAL, HIGHMEM), and some of the page descriptors do not have
correct zone number. But filtering them out doesn't help.

In my case, HIGHMEM has 61 free pages reported by /proc/meminfo, but when I
traverse the page descriptors array from (896MB - 1024MB), I count the
pages with
(1) flags stating its zone == ZONE_HIGHMEM
(2) page_count(page)==0
My result is 186 but not 61.

Could anyone help on explaining this?

Thanks,
Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-06-21 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-20 13:10 Question about page count Jui-Hao Chiang
2011-06-21  1:46 ` Wick
2011-06-21  5:15 ` Mulyadi Santosa
2011-06-21 13:23   ` Dave Hylands
2011-06-21 16:34     ` Mulyadi Santosa
2011-06-21 14:25   ` Jui-Hao Chiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).