High memory (user space) and highmem (kernel space)
up vote
3
down vote
favorite
Each process has 2 memory area: User space (high memory) and kernel space (low memmory). In the kernel space, are the first 896 MB used for mapping kernel code (not fully 1 GB)? This means, when a user -space application performs a system call or anything related to the kernel, the kernel will refer to kernel space for the system call to execute, is it?
The reserved 128MB in kernel space (for high memory (user space) access), is it all the references of user-space memory area? So, a kernel process can access any user space by refer to this area, is this true?
That's why this area is called highmem in kernel space, isn't it?
linux kernel memory
add a comment |
up vote
3
down vote
favorite
Each process has 2 memory area: User space (high memory) and kernel space (low memmory). In the kernel space, are the first 896 MB used for mapping kernel code (not fully 1 GB)? This means, when a user -space application performs a system call or anything related to the kernel, the kernel will refer to kernel space for the system call to execute, is it?
The reserved 128MB in kernel space (for high memory (user space) access), is it all the references of user-space memory area? So, a kernel process can access any user space by refer to this area, is this true?
That's why this area is called highmem in kernel space, isn't it?
linux kernel memory
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Each process has 2 memory area: User space (high memory) and kernel space (low memmory). In the kernel space, are the first 896 MB used for mapping kernel code (not fully 1 GB)? This means, when a user -space application performs a system call or anything related to the kernel, the kernel will refer to kernel space for the system call to execute, is it?
The reserved 128MB in kernel space (for high memory (user space) access), is it all the references of user-space memory area? So, a kernel process can access any user space by refer to this area, is this true?
That's why this area is called highmem in kernel space, isn't it?
linux kernel memory
Each process has 2 memory area: User space (high memory) and kernel space (low memmory). In the kernel space, are the first 896 MB used for mapping kernel code (not fully 1 GB)? This means, when a user -space application performs a system call or anything related to the kernel, the kernel will refer to kernel space for the system call to execute, is it?
The reserved 128MB in kernel space (for high memory (user space) access), is it all the references of user-space memory area? So, a kernel process can access any user space by refer to this area, is this true?
That's why this area is called highmem in kernel space, isn't it?
linux kernel memory
linux kernel memory
asked Jul 2 '12 at 4:50
Amumu
273412
273412
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
"High memory" and "low memory" do not apply to the virtual address space of processes, it's about physical memory instead.
In the process' virtual address space, the user space occupies the first 3GB, and the kernel space the fourth GB of this linear address space.
The first 896MB of the kernel space (not only kernel code, but its data also) is "directly" mapped to the first 896 MB of the physical memory. It is "direct" in the sense that there's always an offset of 0xc0000000 between any linear address of this 896MB part of the virtual kernel space and its corresponding address in physical memory (note however that the MMU is enabled and that page table entries are actually used for this).
The last 128MB part of the virtual kernel space is where are mapped some pieces of the physical "high memory" (> 896MB) : thus it can only map no more than 128MB of "high memory" at a time.
Reference: "Understanding the Linux Kernel", third edition - sections "8.1.3. Memory Zones" and "8.1.6. Kernel Mappings of High-Memory Page Frames".
add a comment |
up vote
1
down vote
High and Low Memory :
Low memory : Memory for which logical addresses exist in kernel space. On almost every system you will likely encounter, all memory is low memory.
High memory : Memory for which logical addresses do not exist, because it is beyond the address range set aside for kernel virtual addresses.This means the kernel needs to start using temporary mappings of the pieces of physical memory that it wants to access.
Kernel splits virtual address into two part user address space and kernel address space. The kernel’s code and data structures must fit into that space, but the biggest consumer of kernel address space is virtual mappings for physical memory. Thus kernel needs its own virtual address for any memory it must touch directly. So, the maximum amount of physical memory that could be handled by the kernel was the amount that could be mapped into the kernel’s portion of the virtual address space, minus the space used by kernel code.

