On Sun, 27 May 2007, Mulyadi Santosa wrote: > Robert P. J. Day wrote: > > following on my previous question, i'm following the tradition of a > > few authors and using "logical" kernel address to refer to any address > > in the kernel address space that maps to its physical address just > > based on a simple offset. that is, given the kernel address space in > > the range 3G-4G, a good chunk of the lower part of that range maps to > > physical addresses simply by subtracting the offset of 3G > > (0xC0000000). > Yes, as long as what you refer doesn't belong to vmalloc area (the > upper 128 MB address space). That area is simply reserved to map > high memory area, fixed mapping and so on. right, but what is the formula that determines how *much* of RAM is allocated for that vmalloc area? for example, on one of my systems that has 1G of RAM, /proc/meminfo lists the following, which all makes sense: MemTotal: 1032652 kB ... VmallocTotal: 114680 kB VmallocUsed: 8664 kB VmallocChunk: 104948 kB ... while /var/log/dmesg contains the lines: ... 127MB HIGHMEM available. 896MB LOWMEM available. [clearly both the NORMAL and DMA zones] ... so far, so good. but if i move to another system that has only 512M of RAM, i read from the same places: ... MemTotal: 448928 kB ... VmallocTotal: 573432 kB VmallocUsed: 4540 kB VmallocChunk: 568736 kB ... 0MB HIGHMEM available. 446MB LOWMEM available. ... so with only 512M of RAM, clearly i can't use all of that for the "NORMAL" zone since some of it has to be reserved for kernel tables that normally reside in "high" memory, right? i'm just trying to get straight the algorithm the kernel uses to allocate what RAM i have to the various zones, and what that space will eventually be used for. > If I follow your above definition, then yes ZONE_NORMAL only have > logical addres. BTW, may I suggest to use "linear address" term > instead? Logical address, according to UTLK, refer to the address > that use segment and offset. sadly, the phrase "logical address" is already in common use to refer to those offset-based addresses, as opposed to the addresses that actually use the kernel page tables. > Also, if I am allowed to rephrase your subject, maybe it is better > to label it "do all physical pages in ZONE_NORMAL only have logical > address?" because what we really refer here is the page while > ZONE_NORMAL denotes physical memory range. yes, that's a good way to put it and, based on what i see on a 512M system, the high end of "normal" memory is still going to be reserved for kernel tables or something like that. rday p.s. i suspect that if i were to figure out what every line of output from /proc/meminfo means, i'd answer most of my questions. maybe that will be today's project. -- ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://fsdev.net/wiki/index.php?title=Main_Page ======================================================================== -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