The Fair Share Scheduler was introduced in Solaris 9 but if it is used to run a JVM with thread priorities enabled, the JVM's attempts to manage thread priorities fail. This is because the JVM uses low-level scheduler interfaces (priocntl(2)) without catering for FSS.
----------
$ priocntl -e -c TS java -XX:+UnlockDiagnosticVMOptions -XX:+UseThreadPriorities -XX:+ThreadPriorityVerbose -version
lwp_priocntl_init: Class=1(TS)...
Thread priority Range: [-60..0]
In create_os_thread, Thread 0x0000000000000002, LWP is 0x0000000000000002
In create_thread, creating a pgc thread
In create_thread, creating a pgc thread
Starting Thread 0x0000000000000003, LWP is 0x0000000000000003, setting priority: 5
set_lwp_class_and_priority(0x0000000000000003@0x0000000000000003 5)
TS: [-60...5] 5->-58
----------
----------
priocntl -e -c FSS java -XX:+UnlockDiagnosticVMOptions -XX:+UseThreadPriorities -XX:+ThreadPriorityVerbose -version
lwp_priocntl_init: Class=3(FSS)...
Unknown scheduling class: FSS ...
In create_os_thread, Thread 0x0000000000000002, LWP is 0x0000000000000002
In create_thread, creating a pgc thread
In create_thread, creating a pgc thread
Starting Thread 0x0000000000000003, LWP is 0x0000000000000003, setting priority: 5
Trying to set priority but init failed, ignoring
Starting Thread 0x0000000000000004, LWP is 0x0000000000000004, setting priority: 5
Trying to set priority but init failed, ignoring
In create_thread, creating a pgc thread
----------
----------
$ priocntl -e -c TS java -XX:+UnlockDiagnosticVMOptions -XX:+UseThreadPriorities -XX:+ThreadPriorityVerbose -version
lwp_priocntl_init: Class=1(TS)...
Thread priority Range: [-60..0]
In create_os_thread, Thread 0x0000000000000002, LWP is 0x0000000000000002
In create_thread, creating a pgc thread
In create_thread, creating a pgc thread
Starting Thread 0x0000000000000003, LWP is 0x0000000000000003, setting priority: 5
set_lwp_class_and_priority(0x0000000000000003@0x0000000000000003 5)
TS: [-60...5] 5->-58
----------
----------
priocntl -e -c FSS java -XX:+UnlockDiagnosticVMOptions -XX:+UseThreadPriorities -XX:+ThreadPriorityVerbose -version
lwp_priocntl_init: Class=3(FSS)...
Unknown scheduling class: FSS ...
In create_os_thread, Thread 0x0000000000000002, LWP is 0x0000000000000002
In create_thread, creating a pgc thread
In create_thread, creating a pgc thread
Starting Thread 0x0000000000000003, LWP is 0x0000000000000003, setting priority: 5
Trying to set priority but init failed, ignoring
Starting Thread 0x0000000000000004, LWP is 0x0000000000000004, setting priority: 5
Trying to set priority but init failed, ignoring
In create_thread, creating a pgc thread
----------
- relates to
-
JDK-8149901 [Solaris] Use of -XX:+UseThreadPriorities crashes fastdebug
- Resolved
-
JDK-6518490 Solaris TS scheduling class anti-starvation facility does not completely avoid starvation
- Closed
-
JDK-8157010 [Solaris] Clean out incorrect usage of library-level thread priority functions
- Closed