I see you're adding content to this old question. It would be nice if we had something on this question, to point out that it is (and arguably always was!) obsolescent. I.e. 32-bit Linux is generally not used on PCs anymore, and 64-bit Linux does not split physical memory into highmem / lowmem (and obviously the 3GB/1GB user/kernel split doesn't apply either, both virtual areas are significantly larger).
– sourcejedi
Nov 25 at 10:21
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
"High memory" and "low memory" do not apply to the virtual address space of processes, it's about physical memory instead.
In the process' virtual address space, the user space occupies the first 3GB, and the kernel space the fourth GB of this linear address space.
The first 896MB of the kernel space (not only kernel code, but its data also) is "directly" mapped to the first 896 MB of the physical memory. It is "direct" in the sense that there's always an offset of 0xc0000000 between any linear address of this 896MB part of the virtual kernel space and its corresponding address in physical memory (note however that the MMU is enabled and that page table entries are actually used for this).
The last 128MB part of the virtual kernel space is where are mapped some pieces of the physical "high memory" (> 896MB) : thus it can only map no more than 128MB of "high memory" at a time.
Reference: "Understanding the Linux Kernel", third edition - sections "8.1.3. Memory Zones" and "8.1.6. Kernel Mappings of High-Memory Page Frames".
add a comment |
up vote
5
down vote
accepted
"High memory" and "low memory" do not apply to the virtual address space of processes, it's about physical memory instead.
In the process' virtual address space, the user space occupies the first 3GB, and the kernel space the fourth GB of this linear address space.
The first 896MB of the kernel space (not only kernel code, but its data also) is "directly" mapped to the first 896 MB of the physical memory. It is "direct" in the sense that there's always an offset of 0xc0000000 between any linear address of this 896MB part of the virtual kernel space and its corresponding address in physical memory (note however that the MMU is enabled and that page table entries are actually used for this).
The last 128MB part of the virtual kernel space is where are mapped some pieces of the physical "high memory" (> 896MB) : thus it can only map no more than 128MB of "high memory" at a time.
Reference: "Understanding the Linux Kernel", third edition - sections "8.1.3. Memory Zones" and "8.1.6. Kernel Mappings of High-Memory Page Frames".
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
"High memory" and "low memory" do not apply to the virtual address space of processes, it's about physical memory instead.
In the process' virtual address space, the user space occupies the first 3GB, and the kernel space the fourth GB of this linear address space.
The first 896MB of the kernel space (not only kernel code, but its data also) is "directly" mapped to the first 896 MB of the physical memory. It is "direct" in the sense that there's always an offset of 0xc0000000 between any linear address of this 896MB part of the virtual kernel space and its corresponding address in physical memory (note however that the MMU is enabled and that page table entries are actually used for this).
The last 128MB part of the virtual kernel space is where are mapped some pieces of the physical "high memory" (> 896MB) : thus it can only map no more than 128MB of "high memory" at a time.
Reference: "Understanding the Linux Kernel", third edition - sections "8.1.3. Memory Zones" and "8.1.6. Kernel Mappings of High-Memory Page Frames".
"High memory" and "low memory" do not apply to the virtual address space of processes, it's about physical memory instead.
In the process' virtual address space, the user space occupies the first 3GB, and the kernel space the fourth GB of this linear address space.
The first 896MB of the kernel space (not only kernel code, but its data also) is "directly" mapped to the first 896 MB of the physical memory. It is "direct" in the sense that there's always an offset of 0xc0000000 between any linear address of this 896MB part of the virtual kernel space and its corresponding address in physical memory (note however that the MMU is enabled and that page table entries are actually used for this).
The last 128MB part of the virtual kernel space is where are mapped some pieces of the physical "high memory" (> 896MB) : thus it can only map no more than 128MB of "high memory" at a time.
Reference: "Understanding the Linux Kernel", third edition - sections "8.1.3. Memory Zones" and "8.1.6. Kernel Mappings of High-Memory Page Frames".
answered Oct 18 '12 at 11:46
telenn
9115
9115
add a comment |
add a comment |
up vote
1
down vote
High and Low Memory :
Low memory : Memory for which logical addresses exist in kernel space. On almost every system you will likely encounter, all memory is low memory.
High memory : Memory for which logical addresses do not exist, because it is beyond the address range set aside for kernel virtual addresses.This means the kernel needs to start using temporary mappings of the pieces of physical memory that it wants to access.
Kernel splits virtual address into two part user address space and kernel address space. The kernel’s code and data structures must fit into that space, but the biggest consumer of kernel address space is virtual mappings for physical memory. Thus kernel needs its own virtual address for any memory it must touch directly. So, the maximum amount of physical memory that could be handled by the kernel was the amount that could be mapped into the kernel’s portion of the virtual address space, minus the space used by kernel code.

