看来我的笔记本电脑(Acer Aspire One AOA150)在启动时耗尽了 MTRR。我在 Google 上搜索了这个问题,并看到有人建议打开 MTRR 清理来解决这个问题,但是,这种情况仍然会发生。我正在运行 Arch Linux(但这应该没关系)。您可以在此处看到我已启用 MTRR 清理:
[chris@helios ~]$ zgrep 'SANITIZER' /proc/config.gz
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
这是我的相关系统信息:
uname -a:
Linux helios 2.6.38-aao-light #1 SMP PREEMPT Fri Apr 1 03:02:37 BST 2011 i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz GenuineIntel GNU/Linux
dmesg 潜在警告:
[ 0.000000] Notice: NX (Execute Disable) protection missing in CPU!
[ 0.000000] RCU-based detection of stalled CPUs is disabled.
[ 0.000000] Verbose stalled-CPUs detection is disabled.
[ 0.157222] ACPI Error: [CAPB] Namespace lookup failure, AE_ALREADY_EXISTS (20110112/dsfield-143)
[ 0.157393] ACPI Error: Method parse/execution failed [\_SB_.PCI0._OSC] (Node f682fca8), AE_ALREADY_EXISTS (20110112/psparse-536)
[ 0.157578] ACPI: Marking method _OSC as Serialized because of AE_ALREADY_EXISTS error
[ 0.160212] pci 0000:00:1b.0: PME# disabled
[ 0.160354] pci 0000:00:1c.0: PME# disabled
[ 0.160498] pci 0000:00:1c.1: PME# disabled
[ 0.160642] pci 0000:00:1c.2: PME# disabled
[ 0.160787] pci 0000:00:1c.3: PME# disabled
[ 0.161441] pci 0000:00:1d.7: PME# disabled
[ 0.162043] pci 0000:00:1f.2: PME# disabled
[ 0.162677] pci 0000:02:00.0: PME# disabled
[ 0.166197] pci 0000:00:1e.0: bridge window [io 0xf000-0x0000] (disabled)
[ 0.166207] pci 0000:00:1e.0: bridge window [mem 0xfff00000-0x000fffff] (disabled)
[ 0.166219] pci 0000:00:1e.0: bridge window [mem 0xfff00000-0x000fffff pref] (disabled)
[ 0.167559] ACPI Error: [CAPB] Namespace lookup failure, AE_ALREADY_EXISTS (20110112/dsfield-143)
[ 0.167729] ACPI Error: Method parse/execution failed [\_SB_.PCI0._OSC] (Node f682fca8), AE_ALREADY_EXISTS (20110112/psparse-536)
[ 0.168113] ACPI Error: [CAPB] Namespace lookup failure, AE_ALREADY_EXISTS (20110112/dsfield-143)
[ 0.168279] ACPI Error: Method parse/execution failed [\_SB_.PCI0._OSC] (Node f682fca8), AE_ALREADY_EXISTS (20110112/psparse-536)
[ 0.178246] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 7 9 10 11 12) *0, disabled.
[ 0.178612] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 7 9 10 11 12) *0, disabled.
[ 0.179008] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 7 9 10 11 12) *0, disabled.
[ 0.179375] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 7 9 10 11 12) *0, disabled.
[ 0.190814] pnp 00:04: [irq 0 disabled]
[ 0.235056] pci 0000:00:1e.0: bridge window [io disabled]
[ 0.235135] pci 0000:00:1e.0: bridge window [mem disabled]
[ 0.235212] pci 0000:00:1e.0: bridge window [mem pref disabled]
[ 0.254489] Marking TSC unstable due to TSC halts in idle states deeper than C2
[ 0.332589] [drm] MTRR allocation failed. Graphics performance may suffer.
zgrep -i MTRR /proc/config.gz
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=2
/proc/iomem:
00000000-0000ffff : reserved
00010000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : PCI Bus 0000:00
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000cf000-000cffff : Adapter ROM
000e0000-000fffff : reserved
000f0000-000fffff : System ROM
00100000-3f375fff : System RAM
01000000-0148cffe : Kernel code
0148cfff-015e417f : Kernel data
01646000-016b2fff : Kernel bss
3f376000-3f3befff : reserved
3f3bf000-3f46cfff : System RAM
3f46d000-3f4befff : ACPI Non-volatile Storage
3f4bf000-3f4effff : System RAM
3f4f0000-3f4fefff : ACPI Tables
3f4ff000-3f4fffff : System RAM
3f500000-3fffffff : reserved
40000000-febfffff : PCI Bus 0000:00
40000000-4fffffff : 0000:00:02.0
50000000-50ffffff : PCI Bus 0000:01
51000000-520fffff : PCI Bus 0000:02
51000000-5100ffff : 0000:02:00.0
51000000-5100ffff : r8169
51010000-51010fff : 0000:02:00.0
51010000-51010fff : r8169
51020000-5103ffff : 0000:02:00.0
52100000-530fffff : PCI Bus 0000:03
53100000-540fffff : PCI Bus 0000:04
54100000-551fffff : PCI Bus 0000:04
55200000-562fffff : PCI Bus 0000:03
55200000-5520ffff : 0000:03:00.0
55200000-5520ffff : ath5k
56300000-572fffff : PCI Bus 0000:02
57300000-583fffff : PCI Bus 0000:01
58400000-5847ffff : 0000:00:02.1
58480000-584fffff : 0000:00:02.0
58500000-5853ffff : 0000:00:02.0
58540000-58543fff : 0000:00:1b.0
58540000-58543fff : ICH HD audio
58544400-585447ff : 0000:00:1d.7
58544400-585447ff : ehci_hcd
58545000-58545fff : Intel Flush Page
e0000000-efffffff : PCI MMCONFIG 0000 [bus 00-ff]
e0000000-efffffff : reserved
e0000000-efffffff : pnp 00:01
fec00000-fec00fff : reserved
fec00000-fec003ff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed14000-fed19fff : reserved
fed14000-fed17fff : pnp 00:01
fed18000-fed18fff : pnp 00:01
fed19000-fed19fff : pnp 00:01
fed1c000-fed1ffff : reserved
fed1c000-fed1ffff : pnp 00:01
fee00000-fee00fff : Local APIC
fee00000-fee00fff : reserved
fee00000-fee00fff : pnp 00:01
fff00000-ffffffff : reserved
/proc/cpu信息:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU N270 @ 1.60GHz
stepping : 2
cpu MHz : 1600.000
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm dts
bogomips : 3192.06
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU N270 @ 1.60GHz
stepping : 2
cpu MHz : 1600.000
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm dts
bogomips : 3191.83
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
power management:
/proc/mtrr:
reg00: base=0x0fffe0000 ( 4095MB), size= 128KB, count=1: write-protect
reg01: base=0x0fffc0000 ( 4095MB), size= 128KB, count=1: uncachable
reg02: base=0x000000000 ( 0MB), size= 512MB, count=1: write-back
reg03: base=0x020000000 ( 512MB), size= 512MB, count=1: write-back
reg04: base=0x03f800000 ( 1016MB), size= 8MB, count=1: uncachable
reg05: base=0x03f600000 ( 1014MB), size= 2MB, count=1: uncachable
reg06: base=0x03f500000 ( 1013MB), size= 1MB, count=1: uncachable
reg07: base=0x000000000 ( 0MB), size= 128KB, count=1: uncachable
左手边:
helios
description: Computer
product: AOA150 (Napa_Fab5)
vendor: Acer
version: 1
serial: LUS050A0748370F93B2535
width: 32 bits
capabilities: smbios-2.4 dmi-2.4
configuration: boot=normal family=Intel_Mobile sku=Napa_Fab5 uuid=E081A8C2-6CE0-D411-BB0B-001E68E42BCA
*-core
description: Motherboard
vendor: Acer
physical id: 0
version: Base Board Version
serial: Base Board Serial Number
slot: Base Board Chassis Location
*-firmware
description: BIOS
vendor: Acer
physical id: 0
version: v0.3301
date: 05/09/2008
size: 1MiB
capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb
*-memory
description: System Memory
physical id: 14
slot: System board or motherboard
size: 1GiB
*-bank:0
description: DIMM DDR2 Synchronous 533 MHz (1.9 ns)
product: HYMP164S64CP6-Y5
vendor: Hynix Semiconductor (Hyundai Electronics)
physical id: 0
serial: 0x00000000
slot: J2
size: 512MiB
width: 64 bits
clock: 533MHz (1.9ns)
*-bank:1
description: DIMM DDR2 Synchronous 533 MHz (1.9 ns)
product: HYMP164S64CP6-Y5
vendor: Hynix Semiconductor (Hyundai Electronics)
physical id: 1
serial: 0x00002337
slot: J6H2
size: 512MiB
width: 64 bits
clock: 533MHz (1.9ns)
*-cpu
description: CPU
product: Intel(R) Atom(TM) CPU N270 @ 1.60GHz
vendor: Intel Corp.
physical id: 1c
bus info: cpu@0
version: 6.12.2
serial: 0001-06C2-0000-0000-0000-0000
slot: CPU
size: 800MHz
capacity: 1600MHz
width: 32 bits
clock: 533MHz
capabilities: fpu fpu_exception wp vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm cpufreq
configuration: id=0
*-cache:0
description: L2 cache
physical id: 1d
slot: Unknown
size: 512KiB
capacity: 512KiB
capabilities: synchronous internal write-back unified
*-cache:1
description: L1 cache
physical id: 1e
slot: Unknown
size: 32KiB
capacity: 32KiB
capabilities: synchronous internal write-back instruction
*-logicalcpu:0
description: Logical CPU
physical id: 0.1
width: 32 bits
capabilities: logical
*-logicalcpu:1
description: Logical CPU
physical id: 0.2
width: 32 bits
capabilities: logical
*-pci
description: Host bridge
product: Mobile 945GME Express Memory Controller Hub
vendor: Intel Corporation
physical id: 100
bus info: pci@0000:00:00.0
version: 03
width: 32 bits
clock: 33MHz
configuration: driver=agpgart-intel
resources: irq:0
*-display:0
description: VGA compatible controller
product: Mobile 945GME Express Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 03
width: 32 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:16 memory:58480000-584fffff ioport:60c0(size=8) memory:40000000-4fffffff memory:58500000-5853ffff
*-display:1 UNCLAIMED
description: Display controller
product: Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2.1
bus info: pci@0000:00:02.1
version: 03
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list
configuration: latency=0
resources: memory:58400000-5847ffff
*-multimedia
description: Audio device
product: N10/ICH 7 Family High Definition Audio Controller
vendor: Intel Corporation
physical id: 1b
bus info: pci@0000:00:1b.0
version: 02
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=HDA Intel latency=0
resources: irq:45 memory:58540000-58543fff
*-pci:0
description: PCI bridge
product: N10/ICH 7 Family PCI Express Port 1
vendor: Intel Corporation
physical id: 1c
bus info: pci@0000:00:1c.0
version: 02
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:40 ioport:5000(size=4096) memory:57300000-583fffff ioport:50000000(size=16777216)
*-pci:1
description: PCI bridge
product: N10/ICH 7 Family PCI Express Port 2
vendor: Intel Corporation
physical id: 1c.1
bus info: pci@0000:00:1c.1
version: 02
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:41 ioport:3000(size=8192) memory:56300000-572fffff ioport:51000000(size=17825792)
*-network DISABLED
description: Ethernet interface
product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 02
serial: 00:1e:68:e4:2b:ca
size: 10Mbit/s
capacity: 100Mbit/s
width: 64 bits
clock: 33MHz
答案1
感谢 harrymc,我发现你实际上可以重写 /proc/mtrr。我将以下内容放入 /etc/rc.local,重新启动后,我的 MTRR 表就正确了。
echo "disable=7" > /proc/mtrr
echo "disable=6" > /proc/mtrr
echo "disable=5" > /proc/mtrr
echo "disable=4" > /proc/mtrr
echo "disable=3" > /proc/mtrr
echo "disable=2" > /proc/mtrr
echo "disable=1" > /proc/mtrr
echo "disable=0" > /proc/mtrr
echo "base=0x000000000 size=0x40000000 type=write-back" > /proc/mtrr
echo "base=0x03f500000 size=0x00100000 type=uncachable" > /proc/mtrr
echo "base=0x03f600000 size=0x00200000 type=uncachable" > /proc/mtrr
echo "base=0x03f800000 size=0x00800000 type=write-back" > /proc/mtrr
echo "base=0x040000000 size=0x10000000 type=write-combining" > /proc/mtrr
此外,在与一些参与内核开发的人员交谈后,我获悉,这个问题CONFIG_MTRR_SANITIZER
在过去的几个内核中已经得到解决,这就是为什么它在过去对其他人有效的原因。
答案2
引用你自己的答案问题在 Arch Linux 论坛上:
从 dmesg 中很容易看出,在 i915/drm 图形初始化期间,mtrr 用完了。我没有遇到过这个问题,但我的建议如下:
- 使用 ' 启动mtrr_spare_reg_nr=2' 你可能还需要 '启用_mtrr_清理=1(添加到/boot/grub/menu.lst 中的内核行)。
- 尝试[测试]中的内核 2.6.38。
从 /proc/mtrr 来看,你的 ATOM CPU 只有 8 个 MTRR,而且它们确实全部用完了。但是,内存被分割成如此小的碎片的方式令人费解。一般来说,这样的问题可能是由以下原因引起的:
- BIOS——查找导致设备内存分配的参数。
- 显卡可能与 CPU 共享内存,而 BIOS 可能会导致显卡在内存中间被粗暴地分配。
- 显卡驱动程序——搜索最新版本。
- 内核配置错误。
我所能想到的最大难题是 /proc/mtrr 表示您有 8GB。但在 /proc/cpuinfo 中,“flags”条目不包含“lm”,这是Arch64 常见问题解答表示处理器必须兼容 x86_64。常见问题解答进一步指出:
请注意,Arch32 默认不支持超过 3GB 的 RAM:如果您有更多 RAM,则必须转向 Arch64。
因此,您似乎拥有 Arch32 和 8GB RAM,但文档却与之相矛盾。
您能否解答一下这个难题?