diff options
author | Andi Kleen <ak@suse.de> | 2006-06-26 07:59:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:21 -0400 |
commit | 495ab9c045e1b0e5c82951b762257fe1c9d81564 (patch) | |
tree | f95c376015d340794f64f36fd52f8fa80a1daab7 /include/asm-i386 | |
parent | d9005b52de7bc9b20afa93e06d3e15843bafc12f (diff) |
[PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
During some profiling I noticed that default_idle causes a lot of
memory traffic. I think that is caused by the atomic operations
to clear/set the polling flag in thread_info. There is actually
no reason to make this atomic - only the idle thread does it
to itself, other CPUs only read it. So I moved it into ti->status.
Converted i386/x86-64/ia64 for now because that was the easiest
way to fix ACPI which also manipulates these flags in its idle
function.
Cc: Nick Piggin <npiggin@novell.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Len Brown <len.brown@intel.com>
Signed-off-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, 4 insertions, 3 deletions
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 8420ed12491e..fdbc7f422ea5 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -140,8 +140,7 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
140 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ | 140 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ |
141 | #define TIF_SECCOMP 8 /* secure computing */ | 141 | #define TIF_SECCOMP 8 /* secure computing */ |
142 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | 142 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ |
143 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 143 | #define TIF_MEMDIE 16 |
144 | #define TIF_MEMDIE 17 | ||
145 | 144 | ||
146 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 145 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
147 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 146 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -153,7 +152,6 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
153 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 152 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
154 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 153 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
155 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 154 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
156 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
157 | 155 | ||
158 | /* work to do on interrupt/exception return */ | 156 | /* work to do on interrupt/exception return */ |
159 | #define _TIF_WORK_MASK \ | 157 | #define _TIF_WORK_MASK \ |
@@ -170,6 +168,9 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
170 | * have to worry about atomic accesses. | 168 | * have to worry about atomic accesses. |
171 | */ | 169 | */ |
172 | #define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */ | 170 | #define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */ |
171 | #define TS_POLLING 0x0002 /* True if in idle loop and not sleeping */ | ||
172 | |||
173 | #define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) | ||
173 | 174 | ||
174 | #endif /* __KERNEL__ */ | 175 | #endif /* __KERNEL__ */ |
175 | 176 | ||