Per process DSCR + somefixes

Alexey Kardashevskiy aik at au1.ibm.com
Wed Feb 2 17:22:59 EST 2011


This is reworked http://patchwork.ozlabs.org/patch/71489/

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:
cpu_has_feature(CPU_FTR_DSCR)
and
BEGIN_FTR_SECTION
END_FTR_SECTION_IFSET(CPU_FTR_DSCR)
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 au1.ibm.com
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: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20110202/91fc131c/attachment.bin>


More information about the Linuxppc-dev mailing list