[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Fwd: Re: address space (was Re: Tracking sarge)



I guess other people might be interested in this too.


Kurt

--- Begin Message ---
On Sun, Feb 06, 2005 at 01:24:26AM +0100, Sven Mueller wrote:
> Kurt Roeckx wrote on 03/02/2005 18:24:
> >
> >Actually, you can use 4GB of address space for userspace.
> 
> For 32bit userspace or also for 64bit userspace?
> 
> Or in other words: With a 64bit (amd64) kernel, where are the actual 
> limits for:
> 32bit Apps

4GB, but you can change it to 3GB if you want.

> 64bit Apps

/proc/cpuinfo says:
address sizes   : 40 bits physical, 48 bits virtual

And from /usr/include/asm/processor:

/*
 * User space process size: 512GB - 1GB (default).
 */
#define TASK_SIZE       (0x0000007fc0000000)

Which is only 39 bit.

There is also this in page.h:
/* See Documentation/x86_64/mm.txt for a description of the
 * memory map. */
#define __START_KERNEL          0xffffffff80100000
#define __START_KERNEL_map      0xffffffff80000000
#define __PAGE_OFFSET           0x0000010000000000      /* 1 << 40 */
#define __PHYSICAL_MASK_SHIFT   40
#define __PHYSICAL_MASK         ((1UL << __PHYSICAL_MASK_SHIFT) - 1)
#define __VIRTUAL_MASK_SHIFT    48
#define __VIRTUAL_MASK          ((1UL << __VIRTUAL_MASK_SHIFT) - 1)

And from Documentation/x86_64/mm.txt:
The paging design used on the x86-64 linux kernel port in 2.4.x
provides:

o       per process virtual address space limit of 512 Gigabytes
o       top of userspace stack located at address 0x0000007fffffffff
o       PAGE_OFFSET = 0xffff800000000000
o       start of the kernel = 0xffffffff800000000
o       global RAM per system 2^64-PAGE_OFFSET-sizeof(kernel) = 128 Terabytes - 2 Gigabytes

Note that that doc is about the 2.4 kernel and they're
already talking about removing the 512GB per process limit.  I
think it shouldn't be a problem moving it to the 47 bit limit
(512TB), but that's probably going to take some work.


Kurt


--- End Message ---

Reply to: