Re: Some doubts about ZONE_NORMAL and ZONE_HIGHMEM

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

 



Thank you Mulyadi,

On 7/10/08, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
>  >
>  > If default mapping (via cr3/pgd mechanism) is ZONE_NORMAL, then how do
>  > we allocate memory in the ZONE_HIGHMEM region?   (ie, does
>  > __get_free_pages() or alloc_pages() return us anything in those
>  > region?)
>  >
>
> Don't get confused, alloc_pages() has no problem "touching" highmem
>  pages. The problem is, when you need to address those pages (I am sure
>  you realize this issue too), you need to map them into kernel address
>  space. That's where kmap() or kmap_atomic() comes into rescue.
>

Ok, to summarize:

1.   __get_free_pages(GFP_HIGHMEM, order)---> it will be from ZONE_HIGHMEM

2.   Or alloc_pages(GFP_HIGHMEM, order).

3.   After these just kmap() them to get the virtual address, right?

Thank you very much.

-- 
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