[Intel-gfx] GEM object write
shaohua.li at intel.com
Sun Mar 29 18:19:58 PDT 2009
I recently did some benchmarks with different GEM object write methods
This approach will memory map the gem object to write-back, and then
flush cache to memory. I did a benchmark to compare mapping memory to
write-back (and then clflush cache) and write-combine. In my test,
write-combine is about 3 times faster than the write-back (please try
with attached module). The data is quite stable in my test.
pwrite almost will map gem object to write-combine (if the gem object is
in gtt, and this is almost true in general case), but it adds extra
copy. In my XVMC test, pwrite approach cause 20% performance lost.
this approach will bind gem object to gtt and map object as
write-combine. This is the fastest approach and equal to the performance
without GEM, but the object should be bound to gtt and can't be swapped
out as the mapping is for a device.
Since the real cause of performance lost is the memory mapping type, I
suggest have a new API which is like bo_map_gtt, but don't bind object
to GTT, that is just doing write-combine map. This still has the
unswappable issue, but has a fast API. Any idea?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1451 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/intel-gfx/attachments/20090330/58f328a7/attachment.c
More information about the Intel-gfx