Per process DSCR + somefixes

Alexey Kardashevskiy aik at
Wed Feb 2 17:22:59 EST 2011

This is reworked

Originally there were 4 questions left:

1. /sys/devices/system/cpu/cpu##/dscr
It is left as is.

2. Out of band method of changing the DSCR:
Introduced new /sys/devices/system/cpu/dscr_default and "dscr_inherit" 
flag for a thread's DSCR which is used in copy_thread to decide whether 
to inherit a DSCR value or not.
The "inherit" flag is set when:
- DSCR has been explicitly changed by writing DSCR;
- a parent process has this flag set;
- dscr_default is not 0 at the moment of fork().
In all other cases DSCR remains zero.

3. improve context switch speed.
Done :-)

4. About disabling the feature when there is "no stinking DSCR".
The calls likes:
ensure that DSCR is not accessed on systems which do not support it.

Tested on power5, power6, power7.

Alexey Kardashevskiy
IBM OzLabs, LTC Team

e-mail/sametime: aik at
notes: Alexey Kardashevskiy/Australia/IBM

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dscr.patch
Type: text/x-patch
Size: 6441 bytes
Desc: not available
URL: <>

More information about the Linuxppc-dev mailing list