physical memory userspace/kernel split on Linux x86-64
Hi, Is there an explict split between userspace and kernel in physical memory on Linux x86-64? That is, given a physical address, can I tell whether this address is from userspace or not? As far as I know, in virtual address space, the kernel will use the upper half and the userspace will use the lower half. But what about in physical address space? Thanks very much! Le
2015-05-27 3:12 GMT+02:00 Le Tan <tamlokveer@gmail.com>:
Hi, Is there an explict split between userspace and kernel in physical memory on Linux x86-64? That is, given a physical address, can I tell whether this address is from userspace or not?
No. The same physical address can be used by both the kernel and the userspace. The kernel and userspace share the same physical memory. Any memory page can be allocated for the userspace then released (free) then re-allocated for kernel use. As far as I know, in virtual address space, the kernel will use the
upper half and the userspace will use the lower half. But what about in physical address space?
Thanks very much!
Le
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi, 2015-05-27 21:54 GMT+08:00 Karaoui mohamed lamine <moharaka@gmail.com>:
2015-05-27 3:12 GMT+02:00 Le Tan <tamlokveer@gmail.com>:
Hi, Is there an explict split between userspace and kernel in physical memory on Linux x86-64? That is, given a physical address, can I tell whether this address is from userspace or not?
No. The same physical address can be used by both the kernel and the userspace. The kernel and userspace share the same physical memory. Any memory page can be allocated for the userspace then released (free) then re-allocated for kernel use.
Got it. Thanks very much!
As far as I know, in virtual address space, the kernel will use the upper half and the userspace will use the lower half. But what about in physical address space?
Thanks very much!
Le
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi, Linux kernel basically manages all available physical memory pages. If user-space need a page, kernel allocates a page for it. Hence a physical page may be in mapped to user-space virtual address or kernel-space virtual address or both. The user-space and kernel-space exist in virtual address space, not physical. Thanks, Min-Hua On Wed, May 27, 2015 at 09:12:11AM +0800, Le Tan wrote:
Hi, Is there an explict split between userspace and kernel in physical memory on Linux x86-64? That is, given a physical address, can I tell whether this address is from userspace or not? As far as I know, in virtual address space, the kernel will use the upper half and the userspace will use the lower half. But what about in physical address space?
Thanks very much!
Le
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi Min-Hua, 2015-05-27 22:23 GMT+08:00 Min-Hua Chen <orca.chen@gmail.com>:
Hi,
Linux kernel basically manages all available physical memory pages. If user-space need a page, kernel allocates a page for it. Hence a physical page may be in mapped to user-space virtual address or kernel-space virtual address or both.
The user-space and kernel-space exist in virtual address space, not physical.
Very clear description! I always seems to be confused by some basic concept. :) Thanks! Le
Thanks, Min-Hua
On Wed, May 27, 2015 at 09:12:11AM +0800, Le Tan wrote:
Hi, Is there an explict split between userspace and kernel in physical memory on Linux x86-64? That is, given a physical address, can I tell whether this address is from userspace or not? As far as I know, in virtual address space, the kernel will use the upper half and the userspace will use the lower half. But what about in physical address space?
Thanks very much!
Le
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (3)
-
Karaoui mohamed lamine -
Le Tan -
Min-Hua Chen