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 /arch/ia64/kernel/process.c | |
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 'arch/ia64/kernel/process.c')
-rw-r--r-- | arch/ia64/kernel/process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 355d57970ba3..b045c279136c 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -272,9 +272,9 @@ cpu_idle (void) | |||
272 | /* endless idle loop with no priority at all */ | 272 | /* endless idle loop with no priority at all */ |
273 | while (1) { | 273 | while (1) { |
274 | if (can_do_pal_halt) | 274 | if (can_do_pal_halt) |
275 | clear_thread_flag(TIF_POLLING_NRFLAG); | 275 | current_thread_info()->status &= ~TS_POLLING; |
276 | else | 276 | else |
277 | set_thread_flag(TIF_POLLING_NRFLAG); | 277 | current_thread_info()->status |= TS_POLLING; |
278 | 278 | ||
279 | if (!need_resched()) { | 279 | if (!need_resched()) { |
280 | void (*idle)(void); | 280 | void (*idle)(void); |