Consider Adding Thread Affinity

Ron Pressler ron.pressler at oracle.com
Mon Nov 30 22:36:35 UTC 2020


Virtual threads scheduled by a ForkJoinPool, which is the default scheduler, should exhibit good data
locality, especially with some upcoming changes to ForkJoinPool. If you have a particular benchmark 
that shows an interesting performance difference, please submit it. A benchmark, that presents an 
actual issue and can then be considered for its real-world utility is a better basis for discussion than
speculated behaviour.

— Ron


On 30 November 2020 at 16:53:34, Suminda Sirinath Salpitikorala Dharmasena (sirinath1978m at gmail.com) wrote:

This mainly aims to prevent cache misses as:
- previously cached values of the thread may be in the cache
- threads which share data can be targeted at a given core for better data locality
- ensure threads are planned based on locks are common/shared resource usage which is known to the programmer than OS

I believe this is an important feature to consider for performance.

Suminda


On Mon, 30 Nov 2020 at 21:22, Ron Pressler <ron.pressler at oracle.com> wrote:
Hi.

We have no concrete plans for doing so, but can you, perhaps, explain the use-case and why it’s important?

— Ron


On 27 November 2020 at 14:17:07, Suminda Sirinath Salpitikorala Dharmasena (sirinath1978m at gmail.com) wrote:

Hello,  

Is it possible to consider adding thread affinity to the Thread API?  

Suminda  


More information about the loom-dev mailing list