2007-10-29 11:20:25

by Yoav Artzi

[permalink] [raw]
Subject: Linux kernel memory and split on 64-bit machines

Hi,


I am researching now about the Linux kernel memory on 64-bit (x86_64)
machines. I am looking into answering the following questions:

1. Is there a user-kernel split on 64-bit memories? If so, how is it
done? What is the size of each part?

2. Does kernel high memory exists on 64-bit machines?

3. How is it possible to detect in runtime the split and the size of the
physical memory?


Thanks,


Yoav


2007-10-29 12:11:25

by Andi Kleen

[permalink] [raw]
Subject: Re: Linux kernel memory and split on 64-bit machines

Yoav Artzi <[email protected]> writes:

> I am researching now about the Linux kernel memory on 64-bit (x86_64)
> machines. I am looking into answering the following questions:
>
> 1. Is there a user-kernel split on 64-bit memories? If so, how is it
> done? What is the size of each part?

See Documentation/x86_64/mm.txt. Note it changed in 2.6.11.

-Andi

2007-10-29 15:48:16

by Andi Kleen

[permalink] [raw]
Subject: Re: Linux kernel memory and split on 64-bit machines

On Mon, Oct 29, 2007 at 05:06:31PM +0200, Yoav Artzi wrote:
> I don't know what befell me. I realized the foolishness of the questions
> a second after clicking the send button.
>
>
> Now, I just wonder what will happen when people will need more then
> 2^46bytes of memory. Any idea?

The CPU needs to be extended then beyond 48bit VA.

(actually it could be extended to 2^46.5 or so)


>
> Another two issues:
>
> 1. I see vmalloc() doesn't cover the entire possible space. Why is that?

It needs an reserved space for its virtual mappings.

>
> 2. How come user space gets 47bits and kernel only gets 46bits in direct
> mapping?

Half of the kernel space is reserved for special purposes
(vmalloc, ioremap etc.) That is not fixed and could be varied.

-Andi