Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
64bit-System, still only 3225MB RAM !?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
k_klunz
n00b
n00b


Joined: 03 Dec 2004
Posts: 36
Location: Kaiserslautern, Rheinland-Pfalz, Germany, Europe

PostPosted: Sun Feb 08, 2015 8:14 pm    Post subject: 64bit-System, still only 3225MB RAM !? Reply with quote

Hello everyone,

I have been using Gentoo for the last >2 years on a Lenovo Edge E330 with a Core I3-3110M and 4GB RAM (the BIOS confirms this).
Yesterday I started using htop instead of top, and it told me that I have only 3225 MB of total memory.
This was then confirmed by:
Code:

[tobi@localhost:~]$ cat /proc/meminfo
MemTotal:        3303068 kB
MemFree:          413932 kB
MemAvailable:    1004536 kB
Buffers:          228564 kB


My first guess was, that the graphic card is using the rest, but
Code:
[root@localhost:/home/tobi]# lspci -v -s 00:02.0
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device 5006
   Flags: bus master, fast devsel, latency 0, IRQ 24
   Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
   Memory at e0000000 (64-bit, prefetchable) [size=256M]
   I/O ports at 4000 [size=64]
   Expansion ROM at <unassigned> [disabled]
   Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
   Capabilities: [d0] Power Management version 2
   Capabilities: [a4] PCI Advanced Features
   Kernel driver in use: i915

tells me it uses only 256 MB, so there is still roughly half a GB missing.

My next (now slightly desperate guess) was, that I might have inadvertetly migrated from a 64bit to a 32bit system, but that doesnt (thank god, no idea how that could have happened) seem to be the case either:
Code:

[tobi@localhost:src/linux]$ cat /usr/src/linux/.config | grep 64
CONFIG_64BIT=y
CONFIG_X86_64=y


Code:
[tobi@localhost:~]$ gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.3/cc1 -E -quiet -v - -march=core-avx-i -mcx16 -msahf -mno-movbe -mno-aes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core-avx-i -fstack-protector


At this point I am really running out of ideas. I checked the whole "Processor Family" section of my kernel config and looked at some of the options there, but I could not find anything that might cause this. Is it even possible to limit the usable amount of memory in a 64bit-Kernel? Am I missing something else here concerning my hardware or the kernel config? Am I just fooling myself by looking in the wrong places or using the wrong tools?

Any help is greatly appreciated, thank you very much in advance. Many Greetings
Tobi
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Sun Feb 08, 2015 9:07 pm    Post subject: Reply with quote

k_klunz wrote:
Code:
    Memory at e0000000 (64-bit, prefetchable) [size=256M]

tells me it uses only 256 MB, so there is still roughly half a GB missing.
That is just the PCI BAR, not the actual amount of memory which your graphics uses.

Look at dmesg's e820: BIOS-provided physical RAM map to see what is your memory layout. Some BIOSes will not remap the memory between 3-4 GB, so anything overlapping with PCI address space will become unusable.
Back to top
View user's profile Send private message
k_klunz
n00b
n00b


Joined: 03 Dec 2004
Posts: 36
Location: Kaiserslautern, Rheinland-Pfalz, Germany, Europe

PostPosted: Sun Feb 08, 2015 9:36 pm    Post subject: Reply with quote

Hey,

thank you very much for your help.
Code:

[root@localhost:src/linux]# dmesg | grep e820
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000008ffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000000090000-0x00000000000bffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000020000000-0x00000000201fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000020200000-0x0000000040003fff] usable
[    0.000000] BIOS-e820: [mem 0x0000000040004000-0x0000000040004fff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000040005000-0x00000000a40e9fff] usable
[    0.000000] BIOS-e820: [mem 0x00000000a40ea000-0x00000000a42ebfff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000a42ec000-0x00000000b420efff] usable
[    0.000000] BIOS-e820: [mem 0x00000000b420f000-0x00000000dae5efff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000dae5f000-0x00000000daf7efff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000daf7f000-0x00000000daffefff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000dafff000-0x00000000daffffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000db000000-0x00000000df9fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000f80f8000-0x00000000f80f8fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000011e5fffff] usable
[    0.000000] e820: update [mem 0xa4ac2018-0xa4ad2057] usable ==> usable
[    0.000000] e820: update [mem 0xa4ab5018-0xa4ac1857] usable ==> usable
[    0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000000] e820: last_pfn = 0x11e600 max_arch_pfn = 0x400000000
[    0.000000] e820: last_pfn = 0xdb000 max_arch_pfn = 0x400000000
[    0.000000] e820: [mem 0xdfa00000-0xf80f7fff] available for PCI devices
[    0.639796] e820: reserve RAM buffer [mem 0x40004000-0x43ffffff]
[    0.639797] e820: reserve RAM buffer [mem 0xa40ea000-0xa7ffffff]
[    0.639799] e820: reserve RAM buffer [mem 0xa4ab5018-0xa7ffffff]
[    0.639800] e820: reserve RAM buffer [mem 0xa4ac2018-0xa7ffffff]
[    0.639801] e820: reserve RAM buffer [mem 0xb420f000-0xb7ffffff]
[    0.639802] e820: reserve RAM buffer [mem 0xdb000000-0xdbffffff]
[    0.639803] e820: reserve RAM buffer [mem 0x11e600000-0x11fffffff]


It seems that everything from 0xDB000000 (3 674 210 304) to 0xFED1FFFF (4 275 175 423) is reserved, which seems to be the cause of the problem...
Is this because that address range is used for PCI addresses? Wow, why to use the 64bit addressing capabilities...
Did I understand this correctly?

So, am I right in assuming that all I can do right now is a BIOS update?

Thanks very much again, Greetings
Tobi
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Sun Feb 08, 2015 11:51 pm    Post subject: Reply with quote

Code:
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000011e5fffff] usable
This means that your BIOS has already remapped around 500MB to above 4 GB.

However the reserved area begins already at 0xb420f000 (3022057471 in decimal). Maybe there is an option in your BIOS to control memory remapping.
Back to top
View user's profile Send private message
k_klunz
n00b
n00b


Joined: 03 Dec 2004
Posts: 36
Location: Kaiserslautern, Rheinland-Pfalz, Germany, Europe

PostPosted: Mon Feb 09, 2015 8:43 pm    Post subject: Reply with quote

Today I updated to the newest version of my bios, still the same behaviour.
There is no such thing as a remapping option in Bios. The Memtest utility available at boot even tells me that only 3175MB of the total 4GB memory are available.
After stumbling upon this thread during further research, this seems to be by design, a rather large portion of the memory is just reserved for "Memory Mapped I/O reservations".

Seems to be another thing that you just need to look out for when buying new hardware, this really sucks imho.

Thanks again for your help, seems like there is just nothing one can do...

Greetings
Tobi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum