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

Bernd Harries (
Sat, 29 Sep 2001 09:32:37 +0200

"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. :-)


Bernd Harries Tel. +49 421 809 7343 priv. | MSB First! +49 421 457 3966 offi. | Linux-m68k 8.48'21" E 52.48'52" N | Medusa T40 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at