6690928: Use spinning in combination with yields for workstealing termination

Substitute a spin loop for most calls to yield() to reduce the stress on the system.

Reviewed-by: tonyp
This commit is contained in:
Jon Masamitsu 2009-02-08 13:18:01 -08:00
parent 61181babf1
commit 3b5d6a04dd
9 changed files with 116 additions and 4 deletions

View file

@ -1655,6 +1655,13 @@ class CommandLineFlags {
develop(uintx, WorkStealingYieldsBeforeSleep, 1000, \
"Number of yields before a sleep is done during workstealing") \
\
develop(uintx, WorkStealingHardSpins, 4096, \
"Number of iterations in a spin loop between checks on " \
"time out of hard spin") \
\
develop(uintx, WorkStealingSpinToYieldRatio, 10, \
"Ratio of hard spins to calls to yield") \
\
product(uintx, PreserveMarkStackSize, 1024, \
"Size for stack used in promotion failure handling") \
\