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-ia64/thread_info.h | |
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-ia64/thread_info.h')
-rw-r--r-- | include/asm-ia64/thread_info.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index e5392c4d30c6..8bc9869e5765 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -27,6 +27,7 @@ struct thread_info { | |||
27 | __u32 flags; /* thread_info flags (see TIF_*) */ | 27 | __u32 flags; /* thread_info flags (see TIF_*) */ |
28 | __u32 cpu; /* current CPU */ | 28 | __u32 cpu; /* current CPU */ |
29 | __u32 last_cpu; /* Last CPU thread ran on */ | 29 | __u32 last_cpu; /* Last CPU thread ran on */ |
30 | __u32 status; /* Thread synchronous flags */ | ||
30 | mm_segment_t addr_limit; /* user-level address space limit */ | 31 | mm_segment_t addr_limit; /* user-level address space limit */ |
31 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ | 32 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ |
32 | struct restart_block restart_block; | 33 | struct restart_block restart_block; |
@@ -103,4 +104,8 @@ struct thread_info { | |||
103 | /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ | 104 | /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ |
104 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) | 105 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) |
105 | 106 | ||
107 | #define TS_POLLING 1 /* true if in idle loop and not sleeping */ | ||
108 | |||
109 | #define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) | ||
110 | |||
106 | #endif /* _ASM_IA64_THREAD_INFO_H */ | 111 | #endif /* _ASM_IA64_THREAD_INFO_H */ |