[Gegl-developer] Cache strategy
jcupitt at gmail.com
jcupitt at gmail.com
Tue Jun 16 06:29:20 PDT 2009
2009/6/16 Øyvind Kolås <islewind at gmail.com>:
> Locking mutexes for such accesses, perhaps even over batches of tiles
> when reading/writing a rectangle of pixels I expect to be detrimental
> to performance only if the parallellization is implemented so that the
> threads will be blocking each others access. This should be avoidable.
In my experience, lock/unlock pairs hurt performance even if threads
are not interfering. A lock creates a memory barrier and, even if the
processors are not contending, caches must be synchronised and
flushed. I imagine the overhead varies a lot with the architecture.
Anyway! This is a theoretical concern at the moment I guess.
John
More information about the Gegl-developer
mailing list