linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Accounting for missing ( bootmem? ) memory
@ 2012-05-03 15:03 Phillip Susi
  0 siblings, 0 replies; only message in thread
From: Phillip Susi @ 2012-05-03 15:03 UTC (permalink / raw)
  To: linux-mm

I've been trying to track down why free always seems to report a little 
less total ram than it should, compared to the total usable areas in the 
e820 memory map.  I have been reading mm/bootmem.c and it seems that the 
low memory zone is managed by this allocator prior to mm_init(), and 
then free_all_bootmem() is called, which releases all free bootmem pages 
to mm to handle, and adds that space to totalram_pages.  That means that 
any bootmem that is still allocated is lost from the totalram_pages count.

I'm trying to figure out what is consuming this bootmem.  Based on 
comments in bootmem.c, the memory is initially marked as allocated, and 
setup_arch() has to explicitly free any that isn't reserved, presumably 
for things like the kernel itself, and the initrd, and any reserved 
areas in the e820 map, but I can not find where this is done.

So my questions are:

1)  Where is the bootmem initially freed ( so I can see what sections 
are *not* initially freed )

2)  Why is all of the bootmem not reserved in the e820 map not 
eventually freed and turned over to mm to manage?

3)  How can I see what is allocating and never freeing bootmem?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-03 15:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 15:03 Accounting for missing ( bootmem? ) memory Phillip Susi

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).