Per process DSCR + somefixes
From: Alexey Kardashevskiy <hidden>
Date: 2011-02-02 06:22:57
Attachments
- dscr.patch [text/x-patch] 6441 bytes · preview
From: Alexey Kardashevskiy <hidden>
Date: 2011-02-02 06:22:57
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@au1.ibm.com notes: Alexey Kardashevskiy/Australia/IBM