Skip to contentSkip to conversation

Linux 2.6 : physical memory address and pid

DISCUSSION Robert Hancock 1 participant 1 message Mar 13, 2005 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 9 lines · Allison

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.

Quoted 7 lines

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