On Tue, 23 Feb 2010, Esben Høgh-Rasmussen wrote:

For the many-cores we are on standard AMD64: Windows and Mac.

I think we would be OK with creating a transform per thread, but it seems particularly wasteful on multi-megabyte CMYK profiles.

If the transform was small, then there is a distinct advantage of a transform per thread which is generated by the using thread. Besides NUMA architectures, there is also the benefit of caching so that if the transform can fit in L2 cache, performance will be tremendously improved. NUMA architectures typically use a "first touch" algorithm for deciding what node to allocate fresh memory on. On AMD Opteron, allocating memory from the right node makes 20-30% of difference. This means that if the "main" thread produces the transforms for the other threads to use, the "main" thread will be 30% faster than the other threads. There is also a significant time penalty if the per-thread transforms need to be prepared serially by one thread.

In most cases we only need to create a few transforms which can be reused, so I don't think this will kill us. But if we can get a better solution we will take it :-)

Certainly there may be advantages if the transform may be shared between threads without locking, and there are very clear advantages if the transforms may be simultaneously generated by multiple threads, or if a transform may be cloned by a thread (into fast local memory) for its use.

Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to