* Finding lost memory + kernel messages explained
@ 2009-04-09 8:47 Imre Gergely
2009-04-09 10:31 ` Andi Kleen
2009-04-10 0:57 ` Robert Hancock
0 siblings, 2 replies; 4+ messages in thread
From: Imre Gergely @ 2009-04-09 8:47 UTC (permalink / raw)
To: linux-kernel
Hi
I've just upgraded my laptop RAM from 1x2GB to 2x2GB. The BIOS says
4096MB, memtest says 4031MB (I'm not sure why, but let's assume it's right).
After Linux boots, Ubuntu 8.10 x86_64, with
Linux gimre-laptop 2.6.27-11-generic #1 SMP Wed Apr 1 20:53:41 UTC 2009
x86_64 GNU/Linux
I look at /proc/meminfo, and I don't have 4031MB:
gimre@gimre-laptop:~$ cat /proc/meminfo
MemTotal: 3989844 kB
MemFree: 3157756 kB
That would be around 3896MB. My question is: where does the memory go?
Is it normal to 'lose' that much (~130MB) ?
Here's the dmesg output
http://pastebin.com/m4f7d089a
Also I would like to know more about those kernel messages, what do all
those numbers, and memory mappings and all that mean? Is there a
comprehensive manual / howto / wiki which explains all the messages in
more detail?
One thing I tried was appending iommu=off at boot, which gave me back
some 50MB, but there were still 80MB missing and the USB mouse didn't
work (among other things I'm sure).
Laptop is a HP Compaq 8510p.
Thanks.
--
Imre Gergely
Yahoo!: gergelyimre ICQ#: 101510959
MSN: gergely_imre GoogleTalk: gergelyimre
gpg --keyserver subkeys.pgp.net --recv-keys 0x34525305
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Finding lost memory + kernel messages explained
2009-04-09 8:47 Finding lost memory + kernel messages explained Imre Gergely
@ 2009-04-09 10:31 ` Andi Kleen
[not found] ` <49DDF2FF.9030501@narancs.net>
2009-04-10 0:57 ` Robert Hancock
1 sibling, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2009-04-09 10:31 UTC (permalink / raw)
To: Imre Gergely; +Cc: linux-kernel
Imre Gergely <gimre@narancs.net> 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
> One thing I tried was appending iommu=off at boot, which gave me back
That means if you have any devices that cannot addresses > 32bit they
will panic with that setting.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Finding lost memory + kernel messages explained
[not found] ` <49DDF2FF.9030501@narancs.net>
@ 2009-04-09 18:22 ` Andi Kleen
0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2009-04-09 18:22 UTC (permalink / raw)
To: Imre Gergely; +Cc: linux-kernel
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@narancs.net> 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@linux.intel.com -- Speaking for m1yself only.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Finding lost memory + kernel messages explained
2009-04-09 8:47 Finding lost memory + kernel messages explained Imre Gergely
2009-04-09 10:31 ` Andi Kleen
@ 2009-04-10 0:57 ` Robert Hancock
1 sibling, 0 replies; 4+ messages in thread
From: Robert Hancock @ 2009-04-10 0:57 UTC (permalink / raw)
To: Imre Gergely; +Cc: linux-kernel
Imre Gergely wrote:
>
> Hi
>
> I've just upgraded my laptop RAM from 1x2GB to 2x2GB. The BIOS says
> 4096MB, memtest says 4031MB (I'm not sure why, but let's assume it's
> right).
>
> After Linux boots, Ubuntu 8.10 x86_64, with
>
> Linux gimre-laptop 2.6.27-11-generic #1 SMP Wed Apr 1 20:53:41 UTC 2009
> x86_64 GNU/Linux
>
> I look at /proc/meminfo, and I don't have 4031MB:
>
> gimre@gimre-laptop:~$ cat /proc/meminfo
> MemTotal: 3989844 kB
> MemFree: 3157756 kB
Your BIOS e820 memory map has this for usable memory:
0000000000000000 - 000000000009fc00 = 639KB
0000000000100000 - 00000000bffb0000 = 3070.7MB
0000000100000000 - 000000013c000000 = 960MB
total that your BIOS exposes to the OS: 4031 MB
That leaves 131MB, likely about 64MB of that is used for the IOMMU
(which you need, since you presumably have devices that can't address
memory over the 4GB address), and the rest is likely various kernel data
structures (page tables, etc.)
>
> That would be around 3896MB. My question is: where does the memory go?
> Is it normal to 'lose' that much (~130MB) ?
>
> Here's the dmesg output
>
> http://pastebin.com/m4f7d089a
>
> Also I would like to know more about those kernel messages, what do all
> those numbers, and memory mappings and all that mean? Is there a
> comprehensive manual / howto / wiki which explains all the messages in
> more detail?
>
> One thing I tried was appending iommu=off at boot, which gave me back
> some 50MB, but there were still 80MB missing and the USB mouse didn't
> work (among other things I'm sure).
>
> Laptop is a HP Compaq 8510p.
>
> Thanks.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-10 0:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 8:47 Finding lost memory + kernel messages explained Imre Gergely
2009-04-09 10:31 ` Andi Kleen
[not found] ` <49DDF2FF.9030501@narancs.net>
2009-04-09 18:22 ` Andi Kleen
2009-04-10 0:57 ` Robert Hancock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox