Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1617750

Re: [PATCH] MIPS: perf: fix deadlock

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH] MIPS: perf: fix deadlock
Date 2017-04-06 11:20 +0200
Message-ID <ttbKc-6Cm-65@gated-at.bofh.it> (permalink)
References <tsT0R-364-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Apr 05, 2017 at 03:14:08PM +0200, Rabin Vincent wrote:

That lock is disgusting... but yes patch looks about right.

I'll leave it to the MIPS people though.

> ---
>  arch/mips/kernel/perf_event_mipsxx.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
> index 8c35b31..9452b02 100644
> --- a/arch/mips/kernel/perf_event_mipsxx.c
> +++ b/arch/mips/kernel/perf_event_mipsxx.c
> @@ -1446,6 +1446,11 @@ static int mipsxx_pmu_handle_shared_irq(void)
>  	HANDLE_COUNTER(0)
>  	}
>  
> +#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
> +	read_unlock(&pmuint_rwlock);
> +#endif
> +	resume_local_counters();
> +
>  	/*
>  	 * Do all the work for the pending perf events. We can do this
>  	 * in here because the performance counter interrupt is a regular
> @@ -1454,10 +1459,6 @@ static int mipsxx_pmu_handle_shared_irq(void)
>  	if (handled == IRQ_HANDLED)
>  		irq_work_run();
>  
> -#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
> -	read_unlock(&pmuint_rwlock);
> -#endif
> -	resume_local_counters();
>  	return handled;
>  }
>  
> -- 
> 2.7.0
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] MIPS: perf: fix deadlock Rabin Vincent <rabin.vincent@axis.com> - 2017-04-05 15:20 +0200
  Re: [PATCH] MIPS: perf: fix deadlock Peter Zijlstra <peterz@infradead.org> - 2017-04-06 11:20 +0200
  Re: [PATCH] MIPS: perf: fix deadlock Ralf Baechle <ralf@linux-mips.org> - 2017-04-10 12:30 +0200

csiph-web