mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: "Hiremath, Vaibhav" <hvaibhav@ti.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: get_user_pages fails for contiguous memory?
Date: Tue, 23 Sep 2008 17:46:10 +0100	[thread overview]
Message-ID: <20080923164610.GI1916@fluff.org.uk> (raw)
In-Reply-To: <19F8576C6E063C45BE387C64729E739403CD7C968B@dbde02.ent.ti.com>

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@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

      reply	other threads:[~2008-09-23 16:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23 15:49 Hiremath, Vaibhav
2008-09-23 16:46 ` Ben Dooks [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080923164610.GI1916@fluff.org.uk \
    --to=ben-linux@fluff.org \
    --cc=hvaibhav@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome