On Tue, 14 May 2013, Richard Hughes wrote: > >> Are you sharing the same transform (created by one thread), or are you >> creating an independent transform for each thread (ideally created by the >> thread which uses it)? > > One transform shared between threads. I can try to create multiple > transforms (and also in each thread) if you think that will help > things.
With lcms2 it is reasonable (and safe) to create a transform for each thread. Just take care to use the APIs correctly. >> Cache-line effects can be significant if there is accidental cache-line >> sharing (two cores sharing data in the same cache line). Padding structures >> to prevent false-sharing or using an aligned memory allocator can help >> surmount such problems. Cache line issues can be very hardware/OS specific >> and mysterious. > > Which structure is sensitive to the padding? Thanks! Only structures which are updated by thread loops are a concern. I am not thinking of any structure in particular. Memory allocators which try to be memory efficient can get you in trouble if the allocator allocates several structures within the same cache line (this happened to me). The cache line sharing issue occurs when several allocations are in the same cache line. One thread updates its data which "dirties" the cache line so that the thread must re-retrieve the underlying cache line before it can write on it. The fetching of cache lines is very expensive so it is best to make sure that they do not become invalidated due to the writes of some other thread. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user