diff options
author | Anton Blanchard | 2012-09-03 16:51:10 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt | 2012-09-05 16:05:22 +1000 |
commit | 714332858bfd40dcf8f741498336d93875c23aa7 (patch) | |
tree | 5faa8dbdff73f2bc85befa530f2f165dd3001724 /fs/minix/file.c | |
parent | 1021cb268b3025573c4811f1dee4a11260c4507b (diff) |
powerpc: Restore correct DSCR in context switch
During a context switch we always restore the per thread DSCR value.
If we aren't doing explicit DSCR management
(ie thread.dscr_inherit == 0) and the default DSCR changed while
the process has been sleeping we end up with the wrong value.
Check thread.dscr_inherit and select the default DSCR or per thread
DSCR as required.
This was found with the following test case, when running with
more threads than CPUs (ie forcing context switching):
http://ozlabs.org/~anton/junkcode/dscr_default_test.c
With the four patches applied I can run a combination of all
test cases successfully at the same time:
http://ozlabs.org/~anton/junkcode/dscr_default_test.c
http://ozlabs.org/~anton/junkcode/dscr_explicit_test.c
http://ozlabs.org/~anton/junkcode/dscr_inherit_test.c
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org> # 3.0+
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'fs/minix/file.c')
0 files changed, 0 insertions, 0 deletions