Program Priority Registers per ISA 2.06

Ryan Arnold rsa at us.ibm.com
Sat Mar 14 06:34:49 EST 2009


Hi all,

I haven't checked the kernel source in the few weeks since ISA 2.06 was
released but I suspect that the default Program Priority level hasn't
been changed in the kernel yet.

Program Priority:

Per ISA 2.06: Section 3.1 (page 671) titled "Program Priority
Registers", The 'normal' process priority level has changed from "001
medium" to "100 medium low".

There are three levels of priority available to user space and prior to
ISA 2.06 the 'normal' priority is the highest priority.  This is a
relative process priority and 'normal' doesn't immediately set clock
rate to an explicit frequency.

The ISA change simply re-bases 'normal' to the middle of the three
priorities so that user-space can increase or decrease relative program
priority without having to explicitly re-base to `100 medium low'.

This, of course, means that the kernel should implicitly re-base the
priority to the new normal of `100 medium low'.

This change can retroactively benefit applications running on POWER6
hardware and since the default program priority is relative it shouldn't
effect the performance on older hardware.

Sean Curry wrote a patch for GLIBC to increase & decrease thread
priority during lock contention loops, i.e. if you don't get the lock,
decrease priority.  Conversely if you get the lock, increase priority
over the critical section.

We have some data on cost vs. benefits and we'll supply this when the
userspace patch is submitted to GLIBC.  We can present that data here in
the meantime if requested.

Regards,

Ryan S. Arnold
IBM Linux Technology Center
Linux Toolchain development





More information about the Linuxppc-dev mailing list