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


Groups > linux.kernel > #1611546

Re: [PATCH V4 2/2] perf/x86: add sysfs entry to freeze counter on SMI

From Andi Kleen <ak@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH V4 2/2] perf/x86: add sysfs entry to freeze counter on SMI
Date 2017-03-29 06:20 +0200
Message-ID <tqdfs-1u1-3@gated-at.bofh.it> (permalink)
References <tqbdE-8tJ-9@gated-at.bofh.it> <tqbdE-8tJ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> +	if (x86_pmu.attr_freeze_on_smi == val)
> +		return count;
> +
> +	mutex_lock(&freeze_on_smi_mutex);

I don't think the mutex is really needed, but if it was it would 
need to include the previous check too to be atomic.

> +
> +	get_online_cpus();
> +
> +	flip_smm_bit(&val);
> +	smp_call_function(flip_smm_bit, &val, 1);
> +
> +	put_online_cpus();

This is on_each_cpu() 

> +
> +	x86_pmu.attr_freeze_on_smi = val;
> +
> +	mutex_unlock(&freeze_on_smi_mutex);


-Andi

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


Thread

[PATCH V4 2/2] perf/x86: add sysfs entry to freeze counter on SMI kan.liang@intel.com - 2017-03-29 04:10 +0200
  Re: [PATCH V4 2/2] perf/x86: add sysfs entry to freeze counter on SMI Andi Kleen <ak@linux.intel.com> - 2017-03-29 06:20 +0200
  Re: [PATCH V4 2/2] perf/x86: add sysfs entry to freeze counter on  SMI Thomas Gleixner <tglx@linutronix.de> - 2017-03-29 08:10 +0200
  Re: [PATCH V4 2/2] perf/x86: add sysfs entry to freeze counter on SMI Ingo Molnar <mingo@kernel.org> - 2017-03-29 08:30 +0200

csiph-web