All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell Johnson" <rjohnson@rtlogic.com>
To: <linux-kernel@vger.kernel.org>
Subject: bigphysarea mmap and direct_io
Date: Fri, 6 Oct 2006 07:18:39 -0600	[thread overview]
Message-ID: <003101c6e949$f018cf40$f500030a@rtlogic.com> (raw)

My driver is allocating memory via bigphysarea and my application mmap's the
area for performance reasons.  With linux kernels 2.6.14 and prior on i386
platforms, I have been able to issue disk reads using direct_io to fill this
bigphysarea memory and prevent multiple copies of the data.  The file system
code for direct I/O disk reads checks for VM_IO and will not allow direct io
in that case.  So to do this I had my driver clear the VM_IO flag after
calling remap_pfn_range.

With kernel 2.6.16 and newer, remap_pfn_range sets a new flag VM_PFNMAP
which direct_io also checks.  If my driver clears VM_PFNMAP then the kernel
will oops upon an munmap call because it will attempt to free the pages.

I'm looking for the proper way to do what I want which is to allow the
application to mmap and do direct io disk access to the bigphysarea memory.
I've unsuccessfully tried writing a nopage handler and I still get an oops
upon munmap.  Can someone point me in the right direction?

Please cc me as I'm not on this list.  Thanks!

rjohnson@rtlogic.com

Russell Johnson
RT Logic! 



                 reply	other threads:[~2006-10-06 13:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='003101c6e949$f018cf40$f500030a@rtlogic.com' \
    --to=rjohnson@rtlogic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.