Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zero-copy.pci-x,memshare



Larry,
I resent the files and they should be on the list by now.
Josh

At 5:26 PM -0800 11/12/03, Miller, Larry wrote:
Josh, thanks for the info. Can you please put the source you sent in an
email body, since the attachment got removed by an antivirus filter.

More questions:

I would assume it would be a bit slow to DMA in 4KB chunks, so would it work
to allocate contiguous memory when allocating the (say 1 MB) blocks?

The example I set up will allow DMAs that are seen as contiguous up to 256MB - 4 KB.

This may be an obvious question or answered in your sample code, but is
there a way to let the PCI-X card be the master? Does
IOMapperInsertPPNPages or some other IOKit function let the driver to set up
the mapping of PCI-X bus addr to physical memory address for when the PCI-X
card is master?

I'm not sure I understand what you mean. IOMapperInsertPPNPages will put pages into the DART so that DMA access from PCI-X masters will be able to access memory.

Does anyone know how to let a process on each of the two processors have
access to the same blocks of physical memory, when there is 7 GB worth of
these blocks. I have read that a given process can only have access to 4 GB
of memory (physical?, virtual?).

Each process can only map about 3.25 GB of RAM in a few chunks. So to access larger amounts of memory requires some legerdermain. There are a few ways to keep a large data set "live". Here is the simplest one:
Have a clients open a 7 GB file. Then each of the clients use mmap to map in the parts they need. Parts that are not currently mapped will end up in the buffer cache. Things that are dirty and not used will get cleaned to the file eventually but they will stay live. To make this work easily with the driver, you might want to have a few processes that keep all the memory mmapped and wired, while other use mmap to do the work. The workers also would request the DMA with the driver.
Another way to do this is to create some mach shared memory object that map the memory. You would then have some clients map and register the memory while others do the work.


Larry
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.