On Mon, 22 Feb 2010, Esben Høgh-Rasmussen wrote:
I updated and it looks good so far, but we will test it quite thoroughly.
Just another quick question (or maybe a feature request): is there a safe
way to apply a transform from several threads without locking?
I guess I can create several transforms and call each from its own thread,
but that may eat up a lot of memory when a large CMYK profile is used.
GraphicsMagick multithreads lcms transforms by creating a transform
for each thread. OpenMP is used for the threading. In most cases
this provides a very good speedup but I have noticed that certain
types of profiles (hopefully rare!) require quite a lot of time to
create a transform, and this causes a problem for performance if the
image is not suitably large.
We anticipate 16 to 32 cores in the not-too-distant-future, and we
currently need to call cmsDoTransform() per line. I hate to take any kind
of lock inside these calls :-/
Definitely locking while using the transform is very bad. If the
system is NUMA (e.g. AMD Opteron) then there would be considerably
more performance if each worker thread created its own transform so
that allocated/initialized memory is "hot" and local for each thread.
I found that lcms1 did not allow that due to thread safety problems.
What architecture does your not-too-distant-future hardware 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