Re: Finding lost memory + kernel messages explained

From: Andi Kleen
Date: Thu Apr 09 2009 - 14:19:52 EST


cc to mailing list restored. please don't drop this.

On Thu, Apr 09, 2009 at 04:07:11PM +0300, Imre Gergely wrote:
> Andi Kleen wrote:
> >Imre Gergely <gimre@xxxxxxxxxxx> writes:
> >>That would be around 3896MB. My question is: where does the memory go?
> >>Is it normal to 'lose' that much (~130MB) ?
> >
> >I wrote a paper about this topic some time ago.
> >
> >http://halobates.de/memory.pdf
> >http://halobates.de/memorywaste.pdf
>
> I tried to understand what you wrote there a bit, but it's still pretty
> confusing ;)

Modern hardware is complicated.

> [ 0.004000] Memory: 3980848k/5177344k available (3115k kernel code,
> 147212k reserved, 1573k data, 540k init)
>
> There seems to be 5GB of memory, I don't understand where this is coming
> from. There is a gap in the mapping

PCs have memory holes below 1MB and below 4GB. The 4GB hole can be
rather large because it contains IO mappings for all devices.

(lines 16 and 17 in dmesg output on
> the pastebin), but why? And what's that 147212k reserved?

The paper explains all this.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for m1yself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/