[PATCH] sched: cleanup context switch locking
Instead of requiring architecture code to interact with the scheduler's locking implementation, provide a couple of defines that can be used by the architecture to request runqueue unlocked context switches, and ask for interrupts to be enabled over the context switch. Also replaces the "switch_lock" used by these architectures with an oncpu flag (note, not a potentially slow bitflag). This eliminates one bus locked memory operation when context switching, and simplifies the task_running function. Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
48c08d3f8f
commit
4866cde064
@ -108,7 +108,6 @@ extern struct group_info init_groups;
|
||||
.blocked = {{0}}, \
|
||||
.alloc_lock = SPIN_LOCK_UNLOCKED, \
|
||||
.proc_lock = SPIN_LOCK_UNLOCKED, \
|
||||
.switch_lock = SPIN_LOCK_UNLOCKED, \
|
||||
.journal_info = NULL, \
|
||||
.cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \
|
||||
}
|
||||
|
Reference in New Issue
Block a user