perf_counter: remove rq->lock usage
Now that all the task runtime clock users are gone, remove the ugly rq->lock usage from perf counters, which solves the nasty deadlock seen when a software task clock counter was read from an NMI overflow context. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> LKML-Reference: <20090406094518.531137582@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
a39d6f2556
commit
849691a6cd
@ -997,26 +997,6 @@ static struct rq *task_rq_lock(struct task_struct *p, unsigned long *flags)
|
||||
}
|
||||
}
|
||||
|
||||
void curr_rq_lock_irq_save(unsigned long *flags)
|
||||
__acquires(rq->lock)
|
||||
{
|
||||
struct rq *rq;
|
||||
|
||||
local_irq_save(*flags);
|
||||
rq = cpu_rq(smp_processor_id());
|
||||
spin_lock(&rq->lock);
|
||||
}
|
||||
|
||||
void curr_rq_unlock_irq_restore(unsigned long *flags)
|
||||
__releases(rq->lock)
|
||||
{
|
||||
struct rq *rq;
|
||||
|
||||
rq = cpu_rq(smp_processor_id());
|
||||
spin_unlock(&rq->lock);
|
||||
local_irq_restore(*flags);
|
||||
}
|
||||
|
||||
void task_rq_unlock_wait(struct task_struct *p)
|
||||
{
|
||||
struct rq *rq = task_rq(p);
|
||||
|
Reference in New Issue
Block a user