mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Rabin Vincent <rabin.vincent@axis.com>
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org,
	linux-kernel@vger.kernel.org, mingo@redhat.com, acme@kernel.org,
	alexander.shishkin@linux.intel.com,
	Rabin Vincent <rabinv@axis.com>
Subject: Re: [PATCH] MIPS: perf: fix deadlock
Date: Thu, 6 Apr 2017 11:16:04 +0200	[thread overview]
Message-ID: <20170406091604.37poma56ptmcn7de@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1491398048-20083-1-git-send-email-rabin.vincent@axis.com>

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
> 

  reply	other threads:[~2017-04-06  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05 13:14 Rabin Vincent
2017-04-06  9:16 ` Peter Zijlstra [this message]
2017-04-10 10:25 ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170406091604.37poma56ptmcn7de@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mingo@redhat.com \
    --cc=rabin.vincent@axis.com \
    --cc=rabinv@axis.com \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®