diff options
author | Stephane Eranian <eranian@hpl.hp.com> | 2006-07-09 21:12:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-09 21:47:12 -0400 |
commit | b3cf257623fabd8f1ee6700a6d328cc1c5da5a1d (patch) | |
tree | 28b98f21dd108864d2edc11d179cb48c118b2cf8 /include/asm-i386 | |
parent | 09075ef0fd585fb093bb9a6cd1240272114f89cf (diff) |
[PATCH] i386: use thread_info flags for debug regs and IO bitmaps
Use thread info flags to track use of debug registers and IO bitmaps.
- add TIF_DEBUG to track when debug registers are active
- add TIF_IO_BITMAP to track when I/O bitmap is used
- modify __switch_to() to use the new TIF flags
Performance tested on Pentium II, ten runs of LMbench context switch
benchmark (smaller is better:)
before after
avg 3.65 3.39
min 3.55 3.33
Signed-off-by: Stephane Eranian <eranian@hpl.hp.com>
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/thread_info.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 2833fa2c0dd0..54d6d7aea938 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -140,6 +140,8 @@ static inline struct thread_info *current_thread_info(void) | |||
140 | #define TIF_SECCOMP 8 /* secure computing */ | 140 | #define TIF_SECCOMP 8 /* secure computing */ |
141 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | 141 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ |
142 | #define TIF_MEMDIE 16 | 142 | #define TIF_MEMDIE 16 |
143 | #define TIF_DEBUG 17 /* uses debug registers */ | ||
144 | #define TIF_IO_BITMAP 18 /* uses I/O bitmap */ | ||
143 | 145 | ||
144 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 146 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
145 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 147 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -151,6 +153,8 @@ static inline struct thread_info *current_thread_info(void) | |||
151 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 153 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
152 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 154 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
153 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 155 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
156 | #define _TIF_DEBUG (1<<TIF_DEBUG) | ||
157 | #define _TIF_IO_BITMAP (1<<TIF_IO_BITMAP) | ||
154 | 158 | ||
155 | /* work to do on interrupt/exception return */ | 159 | /* work to do on interrupt/exception return */ |
156 | #define _TIF_WORK_MASK \ | 160 | #define _TIF_WORK_MASK \ |
@@ -159,6 +163,9 @@ static inline struct thread_info *current_thread_info(void) | |||
159 | /* work to do on any return to u-space */ | 163 | /* work to do on any return to u-space */ |
160 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) | 164 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) |
161 | 165 | ||
166 | /* flags to check in __switch_to() */ | ||
167 | #define _TIF_WORK_CTXSW (_TIF_DEBUG|_TIF_IO_BITMAP) | ||
168 | |||
162 | /* | 169 | /* |
163 | * Thread-synchronous status. | 170 | * Thread-synchronous status. |
164 | * | 171 | * |