RFR (S): 8155232: Augment Workgang to run task with a given number of threads
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Apr 28 11:15:44 UTC 2016
Hi all,
can I have reviews for this small change that eases use of variable
number of threads for a given task?
Instead of longish
size_t new_active_threads = ...
size_t old_active_threads = gang->num_active_threads();
gang->set_active_threads(new_active_threads);
gang->run_task(...);
gang->set_active_threads(old_active_threads);
you can do
gang->run_task_with_threads(..., new_active_threads);
The method treats the existing number of active threads as the maximum
number of threads that may be used.
This is part of an effort to not hold up actual improvements on thread
usage due to trying to change where the number of active threads are
stored. The WorkGang might not be the best place to do so.
I am currently investigating several variants in JDK-8155093.
CR:
https://bugs.openjdk.java.net/browse/JDK-8155232
Webrev:
http://cr.openjdk.java.net/~tschatzl/8155232/webrev/
Testing:
vm.gc, jprt
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list