From: Timur Tabi <timur.tabi@ammasso.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: get_user_pages() and shared memory question
Date: Tue, 21 Jun 2005 10:10:42 -0500 [thread overview]
Message-ID: <42B82DF2.2050708@ammasso.com> (raw)
Hi,
Is it possible for a page of memory that's been "grabbed" with get_user_pages() to ever be
allocated to another process? I'm assuming the answer is no, but I have a specific case I
want to ask about.
Let's say an application allocates some shared memory, and then calls into a driver which
calls get_user_pages(). The driver exits without releasing the pages, so they now have a
reference count on them. Then the application deallocates the shared memory. At this
point, the virtual addresses disappear, and no process owns them, but the pages still have
a reference count.
Another process now tries to allocate a shared memory buffer. Is there any way that this
new buffer can contain those pages that were grabbed with get_user_pages() (i.e. that
already have a reference count)?
Until 2.6.7, there was a bug in the VM where a page that was grabbed with get_user_pages()
could be swapped out. Those of you familar with the OpenIB work know what I'm talking
about. Would that bug affect anything I'm talking about?
--
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
next reply other threads:[~2005-06-21 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-21 15:10 Timur Tabi [this message]
2005-06-21 17:33 ` get_user_pages() and shared memory question 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
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=42B82DF2.2050708@ammasso.com \
--to=timur.tabi@ammasso.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.