From: Casey Leedom <casey_leedom@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: Re: ZERO_PAGE() vs. loadable modules in Redhat 4.4 i386 kernels ...
Date: Wed, 27 Jun 2007 12:13:57 -0700 (PDT) [thread overview]
Message-ID: <498725.24237.qm@web30501.mail.mud.yahoo.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0706271956430.30942@blonde.wat.veritas.com>
--- Hugh Dickins <hugh@veritas.com> wrote:
> I can't speak for Red Hat 4.4; but in general, you should be passing the
> write flag to get_user_pages if you're going to modify the content of
> those pages, which will then allocate the hierarchy needed and break
> COW where necessary.
yes, that would definitely be the case if I were doing a DMA read but in this
case I'm doing a DMA write. I could force the kernel to instantiate zero'ed
pages for the entire range but that would significantly impact performance.
> If that doesn't suit you (e.g. it's supposed to
> be a readonly area in userspace), then you proably shouldn't be using
> get_user_pages at all, but letting userspace mmap your driver pages
> into its space instead. Definitely don't play empty_zero_page games.
Hhrrrmmm, I'm not sure I understand what you're saying here. In our case the
user application just does a write() on a socket. Our driver is doing a DMA
directly from user pages out to the interface. We have fallback timeout code
if the DMA takes longer than a certain length of time where we mark the pages
that haven't yet been transfered as COW so we can return early to the user
application without violating Linux write() semantics. It sounds like you're
advocating major changes to the application which wouldn't be useful. My
appologies if I'm misinterpreting your comment.
Casey
prev parent reply other threads:[~2007-06-27 19:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-27 18:12 ZERO_PAGE() vs. loadable modules in Redhat 4.4 i386 kernels Casey Leedom
2007-06-27 18:39 ` Arjan van de Ven
2007-06-27 18:53 ` Casey Leedom
2007-06-27 20:18 ` Arjan van de Ven
2007-06-27 21:40 ` Casey Leedom
2007-06-27 22:43 ` Casey Leedom
2007-06-27 19:02 ` Hugh Dickins
2007-06-27 19:13 ` Casey Leedom [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=498725.24237.qm@web30501.mail.mud.yahoo.com \
--to=casey_leedom@yahoo.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