From: Timur Tabi <timur.tabi@ammasso.com>
To: Brice Goglin <Brice.Goglin@ens-lyon.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: get_user_pages() and shared memory question
Date: Tue, 21 Jun 2005 14:55:59 -0500 [thread overview]
Message-ID: <42B870CF.1010205@ammasso.com> (raw)
In-Reply-To: <42B86DF1.7000102@ens-lyon.org>
Brice Goglin wrote:
> Preventing the driver from doing this would probably be the
> right solution here... If the driver called get_user_pages,
> it is its responsibility to release the pages.
The driver does release the pages, but only when asked to do so. If the process dies,
then the driver automatically cleans up, but otherwise how is the driver to know that the
memory is no longer needed?
Perhaps you mean that the driver should release the pages before it exits. Unfortunately,
that defeats the purpose of calling get_user_pages() in the first place. The driver needs
to pin the application's buffers so that the subsequent DMA operations work. This driver
supports an RDMA adapter that transfer network data directly to the application's buffers.
You're probably now thinking, "Well, why doesn't the driver just allocate the buffers on
behalf of the app?" There are two reasons why we can't do that. One, the app may need
have gigabytes of memory for the RDMA operations. Two, the APIs we need to support allow
the app to allocate memory any way it sees fit.
--
Timur Tabi
Staff Software Engineer
timur.tabi@ammasso.com
One thing a Southern boy will never say is,
"I don't think duct tape will fix it."
-- Ed Smylie, NASA engineer for Apollo 13
prev parent reply other threads:[~2005-06-21 19:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-21 15:10 get_user_pages() and shared memory question Timur Tabi
2005-06-21 17:33 ` Roland Dreier
2005-06-21 18:02 ` Hugh Dickins
2005-06-21 18:21 ` Timur Tabi
2005-06-21 19:38 ` Hugh Dickins
2005-06-21 19:43 ` Brice Goglin
2005-06-21 19:55 ` Timur Tabi [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=42B870CF.1010205@ammasso.com \
--to=timur.tabi@ammasso.com \
--cc=Brice.Goglin@ens-lyon.org \
--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