[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150519091318.GB17401@codeblueprint.co.uk>
Date: Tue, 19 May 2015 10:13:18 +0100
From: Matt Fleming <matt@...eblueprint.co.uk>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Vikas Shivappa <vikas.shivappa@...ux.intel.com>,
x86@...nel.org, Matt Fleming <matt.fleming@...el.com>,
Will Auld <will.auld@...el.com>,
Kanaka Juvva <kanaka.d.juvva@...el.com>
Subject: Re: [patch 3/6] x86, perf, cqm: Remove pointless spinlock from state
cache
On Tue, 19 May, at 12:00:53AM, Thomas Gleixner wrote:
> struct intel_cqm_state is a strict per cpu cache of the rmid and the
> usage counter. It can never be modified from a remote cpu.
>
> The 3 functions which modify the content: start, stop and del (del
> maps to stop) are called from the perf core with interrupts disabled
> which is enough protection for the per cpu state values.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
> arch/x86/kernel/cpu/perf_event_intel_cqm.c | 17 ++++++-----------
> 1 file changed, 6 insertions(+), 11 deletions(-)
The state locking code was taken from Peter's original patch last year,
so it would be good for him to chime in that this is safe. It's probably
just that it was necessary in Peter's patches but after I refactored
bits I forgot to rip it out.
But yeah, from reading the code again the lock does look entirely
superfluous.
So unless Peter complains,
Acked-by: Matt Fleming <matt.fleming@...el.com>
--
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists