Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Memory usage; 32 bit vs 64 bit.
Date: Fri, 07 Jan 2011 06:06:26
Message-Id: pan.2011.01.07.05.59.01@cox.net
In Reply to: Re: [gentoo-amd64] Re: Memory usage; 32 bit vs 64 bit. by Volker Armin Hemmann
1 Volker Armin Hemmann posted on Fri, 07 Jan 2011 00:42:01 +0100 as
2 excerpted:
3
4 > On Thursday 06 January 2011 23:32:01 Enrico Weigelt wrote:
5 >> * Volker Armin Hemmann <volkerarmin@××××××××××.com> wrote:
6 >> > > Apropos total memory: on my box w/ 4GB, it only shows up 3GB.
7 >> > >
8 >> > > On bootup, kernel (built w/ CONFIG_HIGHMEM4G=y) says:
9 >> > > 2119MB HIGHMEM available. 887MB LOWMEM available.
10
11 Just so we're clear here, CONFIG_HIGHMEM4G only applies to 32-bit, as does
12 low and high memory since 64-bit is flat memory addressing up into the
13 PiBytes (IIRC). You don't say whether the box is running amd64 (64-bit)
14 or x86 (32-bit) (and for that matter, you don't say Gentoo either), but
15 the assumption on this list would be Gentoo/amd64, so 64-bit.
16
17 But you're obviously running x86 32-bit on that box. Again, just to make
18 it clear as you didn't.
19
20 >> > > Who's eating up a whole GB ? BIOS ? GPU ?
21 >> >
22 >> > bios
23 >>
24 >> BIOS really eats it all up, or maybe some misconfiguration that causes
25 >> memory hidden from the OS ?
26 >
27 > the misconfiguration is done by the bios, mapping pcispace&co into the
28 > 3-4gb range
29
30 Even in 64-bit machines, many legacy 32-bit-only PCI devices can't handle
31 IO-address-space configured above the 4-gig 32-bit memory barrier. As a
32 result, there's a "memory hole", usually half a gig to a gig in size, just
33 below the 4-gig barrier, that's address space reserved for 32-bit-PCI-IO.
34 Of course it's only relatively recently that people began having memory of
35 several gigs and thus running into the problem, but what happens when
36 someone has > 3 gigs RAM in a machine is that unless the BIOS is equipped
37 with memory remapping functionality to map the real memory behind that PCI-
38 reserved area up above the 4 GB barrier, that IO-region covers the real
39 memory, which then cannot be accessed.
40
41 Since AFAIK (and I might be wrong) 32-bit MS Windows doesn't have the
42 to-64-gig PAE capacities that Linux has, there was no pressure for systems
43 designed to be sold with it to have that remapping, since I don't believe
44 they could make use of it anyway on 32-bit MS. They were simply limited
45 to 3-3.5GB of usable memory. Of course, machines designed to run 64-bit
46 versions of whatever OS could and should have had BIOSs with this
47 remapping functionality, but some didn't -- I imagine the BIOS companies
48 (Phoenix, Award, AMI...) were charging extra for the feature or something,
49 back then, and for all I know, might still charge extra for it.
50
51 Even on the ones that have the feature, it's often configurable. I know
52 there are two options related to that in my BIOS (for dual-socket original
53 3-digit AMD Opterons, AMD 8xxx chipset, PCI-X, before PCI-E), but they're
54 not documented in the print-manual as they were added in a BIOS update
55 after the manual was printed (but IIRC the BIOS shipped had the options,
56 or at least they were there by the time I upgraded from a gig to 8 gig of
57 memory and could actually use them). I had read about the issue, and
58 found the BIOS options that controlled it, but didn't quite understand
59 them and more or less simply messed with them until I got the desired
60 effect -- the BIOS detecting memory above the 4-GB barrier and Linux
61 seeing it as well. IIRC the one option configures the remapping itself,
62 while the other configures how the MMTs see and describe the hole, caching-
63 wise.
64
65 FWIW, any decent mobo manufacturer should either list the feature, or have
66 a disclaimer about BIOS mapped memory being limited to 3-3.5 gigs, if you
67 lookup the mobo specs on their site. I imagine systems integrators will
68 likewise have the info available, but don't know as I've only ever bought
69 two whole systems, my original 486sx25 back in '93 or so, and more
70 recently, my netbook. The rest of the time I simply upgrade in-place.
71 But of course many of the buyers really haven't a clue what that language
72 is talking about anyway, if they even check the tech-specs to that degree,
73 so many end up finding out about it the hard way and never really know why
74 it can't see all the memory, only that it doesn't.
75
76 --
77 Duncan - List replies preferred. No HTML msgs.
78 "Every nonfree program has a lord, a master --
79 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: Memory usage; 32 bit vs 64 bit. Volker Armin Hemmann <volkerarmin@××××××××××.com>