Hi Rafael,

Rafael Vanoni wrote:
Hi everyone,
I was wondering if someone could help me with a doubt I ran into while reading Solaris Internals. On p802, chapter 16.4, last paragraph, it says that real-time threads don't benefit from scheduling affinity because the implementation is POSIX conformant. I'm not very familiar with what POSIX imposes on scheduling, could someone explain that to me?
When threads in the RT scheduling class become runnable, they are placed on a per CPU partition run queue, that all CPUs in the partition may pull from. This run queue is called the "kp" queue, and is embedded in the cpu partition structure (See definition of CPU partitions on page 165). Even though all CPUs in the partition may take/run the thread sitting on the kp queue, setkpdq() (which is the function that enqueues the thread) will actually try to designate a CPU in the thread's home lgroup as the "chosen" CPU (since it uses NUMA aware disp_lowpri_cpu() to select one), which it will try to preempt a lower priority thread running there. So threads in the RT scheduling class probably will still exhibit affinity for the CPUs in their home lgroup...but depending on the number of other CPUs in the partition, how idle those CPUs, etc...the degree of affinity exhibited may vary.

-Eric
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to