-----Original Message-----
From: Bob Friesenhahn [mailto:bfrie...@simple.dallas.tx.us] 
Sent: 22. februar 2010 18:52

>> 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

Hi Bob,

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.

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


Regards,

Esben Høgh-Rasmussen Myosotis
Software Engineer
 
Phase One A/S
Roskildevej 39
DK-2000 Frederiksberg
Denmark
Phone: + 45 36 13 12 07
Fax.:    + 45 36 46 02 22
Mobile: + 45 28 51 10 79
E-mail: e...@phaseone.com
www.phaseone.com

------------------------------------------------------------------------------
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