I see you're adding content to this old question. It would be nice if we had something on this question, to point out that it is (and arguably always was!) obsolescent. I.e. 32-bit Linux is generally not used on PCs anymore, and 64-bit Linux does not split physical memory into highmem / lowmem (and obviously the 3GB/1GB user/kernel split doesn't apply either, both virtual areas are significantly larger).
– sourcejedi
Nov 25 at 10:21
add a comment |
up vote
1
down vote
High and Low Memory :
Low memory : Memory for which logical addresses exist in kernel space. On almost every system you will likely encounter, all memory is low memory.
High memory : Memory for which logical addresses do not exist, because it is beyond the address range set aside for kernel virtual addresses.This means the kernel needs to start using temporary mappings of the pieces of physical memory that it wants to access.
Kernel splits virtual address into two part user address space and kernel address space. The kernel’s code and data structures must fit into that space, but the biggest consumer of kernel address space is virtual mappings for physical memory. Thus kernel needs its own virtual address for any memory it must touch directly. So, the maximum amount of physical memory that could be handled by the kernel was the amount that could be mapped into the kernel’s portion of the virtual address space, minus the space used by kernel code.

I see you're adding content to this old question. It would be nice if we had something on this question, to point out that it is (and arguably always was!) obsolescent. I.e. 32-bit Linux is generally not used on PCs anymore, and 64-bit Linux does not split physical memory into highmem / lowmem (and obviously the 3GB/1GB user/kernel split doesn't apply either, both virtual areas are significantly larger).
– sourcejedi
Nov 25 at 10:21
add a comment |
up vote
1
down vote
up vote
1
down vote
High and Low Memory :
Low memory : Memory for which logical addresses exist in kernel space. On almost every system you will likely encounter, all memory is low memory.
High memory : Memory for which logical addresses do not exist, because it is beyond the address range set aside for kernel virtual addresses.This means the kernel needs to start using temporary mappings of the pieces of physical memory that it wants to access.
Kernel splits virtual address into two part user address space and kernel address space. The kernel’s code and data structures must fit into that space, but the biggest consumer of kernel address space is virtual mappings for physical memory. Thus kernel needs its own virtual address for any memory it must touch directly. So, the maximum amount of physical memory that could be handled by the kernel was the amount that could be mapped into the kernel’s portion of the virtual address space, minus the space used by kernel code.

High and Low Memory :
Low memory : Memory for which logical addresses exist in kernel space. On almost every system you will likely encounter, all memory is low memory.
High memory : Memory for which logical addresses do not exist, because it is beyond the address range set aside for kernel virtual addresses.This means the kernel needs to start using temporary mappings of the pieces of physical memory that it wants to access.
Kernel splits virtual address into two part user address space and kernel address space. The kernel’s code and data structures must fit into that space, but the biggest consumer of kernel address space is virtual mappings for physical memory. Thus kernel needs its own virtual address for any memory it must touch directly. So, the maximum amount of physical memory that could be handled by the kernel was the amount that could be mapped into the kernel’s portion of the virtual address space, minus the space used by kernel code.

answered Nov 25 at 9:35
finn
1613
1613
I see you're adding content to this old question. It would be nice if we had something on this question, to point out that it is (and arguably always was!) obsolescent. I.e. 32-bit Linux is generally not used on PCs anymore, and 64-bit Linux does not split physical memory into highmem / lowmem (and obviously the 3GB/1GB user/kernel split doesn't apply either, both virtual areas are significantly larger).
– sourcejedi
Nov 25 at 10:21
add a comment |
I see you're adding content to this old question. It would be nice if we had something on this question, to point out that it is (and arguably always was!) obsolescent. I.e. 32-bit Linux is generally not used on PCs anymore, and 64-bit Linux does not split physical memory into highmem / lowmem (and obviously the 3GB/1GB user/kernel split doesn't apply either, both virtual areas are significantly larger).
– sourcejedi
Nov 25 at 10:21
I see you're adding content to this old question. It would be nice if we had something on this question, to point out that it is (and arguably always was!) obsolescent. I.e. 32-bit Linux is generally not used on PCs anymore, and 64-bit Linux does not split physical memory into highmem / lowmem (and obviously the 3GB/1GB user/kernel split doesn't apply either, both virtual areas are significantly larger).
– sourcejedi
Nov 25 at 10:21
I see you're adding content to this old question. It would be nice if we had something on this question, to point out that it is (and arguably always was!) obsolescent. I.e. 32-bit Linux is generally not used on PCs anymore, and 64-bit Linux does not split physical memory into highmem / lowmem (and obviously the 3GB/1GB user/kernel split doesn't apply either, both virtual areas are significantly larger).
– sourcejedi
Nov 25 at 10:21
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f42095%2fhigh-memory-user-space-and-highmem-kernel-space%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown