> In addition, most systems only support loading memory in cache lines.
> IIRC, today most cache lines are 16KB. So when you read a single byte,
> the 16KB around that memory location is loaded as well.

The cache line size on x86 is 32 bytes on 32 bit systems, not 16KB. On
64 bit systems, it's 64 bytes.

> So there's a odd side-effect here. Notice how it locks a whole cache
> line (16KB)? This means that if you allocated 4K atoms from the same
> cache line, swapping one would cause the others to lock during the
> CAS.

Sort of, but this false sharing and subsequent performance degradation
happens whether or not you use CAS to access the items in a cache
line.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to