public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockr@shaw.ca>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.6 : physical memory address and pid
Date: Sun, 13 Mar 2005 01:43:09 -0600	[thread overview]
Message-ID: <4233EF0D.6060507@shaw.ca> (raw)
In-Reply-To: <3HsTW-7Mx-11@gated-at.bofh.it>

Allison wrote:
> 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.

I don't think it works this way - if the system is modifying the pages 
which you're trying to do DMA reads on, you'll just read whatever data 
happens to be in memory at the time. The CPU is not "locked out" just 
because that memory is being read by a DMA transfer.

> 
> 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.

As above, I don't think anything ensures this. Doing DMA reads on pages 
that could potentially be being modified during the transfer isn't 
something that is typically done..

       reply	other threads:[~2005-03-13  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
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

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=4233EF0D.6060507@shaw.ca \
    --to=hancockr@shaw.ca \
    --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