diff options
author | Peter Zijlstra <peterz@infradead.org> | 2008-07-18 12:01:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-20 04:37:28 -0400 |
commit | 31656519e132f6612584815f128c83976a9aaaef (patch) | |
tree | 595349fdcd65988d7a43d647594dcea8a8a4e80b /include/asm-x86/thread_info.h | |
parent | 577b4a58d2e74a4d48050eeea3e3f952ce04eb86 (diff) |
sched, x86: clean up hrtick implementation
random uvesafb failures were reported against Gentoo:
http://bugs.gentoo.org/show_bug.cgi?id=222799
and Mihai Moldovan bisected it back to:
> 8f4d37ec073c17e2d4aa8851df5837d798606d6f is first bad commit
> commit 8f4d37ec073c17e2d4aa8851df5837d798606d6f
> Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Date: Fri Jan 25 21:08:29 2008 +0100
>
> sched: high-res preemption tick
Linus suspected it to be hrtick + vm86 interaction and observed:
> Btw, Peter, Ingo: I think that commit is doing bad things. They aren't
> _incorrect_ per se, but they are definitely bad.
>
> Why?
>
> Using random _TIF_WORK_MASK flags is really impolite for doing
> "scheduling" work. There's a reason that arch/x86/kernel/entry_32.S
> special-cases the _TIF_NEED_RESCHED flag: we don't want to exit out of
> vm86 mode unnecessarily.
>
> See the "work_notifysig_v86" label, and how it does that
> "save_v86_state()" thing etc etc.
Right, I never liked having to fiddle with those TIF flags. Initially I
needed it because the hrtimer base lock could not nest in the rq lock.
That however is fixed these days.
Currently the only reason left to fiddle with the TIF flags is remote
wakeups. We cannot program a remote cpu's hrtimer. I've been thinking
about using the new and improved IPI function call stuff to implement
hrtimer_start_on().
However that does require that smp_call_function_single(.wait=0) works
from interrupt context - /me looks at the latest series from Jens - Yes
that does seem to be supported, good.
Here's a stab at cleaning this stuff up ...
Mihai reported test success as well.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Mihai Moldovan <ionic@ionic.de>
Cc: Michal Januszewski <spock@gentoo.org>
Cc: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/thread_info.h')
-rw-r--r-- | include/asm-x86/thread_info.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h index 895339d2bc0b..d7012634ace4 100644 --- a/include/asm-x86/thread_info.h +++ b/include/asm-x86/thread_info.h | |||
@@ -81,7 +81,6 @@ struct thread_info { | |||
81 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ | 81 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ |
82 | #define TIF_SECCOMP 8 /* secure computing */ | 82 | #define TIF_SECCOMP 8 /* secure computing */ |
83 | #define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */ | 83 | #define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */ |
84 | #define TIF_HRTICK_RESCHED 11 /* reprogram hrtick timer */ | ||
85 | #define TIF_NOTSC 16 /* TSC is not accessible in userland */ | 84 | #define TIF_NOTSC 16 /* TSC is not accessible in userland */ |
86 | #define TIF_IA32 17 /* 32bit process */ | 85 | #define TIF_IA32 17 /* 32bit process */ |
87 | #define TIF_FORK 18 /* ret_from_fork */ | 86 | #define TIF_FORK 18 /* ret_from_fork */ |
@@ -108,7 +107,6 @@ struct thread_info { | |||
108 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 107 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
109 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 108 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
110 | #define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY) | 109 | #define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY) |
111 | #define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED) | ||
112 | #define _TIF_NOTSC (1 << TIF_NOTSC) | 110 | #define _TIF_NOTSC (1 << TIF_NOTSC) |
113 | #define _TIF_IA32 (1 << TIF_IA32) | 111 | #define _TIF_IA32 (1 << TIF_IA32) |
114 | #define _TIF_FORK (1 << TIF_FORK) | 112 | #define _TIF_FORK (1 << TIF_FORK) |
@@ -132,7 +130,7 @@ struct thread_info { | |||
132 | 130 | ||
133 | /* Only used for 64 bit */ | 131 | /* Only used for 64 bit */ |
134 | #define _TIF_DO_NOTIFY_MASK \ | 132 | #define _TIF_DO_NOTIFY_MASK \ |
135 | (_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY|_TIF_HRTICK_RESCHED) | 133 | (_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY) |
136 | 134 | ||
137 | /* flags to check in __switch_to() */ | 135 | /* flags to check in __switch_to() */ |
138 | #define _TIF_WORK_CTXSW \ | 136 | #define _TIF_WORK_CTXSW \ |