linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* High Memory Address Space
@ 2002-05-03 14:43 Leandro Tavares Carneiro
  2002-05-03 16:05 ` Martin J. Bligh
  2002-05-03 16:46 ` Richard B. Johnson
  0 siblings, 2 replies; 4+ messages in thread
From: Leandro Tavares Carneiro @ 2002-05-03 14:43 UTC (permalink / raw)
  To: Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

I don't know if this is the right place for my question. In advance, i'm
sorry to bother if this is don't covered for this list. If was a better
place for this question, please show me. I can't find this topic in the
mailing list archives. Thanks.

How is the maximum memory address space, per process or for all process,
using High Memory Suport to 64Gb? Is possible to alocate more than 3GB
for one process? Is much diference between kernel 2.4.x and 2.5.x in the
high memory support?

Thanks in advance for any help.


-- 
Leandro Tavares Carneiro
Analista de Suporte
EP-CORP/TIDT/INFI
Telefone: 2534-1427

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: High Memory Address Space
  2002-05-03 14:43 High Memory Address Space Leandro Tavares Carneiro
@ 2002-05-03 16:05 ` Martin J. Bligh
  2002-05-03 16:46 ` Richard B. Johnson
  1 sibling, 0 replies; 4+ messages in thread
From: Martin J. Bligh @ 2002-05-03 16:05 UTC (permalink / raw)
  To: Leandro Tavares Carneiro, Kernel Mailing List

> How is the maximum memory address space, per process or for all process,
> using High Memory Suport to 64Gb? 

Roughly speaking, the high memory (above 896MB phys) is mapped directly 
into user address spaces, mapped a page at a time into the kernel 
virtual address space via kmap and friends into a small window.

> Is possible to alocate more than 3GB for one process? 

Not really, you could shift the boundary to 3.5Gb or so in theory,
and eek out a little more, but in practice that just makes you
run out of kernel address space instead if you have enough memory
to make it worthwhile (unless you wanted the users pages swapped
out). 

M.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: High Memory Address Space
  2002-05-03 14:43 High Memory Address Space Leandro Tavares Carneiro
  2002-05-03 16:05 ` Martin J. Bligh
@ 2002-05-03 16:46 ` Richard B. Johnson
  2002-05-03 17:09   ` William Lee Irwin III
  1 sibling, 1 reply; 4+ messages in thread
From: Richard B. Johnson @ 2002-05-03 16:46 UTC (permalink / raw)
  To: Leandro Tavares Carneiro; +Cc: Kernel Mailing List

On 3 May 2002, Leandro Tavares Carneiro wrote:

> 
> How is the maximum memory address space, per process or for all process,
> using High Memory Suport to 64Gb? Is possible to alocate more than 3GB
> for one process? Is much diference between kernel 2.4.x and 2.5.x in the
> high memory support?
> 
> Thanks in advance for any help.

Unix/Linux on 32-bit machines use 32-bit address space. All addresses
are virtual so some of the pages can come from anywhere, including
so-called "high memory". The memory managment makes these pages
appear contiguous to each task (and to the kernel itself). One of
the Unix characteristics is that the kernel address space is
shared with each of the process address space. This means that the
actual process address-space does not start at 0 and extend to
0xffffffff. Instead it starts at an address that leaves room for
the kernel. This split can, in principle, be changed. However
it will result in only a few more megabytes of user address space
and might interfere with the memory mapping of runtime libraries
which, last time I checked, presume certain starting addresses:

Script started on Fri May  3 12:39:03 2002
# cat >xxx.c
main() { return 0; }

# gcc -c -o xxx.o xxx.c
# ld -o xxx xxx.o
ld: warning: cannot find entry symbol _start; defaulting to 08048074
# exit
exit
Script done on Fri May  3 12:39:45 2002

You can see that the assumed starting address is 08048074.

So, basically, if you need more address space, you need a 64-bit
machine. Practically, if what you are doing won't fit in the
address space provided, you should re-think how you are doing
it. Usually this involves using the file-system. That's one of
the things it's really good at.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

                 Windows-2000/Professional isn't.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: High Memory Address Space
  2002-05-03 16:46 ` Richard B. Johnson
@ 2002-05-03 17:09   ` William Lee Irwin III
  0 siblings, 0 replies; 4+ messages in thread
From: William Lee Irwin III @ 2002-05-03 17:09 UTC (permalink / raw)
  To: Richard B. Johnson; +Cc: Leandro Tavares Carneiro, Kernel Mailing List

On Fri, May 03, 2002 at 12:46:12PM -0400, Richard B. Johnson wrote:
> Unix/Linux on 32-bit machines use 32-bit address space. All addresses
> are virtual so some of the pages can come from anywhere, including
> so-called "high memory". The memory managment makes these pages
> appear contiguous to each task (and to the kernel itself). One of
> the Unix characteristics is that the kernel address space is
> shared with each of the process address space. This means that the
> actual process address-space does not start at 0 and extend to
> 0xffffffff. Instead it starts at an address that leaves room for
> the kernel. This split can, in principle, be changed. However
> it will result in only a few more megabytes of user address space
> and might interfere with the memory mapping of runtime libraries
> which, last time I checked, presume certain starting addresses:

Well, since the kernel is using up a whole 1GB for itself, from a
naive point of view, it might seem a target for reclamation.

On Fri, May 03, 2002 at 12:46:12PM -0400, Richard B. Johnson wrote:
> Script started on Fri May  3 12:39:03 2002
> # cat >xxx.c
> main() { return 0; }
> # gcc -c -o xxx.o xxx.c
> # ld -o xxx xxx.o
> ld: warning: cannot find entry symbol _start; defaulting to 08048074
> # exit
> exit
> Script done on Fri May  3 12:39:45 2002
> You can see that the assumed starting address is 08048074.

This is default linker script (SVR4 ABI) stuff, the portion of the process
address space reserved for the kernel extends from 3GB to 4GB in Linux.
It's fully well possible to link and run executables so that they are
loaded at the first page above the zero page, though little does it.


Cheers,
Bill

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-05-03 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-03 14:43 High Memory Address Space Leandro Tavares Carneiro
2002-05-03 16:05 ` Martin J. Bligh
2002-05-03 16:46 ` Richard B. Johnson
2002-05-03 17:09   ` William Lee Irwin III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).