memory beyond4GB invisible to the system even though CONFIG_HIGHMEM64G=y
Hello,
I am running kernel 2.6.28 on a computer with 8GB RAM. The BIOS detects all 8GB, yet
jk@as12:~$ free
total used free shared buffers cached
Mem: 3622504 799696 2822808 0 90936 369604
-/+ buffers/cache: 339156 3283348
Swap: 6867776 0 6867776I compiled the kernel with the CONFIG_HIGHMEM64G=y and CONFIG_RESOURCES_64BIT=y options.
I have attached the kernel config, dmesg output and /proc/cpuinfo.
How can I use all the memory on this computer?
Thank you in advance for any help,
JamesK
Quoted 8 lines
I am running kernel 2.6.28 on a computer with 8GB RAM. The BIOS detects all 8GB, yet
jk@as12:~$ free total used free shared buffers cached Mem: 3622504 799696 2822808 0 90936 369604 -/+ buffers/cache: 339156 3283348 Swap: 6867776 0 6867776
The message in your kernel log:
[ 0.000000] WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 4096MB of RAM. [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: at arch/x86/kernel/cpu/mtrr/main.c:1662 mtrr_trim_uncached_memory+0x283/0x2a4()
is a clue. You might want to look for a BIOS update for your motherboard.
- R.
Thank you for your reply, Roland. Unfortunately, this continues happening after having installed the most recent version of the BIOS available from Dell.
I understand this is a problem in the BIOS and not the kernel, but is there a way to have the kernel work around this bug in the BIOS and make that memory accessible? Eg,
http://www.gossamer-threads.com/lists/linux/kernel/991748#991748
The difference seems to be that the BIOS on this machine I am using does list 8GB memory available.
Thanks for any help,
James
Quoted 20 lines · Roland Dreier
Quoted 8 lines
I am running kernel 2.6.28 on a computer with 8GB RAM. The BIOS detects all 8GB, yet
jk@as12:~$ free total used free shared buffers cached Mem: 3622504 799696 2822808 0 90936 369604 -/+ buffers/cache: 339156 3283348 Swap: 6867776 0 6867776The message in your kernel log:
[ 0.000000] WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 4096MB of RAM. [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: at arch/x86/kernel/cpu/mtrr/main.c:1662 mtrr_trim_uncached_memory+0x283/0x2a4()is a clue. You might want to look for a BIOS update for your motherboard.
- R.
Quoted 9 lines · James Kirin
Thank you for your reply, Roland. Unfortunately, this continues happening after having installed the most recent version of the BIOS available from Dell.
I understand this is a problem in the BIOS and not the kernel, but is there a way to have the kernel work around this bug in the BIOS and make that memory accessible? Eg,
http://www.gossamer-threads.com/lists/linux/kernel/991748#991748
please do
1. boot linux with "disable_mtrr_trim" in grub.conf etc
2. after booting input:
echo "base=0x100000000 size=0x20000000 type=write-back" >/proc/mtrr
later you could put that line in one scripts and call it from inittab
# grep mtrrfixup /etc/inittab mtrr:345:once:/root/mtrrfixup.sh
YH
Quoted 4 lines
please do
1. boot linux with "disable_mtrr_trim" in grub.conf etc
2. after booting input:
echo "base=0x100000000 size=0x20000000 type=write-back" >/proc/mtrr
Is there any way we can have the kernel do this automatically if there are any free mtrr slots? I would guess this type of BIOS bug is pretty common (desktop boards not validated with > 4GB of RAM), and having the kernel throw away 4GB of memory unless the user does some fancy scripting is not very friendly (not to mention the fact that things are likely to be very slow until the mtrr fixup script runs).
- R.
Quoted 11 lines · Roland Dreier
Quoted 4 lines
please do
1. boot linux with "disable_mtrr_trim" in grub.conf etc
2. after booting input:
echo "base=0x100000000 size=0x20000000 type=write-back" >/proc/mtrrIs there any way we can have the kernel do this automatically if there are any free mtrr slots? I would guess this type of BIOS bug is pretty common (desktop boards not validated with > 4GB of RAM), and having the kernel throw away 4GB of memory unless the user does some fancy scripting is not very friendly (not to mention the fact that things are likely to be very slow until the mtrr fixup script runs).
could do it. aka make mtrr and e820 consistent.
it depends which one that we trust mtrr or e820.
YH
Hi Yinghai,
Quoted 4 lines
please do
1. boot linux with "disable_mtrr_trim" in grub.conf etc
2. after booting input:
echo "base=0x100000000 size=0x20000000 type=write-back" >/proc/mtrr
Thank you for your suggestion.
Unfortunately, booting with disable_mtrr_trim leads to a kernel panic:
[<c0103abb>] kernel_thread_helper+0x7/0x1c =========== Code: 0c 31 d2 89 e8 e8 c2 f4 ff ff 89 c3 eb 8e 8b 85 cc 00 00 00 89 44 24 10 83 bd ec 00 01 00 04 0f 84 cf 00 00 00 8b 9d f0 00 01 00 <8b> 43 10 3b 43 0c 0f 84 d5 00 00 00 8b 53 10 8b 85 ec 00 01 00 EIP: [<c026bc2f] hid_parser_main+0xcf/0x290 SS:ESP 0068:f7c2bd7c ---[ end trace 34615b445589fbb6 ]--- Kernel panic - not syncing: Attempted to kill init!
I am attaching the kernel config file. The system boots fine if I remove "disable_mtrr_trim" from lilo.conf (and rerun lilo).
Thank you for any help,
James
I tried disabing CONFIG_MTRR_SANITIZER and CONFIG_X86_PAT in the kernel, and now a different kernel panic occurs:
[... ] Write protecting the kernel text: 3040k
[...] Write protecting the kernel read-only data: 1352k [... ] khelper used greatest stack depth: 6724 bytes left [ ...] Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Is an "init=" option necessary when using disable_mtrr_trim?
Thanks in advance,
James
Quoted 27 lines · James Kirin
Hi Yinghai,
Quoted 4 lines
please do
1. boot linux with "disable_mtrr_trim" in grub.conf etc
2. after booting input:
echo "base=0x100000000 size=0x20000000 type=write-back" >/proc/mtrrThank you for your suggestion.
Unfortunately, booting with
disable_mtrr_trimleads to a kernel panic:[<c0103abb>] kernel_thread_helper+0x7/0x1c =========== Code: 0c 31 d2 89 e8 e8 c2 f4 ff ff 89 c3 eb 8e 8b 85 cc 00 00 00 89 44 24 10 83 bd ec 00 01 00 04 0f 84 cf 00 00 00 8b 9d f0 00 01 00 <8b> 43 10 3b 43 0c 0f 84 d5 00 00 00 8b 53 10 8b 85 ec 00 01 00 EIP: [<c026bc2f] hid_parser_main+0xcf/0x290 SS:ESP 0068:f7c2bd7c ---[ end trace 34615b445589fbb6 ]--- Kernel panic - not syncing: Attempted to kill init!I am attaching the kernel config file. The system boots fine if I remove "
disable_mtrr_trim" from lilo.conf (and rerun lilo).Thank you for any help,
James
Quoted 10 lines · James Kirin
I tried disabing
CONFIG_MTRR_SANITIZERandCONFIG_X86_PATin the kernel, and now a different kernel panic occurs:[... ] Write protecting the kernel text: 3040k
[...] Write protecting the kernel read-only data: 1352k [... ] khelper used greatest stack depth: 6724 bytes left [ ...] Kernel panic - not syncing: No init found. Try passing init= option to kernel.Is an "init=" option necessary when using
disable_mtrr_trim?
that is not related...
YH
Quoted 20 lines · James Kirin
Hi Yinghai,
Quoted 4 lines
please do
1. boot linux with "disable_mtrr_trim" in grub.conf etc
2. after booting input:
echo "base=0x100000000 size=0x20000000 type=write-back" >/proc/mtrrThank you for your suggestion.
Unfortunately, booting with
disable_mtrr_trimleads to a kernel panic:[<c0103abb>] kernel_thread_helper+0x7/0x1c =========== Code: 0c 31 d2 89 e8 e8 c2 f4 ff ff 89 c3 eb 8e 8b 85 cc 00 00 00 89 44 24 10 83 bd ec 00 01 00 04 0f 84 cf 00 00 00 8b 9d f0 00 01 00 <8b> 43 10 3b 43 0c 0f 84 d5 00 00 00 8b 53 10 8b 85 ec 00 01 00 EIP: [<c026bc2f] hid_parser_main+0xcf/0x290 SS:ESP 0068:f7c2bd7c ---[ end trace 34615b445589fbb6 ]--- Kernel panic - not syncing: Attempted to kill init!
Quoted 3 lines
I am attaching the kernel config file. The system boots fine if I remove "
disable_mtrr_trim" from lilo.conf (and rerun lilo).
can you try mem=4g , .., and then mem=6g ...
YH