* How to use >3G memory per process
@ 2001-12-18 17:48 Wenyong Deng
2001-12-18 18:37 ` Wayne Whitney
2001-12-18 18:40 ` H. Peter Anvin
0 siblings, 2 replies; 4+ messages in thread
From: Wenyong Deng @ 2001-12-18 17:48 UTC (permalink / raw)
To: linux-kernel
Hi,
I read about 3.5G-per_process (or 3.5G/0.5G user/kernel space) in this
mailing list, but I don't find the details of how to do it. I have installed
Redhat7.2 (kernel 2.4.10enterprise) on a dual CPU 4G memory PC. I wrote a
simple program to use malloc to allocate memory, and it can never exceeds
3G. libhoard didn't help either. My question is:
[1] What need to be done for the kernel to support 3.5G or more user address
space per process?
[2] What need to be done at compilation time? Any option for
compiler/linker?
Thanks,
--Wenyong
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to use >3G memory per process
2001-12-18 17:48 How to use >3G memory per process Wenyong Deng
@ 2001-12-18 18:37 ` Wayne Whitney
2001-12-18 19:07 ` H. Peter Anvin
2001-12-18 18:40 ` H. Peter Anvin
1 sibling, 1 reply; 4+ messages in thread
From: Wayne Whitney @ 2001-12-18 18:37 UTC (permalink / raw)
To: Wenyong Deng; +Cc: linux-kernel
In mailing-lists.linux-kernel, you wrote:
> [1] What need to be done for the kernel to support 3.5G or more user
> address space per process?
On ia32, change the value of __PAGE_OFFSET (where kernel space starts)
in include/asm-i386/page.h. The size of kernel space must be a power
of 2, so you can change __PAGE_OFFSET from its default of 0xC0000000
to either 0xE0000000 (reasonable) or 0xF0000000 (overboard ?).
You must also change the unlabeled value near the top of
arch/i386/vmlinux.lds to match the value of __PAGE_OFFSET.
> [2] What need to be done at compilation time? Any option for
> compiler/linker?
No changes are required in the method of compiling the kernel. As for
your application, no changes should be required, although I am not
familiar with libhoard.
Note that this change increases the mmap() region of user space, but
since you are speak of using malloc() and/or libhoard, that should be
sufficient for your purposes. With __PAGE_OFFSET set to 0xE0000000,
your program should have (3.5GB - 2 * Program Size - Stack Size) of
usable address space.
Cheers, Wayne
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to use >3G memory per process
2001-12-18 17:48 How to use >3G memory per process Wenyong Deng
2001-12-18 18:37 ` Wayne Whitney
@ 2001-12-18 18:40 ` H. Peter Anvin
1 sibling, 0 replies; 4+ messages in thread
From: H. Peter Anvin @ 2001-12-18 18:40 UTC (permalink / raw)
To: linux-kernel
Followup to: <OHEPLPGMMIEGHANJIEBAIEPKCEAA.wydeng@platodesign.com>
By author: "Wenyong Deng" <wydeng@platodesign.com>
In newsgroup: linux.dev.kernel
>
> Hi,
>
> I read about 3.5G-per_process (or 3.5G/0.5G user/kernel space) in this
> mailing list, but I don't find the details of how to do it. I have installed
> Redhat7.2 (kernel 2.4.10enterprise) on a dual CPU 4G memory PC. I wrote a
> simple program to use malloc to allocate memory, and it can never exceeds
> 3G. libhoard didn't help either. My question is:
>
> [1] What need to be done for the kernel to support 3.5G or more user address
> space per process?
>
> [2] What need to be done at compilation time? Any option for
> compiler/linker?
>
You need a patch from Andrea; you also need to either run kernel boot
protocol 2.03 (a patch from me, plus a compatible bootloader), *OR*
run without initrd.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to use >3G memory per process
2001-12-18 18:37 ` Wayne Whitney
@ 2001-12-18 19:07 ` H. Peter Anvin
0 siblings, 0 replies; 4+ messages in thread
From: H. Peter Anvin @ 2001-12-18 19:07 UTC (permalink / raw)
To: linux-kernel
Followup to: <200112181837.fBIIbUF02685@adsl-209-76-109-63.dsl.snfc21.pacbell.net>
By author: Wayne Whitney <whitney@math.berkeley.edu>
In newsgroup: linux.dev.kernel
>
> In mailing-lists.linux-kernel, you wrote:
>
> > [1] What need to be done for the kernel to support 3.5G or more user
> > address space per process?
>
> On ia32, change the value of __PAGE_OFFSET (where kernel space starts)
> in include/asm-i386/page.h. The size of kernel space must be a power
> of 2, so you can change __PAGE_OFFSET from its default of 0xC0000000
> to either 0xE0000000 (reasonable) or 0xF0000000 (overboard ?).
> You must also change the unlabeled value near the top of
> arch/i386/vmlinux.lds to match the value of __PAGE_OFFSET.
>
Note that this does break the (old) initrd protocol. Compile your
kernel monolithic.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-12-18 19:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-18 17:48 How to use >3G memory per process Wenyong Deng
2001-12-18 18:37 ` Wayne Whitney
2001-12-18 19:07 ` H. Peter Anvin
2001-12-18 18:40 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox