From: Allison <fireflyblue@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Linux 2.6 : physical memory address and pid
Date: Sat, 12 Mar 2005 22:56:09 -0500 [thread overview]
Message-ID: <17d798805031219562e44f911@mail.gmail.com> (raw)
In-Reply-To: <20050313012323.GE3163@waste.org>
Thanks for the answer!
Another related question :
I need to gather all application pages by reading the page tables.
The hard part is, I need to do this from a PCI device using DMA. As I
understand it, when a DMA is being performed, the pages are pinned in
memory . Since the PCI device has grabbed the bus, the processor is
not able to access memory to perform page replacement right ?
So, this is a form of mutual exclusion.
However, if I have to fetch the page struct, the process address space
of the process owning the page (I am ignoring shared pages to make
things simpler) and the page itself, will a scatter gather DMA make
sure that the processor cannot modify any of these data structures
till the DMA is complete ? I am using Linux 2.6 and the i386
architecture.
thanks,
Allison
On Sat, 12 Mar 2005 17:23:23 -0800, Matt Mackall <mpm@selenic.com> wrote:
> On Sat, Mar 12, 2005 at 08:05:11PM -0500, firefly blue wrote:
> > Hi,
> >
> > With the 2.6 Linux kernel, I want to find, from the physical page
> > frame, the virtual address of the page loaded in the frame and the
> > process id of the process owning it.
>
> Follow struct page->mapping to struct address_space. A page can be
> mapped into any number of processes and multiple times per process so
> you'll need to walk the data structures there.
>
> --
> Mathematics is the supreme nostalgia of our time.
>
next prev parent reply other threads:[~2005-03-13 4:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-13 1:05 Linux 2.6 : physical memory address and pid firefly blue
2005-03-13 1:23 ` Matt Mackall
2005-03-13 3:56 ` Allison [this message]
[not found] <3HpMi-5nQ-3@gated-at.bofh.it>
[not found] ` <3Hq5K-5CP-13@gated-at.bofh.it>
[not found] ` <3HsTW-7Mx-11@gated-at.bofh.it>
2005-03-13 7:43 ` Robert Hancock
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=17d798805031219562e44f911@mail.gmail.com \
--to=fireflyblue@gmail.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.