Re: unity mapping in kernel area?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 3, 2009 at 2:41 PM, NAHieu <nahieu@xxxxxxxxx> wrote:
> On Tue, Mar 3, 2009 at 3:29 PM, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote:
>> - Show quoted text -
>> On Tue, Mar 3, 2009 at 11:39 AM, NAHieu <nahieu@xxxxxxxxx> wrote:
>>> On Tue, Mar 3, 2009 at 12:16 PM, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote:
>>>> This is the first time I have seen the word "unity-mapping"......if it
>>>> is your invention....congratulations!!!! U have created a new term.
>>>
>>> so you learned a new term today :-). but i agree that it is not
>>> popular, and it confused me at first.
>>>
>>> so the more popular one is "identity mapping", right?
>>>
>>> that is not my term, but somebody else. I read that on internet somewhere ...
>>>
>>>>
>>>> Usually I heard of "identity mapping", "direct mapping", linear
>>>> mapping, vs "non-linear mapping".   The formula is basically
>>>> equivalent to __pa(), and all the different variation:  __va(),
>>>> virt_to_page(), pfn_to_kaddr() etc.   It is all just using a
>>>> straightforward formula.   This is because virtual address and
>>>> physical addr are inter-convertible directly in the ZONE_NORMAL range.
>>>>  But not in the ZONE_HIGH area.   kmalloc() always returned addresses
>>>> in these range.   All the confusing API like pud*, pgd*, pmd*() API
>>>> also hinges on this characteristic to convert directly between
>>>> physical and virtual, or to extract out page frame number, PTE etc
>>>> from the virtual/physical addresses.
>>>
>>> OK, so the difference between kmalloc and vmalloc in term of address
>>> they return:
>>> - kmalloc() always return addresses in ZONE_NORMAL
>>> - vmalloc() always returns addresses in ZONE_HIGH
>>>
>>> Could you confirm that is correct?
>>
>> to the best of my knowledge....i think yes.
>>
>>>
>>> So my question now is: what is ZONE_NORMAL range? I mean from what
>>> address to what address?
>>>
>>
>> eh.....check header file definition......it varies from arch to arch,
>> and may be modified at bootup time via some parameter as well.   but
>> don't have to know either - cannot find any reason for that.   can i
>> know why did u ask?
>
> I am working on a tool to analyze the kernel memory, so I need to
> understand how kernel manages and layouts its memory.
>

analyze the memory for what?   patterns of allocation?  patterns of
API usages?   or performance analysis of different APIs used?


-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux