[concurrency-interest] ThreadLocal vs ProcessorLocal

Aleksey Shipilev aleksey.shipilev at oracle.com
Mon Oct 15 05:24:03 EDT 2012


On 10/15/2012 12:28 PM, Antoine Chambille wrote:
> I agree that manually distributing JVMs on NUMA nodes won't magically
> remove the NUMA effect (by the way I confirm that the performance drop
> we measure with NUMA and a global fork/join pool is around 2X).

Are you by any chance use old FJP which has the global submission lock?
Had you tried to do this with jsr166.jar bootclasspath'ed?

> Oh and while on the subject of leveraging many cores, the newly released
> StampedLock looks like a major contribution. Especially the
> "Unsafe.getXVolatile" unofficial load fence disclosed by Doug that is an
> important building block for software transactional memory and
> multiversion data structures. That was a well-guarded secret ;)

[Captain Obvious mode]
This is a huge can of worms. You should *NOT* rely on this lfence
semantics in production code. Doug is using that transitionally, until
the proper JVM support is provided for these cases.
[/Captain Obvious mode]

-Aleksey.


More information about the Concurrency-interest mailing list