2004-09-22 18:45:15

by Timothy Miller

[permalink] [raw]
Subject: Re: 1GB/2GB/3GB User Space Splitting Patch 2.6.8.1 (PSEUDO SPAM)


I feel like I've missed something in this discussion.

First of all I really don't understand the cause of the lost 128K in the
first place, but it seems that by increasing the address space reserved
for the kernel in user space by some amount fixes this problem.

My question is: Why can't we just shrink the kernel address space by
that same amount, allowing the kernel address space plus the extra to
fit into 1GB?


2004-09-22 18:51:39

by Roland Dreier

[permalink] [raw]
Subject: Re: 1GB/2GB/3GB User Space Splitting Patch 2.6.8.1 (PSEUDO SPAM)

Timothy> My question is: Why can't we just shrink the kernel
Timothy> address space by that same amount, allowing the kernel
Timothy> address space plus the extra to fit into 1GB?

If you have 1 GB of memory and want to map it all into the kernel's
address space and the kernel has only 1 GB of address space total,
then there is no room for anything else (such as address space to
ioremap memory-mapped peripherals or space for vmalloc allocations).
Therefore, if you want to have 1 GB of RAM mapped linearly into the
kernel's address space, you need strictly more than 1 GB of kernel
address space. In practice, 1.25 GB of kernel address space (a
PAGE_OFFSET value of 0xb0000000) works well with 1 GB of RAM. That's
what I run on my main desktop machine with 1 GB of RAM to avoid HIGHMEM.

- Roland

2004-09-22 20:18:49

by Timothy Miller

[permalink] [raw]
Subject: Re: 1GB/2GB/3GB User Space Splitting Patch 2.6.8.1 (PSEUDO SPAM)



Roland Dreier wrote:
> Timothy> My question is: Why can't we just shrink the kernel
> Timothy> address space by that same amount, allowing the kernel
> Timothy> address space plus the extra to fit into 1GB?
>
> If you have 1 GB of memory and want to map it all into the kernel's
> address space and the kernel has only 1 GB of address space total,
> then there is no room for anything else (such as address space to
> ioremap memory-mapped peripherals or space for vmalloc allocations).
> Therefore, if you want to have 1 GB of RAM mapped linearly into the
> kernel's address space, you need strictly more than 1 GB of kernel
> address space. In practice, 1.25 GB of kernel address space (a
> PAGE_OFFSET value of 0xb0000000) works well with 1 GB of RAM. That's
> what I run on my main desktop machine with 1 GB of RAM to avoid HIGHMEM.
>
> - Roland
>
>


Ok, I understand now. I think. With 0xc0000000, you have 128M of
highmem, right? Why do you add 256M to the kernel address space? Is
there a further advantage to that?