Re: __get_free_pages(): is the MEM really mine?

Bernd Harries
2001-09-29T07:31:52Z

"Eric W. Biederman" wrote:

> Ouch. This is where I give you the standard recommendation. If you
> do this scatter gatter (so you don't need megs of continuous memory)
> you should be much better off, and your driver should be more
> reliable.

Yep, the firmware on the pixel DSP behind the PLX-9054 bridge wants
the base address of a linear 2K * 1K * 2 picture buffer so that it can
trigger the one of the 9054's DMA engines to transfer triangles line
by line into my memory buffer. If I mmap the PCI space to userland, each read
cycle costs 700-900 ns. The DMA engine can use bursts and then a cycle costs
only 29.9 ns of PCI bandwidth.

> All of the other techniques you have used like mmap should
> still apply.

> Also if you are exporting this data to user space, before your DMA
> complets you want to zero the pages you have allocated, so you don't
> have an information leak.

The DMA engine in the PLX 9054 can at least do Write-and-Invalidate cycles to
the Main RAM. :-)

Ciao,
--
Bernd Harries

bha@gmx.de http://www.freeyellow.com/members/bharries
bha@nikocity.de Tel. +49 421 809 7343 priv. | MSB First!
harries@stn-atlas.de +49 421 457 3966 offi. | Linux-m68k
bernd@linux-m68k.org 8.48'21" E 52.48'52" N | Medusa T40