* physical memory userspace/kernel split on Linux x86-64
@ 2015-05-27 1:12 Le Tan
2015-05-27 13:54 ` Karaoui mohamed lamine
2015-05-27 14:23 ` Min-Hua Chen
0 siblings, 2 replies; 5+ messages in thread
From: Le Tan @ 2015-05-27 1:12 UTC (permalink / raw)
To: kernelnewbies
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* physical memory userspace/kernel split on Linux x86-64
2015-05-27 1:12 physical memory userspace/kernel split on Linux x86-64 Le Tan
@ 2015-05-27 13:54 ` Karaoui mohamed lamine
2015-05-28 0:16 ` Le Tan
2015-05-27 14:23 ` Min-Hua Chen
1 sibling, 1 reply; 5+ messages in thread
From: Karaoui mohamed lamine @ 2015-05-27 13:54 UTC (permalink / raw)
To: kernelnewbies
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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150527/30b0cf26/attachment.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* physical memory userspace/kernel split on Linux x86-64
2015-05-27 1:12 physical memory userspace/kernel split on Linux x86-64 Le Tan
2015-05-27 13:54 ` Karaoui mohamed lamine
@ 2015-05-27 14:23 ` Min-Hua Chen
2015-05-28 0:19 ` Le Tan
1 sibling, 1 reply; 5+ messages in thread
From: Min-Hua Chen @ 2015-05-27 14:23 UTC (permalink / raw)
To: 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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 5+ messages in thread
* physical memory userspace/kernel split on Linux x86-64
2015-05-27 13:54 ` Karaoui mohamed lamine
@ 2015-05-28 0:16 ` Le Tan
0 siblings, 0 replies; 5+ messages in thread
From: Le Tan @ 2015-05-28 0:16 UTC (permalink / raw)
To: 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 at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* physical memory userspace/kernel split on Linux x86-64
2015-05-27 14:23 ` Min-Hua Chen
@ 2015-05-28 0:19 ` Le Tan
0 siblings, 0 replies; 5+ messages in thread
From: Le Tan @ 2015-05-28 0:19 UTC (permalink / raw)
To: 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 at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-28 0:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27 1:12 physical memory userspace/kernel split on Linux x86-64 Le Tan
2015-05-27 13:54 ` Karaoui mohamed lamine
2015-05-28 0:16 ` Le Tan
2015-05-27 14:23 ` Min-Hua Chen
2015-05-28 0:19 ` Le Tan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).