Re: get_user_pages fails for contiguous memory?



On Tue, Sep 23, 2008 at 09:19:51PM +0530, Hiremath, Vaibhav wrote:
Hi,

For some reason (unknown to me) the VM_IO and VM_PFNMAP vm_flags are set when I use get_user_pages function, causing it to fail for me. I'm currently using 2.6.22 on an ARM platform.

My Actual test case is something -

I trying run/test a simple use case where, I am allocating buffers in one driver using get_free_pages, map them to user application and pass it to another driver for processing.

I am allocating huge memory in frame buffer driver using get_free_pages at the init time. I would like to use this buffer in resizer driver (scatter gather DMA), which resizes the image depending on user configuration.

If I allocate a memory using malloc or memalign from in user space and pass it to resizer driver it works fine.

Any suggestions/solution how to achieve this would really helpful to me.

Firstly, user a later kernel. How hard is upgrading?

Secondly, there is an DMA API for allocating DMA capable memory.

Thirdly, there's a limit of contiguous memory available, are you
sure that you can actually allocate that much memory in one go? Even
if you are, you probably can't guarantee to get it again if user processes
have caused memory map fragmentation.

And finally, wrong list! How hard is it to find the Linux ARM list?

PS, wrap your emails to 77 characters or less per line.

--
Ben (ben@xxxxxxxxx, http://www.fluff.org/)

'a smiley only costs 4 bytes'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: PCI bus-master and large contiguous memory buffers
    ... As soon as device reaches the end of the buffer ... Sure, I am developing both PCI adapter and device driver, so, it is ... not afford reinitializing DMA on my device after every transfer. ... x86 CPU memory management structures I never tried to dig into Windows ...
    (microsoft.public.development.device.drivers)
  • Re: PCI bus-master and large contiguous memory buffers
    ... x86 CPU memory management structures I never tried to dig into Windows ... What about buffer consistency in the long run? ... The scattergather list methods provide a vastly simplified mechanism ... CD-ROM driver may keep the system for seconds at elevated IRQL levels, ...
    (microsoft.public.development.device.drivers)
  • Re: PCI bus-master and large contiguous memory buffers
    ... I built my scatter gather list in SRAM that was on my device, ... could have done it in system memory had I needed to. ... interrupt when a buffer was filled, the application would save the buffer to ... beginning of the recording I made a device IO control call to my driver. ...
    (microsoft.public.development.device.drivers)
  • Re: PCI bus-master and large contiguous memory buffers
    ... x86 CPU memory management structures I never tried to dig into Windows ... What about buffer consistency in the long run? ... CD-ROM driver may keep the system for seconds at elevated IRQL levels, ... addresses of physical pages of memory, from which the user buffer ...
    (microsoft.public.development.device.drivers)
  • Re: Memory leak in the Driver
    ... anyway i had already put prints when i am allocating and deallocating, ... i am sure that all the memory that i am allocating in my driver is ... i am developing USB-Serial Driver which uses both USB related functions ... Anyway it is since a week i was trying to find this leak!!!! ...
    (microsoft.public.windowsce.platbuilder)