public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Chris Friesen <cfriesen@nortelnetworks.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: question on memory map cleanup stuff
Date: Tue, 19 Oct 2004 11:24:25 -0700	[thread overview]
Message-ID: <20041019182425.GO5607@holomorphy.com> (raw)
In-Reply-To: <41755A94.8030207@nortelnetworks.com>

William Lee Irwin III wrote:
>> vma->vm_ops->close() often suffices for such without disturbing the core.

On Tue, Oct 19, 2004 at 12:19:00PM -0600, Chris Friesen wrote:
> I'm running into a problem.
> At the time of close(), I need to figure out which page to unreserve and 
> free. However, when I call
> follow_page(vma->vm_mm, vma->vm_start, 0);
> it returns zero. How do I go from vma to page?

You generally need to keep track of this yourself, as during ->close()
the pagetables have already been destroyed. linear_page_index() can
tell you the offset into the object the vma maps, but ultimately, you
have to track the pages yourself. vma->vm_private_data can be used to
attach various accounting structures to the vma.


-- wli

      reply	other threads:[~2004-10-19 18:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-18 22:57 question on memory map cleanup stuff Chris Friesen
2004-10-18 23:14 ` William Lee Irwin III
2004-10-18 23:39   ` Chris Friesen
2004-10-19 18:19   ` Chris Friesen
2004-10-19 18:24     ` William Lee Irwin III [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=20041019182425.GO5607@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=cfriesen@nortelnetworks.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