Re: Regarding remap_pfn_page

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

 



On Tue, Jul 19, 2011 at 11:26 PM, mindentropy <mindentropy@xxxxxxxxx> wrote:
> Hi,
>  When I mmap pages via remap_pfn_page method would the physical frames
> assigned the linear address be contiguous? If yes what would happen if I mmap
> a huge range?
>
> Thanks.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

>  When I mmap pages via remap_pfn_page method would the physical frames
> assigned the linear address be contiguous?

The place where you typically call remap_pfn_page is mmap handler of
your device driver. And you want to assign device memory to user
space. Note that the memory (physical pages) might be already
allocated and there is no requirement for them to have a kernel linear
address assigned to them. For example, on i386, you might allocate
pages with from high memory and remap them. These pages may not have
kernel linear address.
remap_pfn_range is just going to established a secondary virtual
address mapping for these pages into the caller process' page tables,
irrespective of whether these pages have kernel linear address or not.

> If yes what would happen if I mmap a huge range?
huge range means you already have huge physical memory to be mapped
and user space process has huge virtual memory area to accomodate
that. Note that is mapping is specific to one particular process (or
threads sharing process address space) so it is fairly possible to
establish mmap.

Rajat

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[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