On Tue, 2009-05-26 at 23:29 +0200, Thomas Hellström wrote:
> Some hints from other driver development using TTM.
> 
> 1) Writing (lots of data) to write-combined memory is (much) faster than 
> writing to cached memory. Probably due to cache thrashing.
> 2) Writing to uncached memory is dead slow. Are you really using this?

Looking it in detail, probably no; write-combining via PAT is disabled
on non-PIV chips prior to Core 2. (So, Pentium M, etc.) From the dmesg
on my test system:

 PAT WC disabled due to known CPU erratum.

Which is why set_memory_uc() is showing up in my profiles.

But the AGP aperature is separately set write-combining via the MTRRs.
from /proc/mtrr:

reg03: base=0x0d0000000 ( 3328MB), size=  256MB, count=1: write-combining

> 2a) TTM pwrite is not optimized in any way. Needs some work.
> 3) If you're willing to waste some memory, Set up a pre-bound region of 
> AGP memory as a memory region like the openchrome driver does, and 
> manage it like VRAM. This means buffer creation and destruction gets 
> really fast. Ideal for transient buffers.
> 4) Cache buffers for possible reuse for a short time. We've only done 
> this in user-space, but from a resource-management point of view that's 
> better done from kernel space. We haven't tried that.
> 5) User-space sub-allocation. Ideal for small buffers and for 
> accelerated glBitmap type of  operation. Not suitable for big vertex 
> buffers.

Some good ideas there.

- Owen



------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to