mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: "peterz@infradead.org" <peterz@infradead.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bp@alien8.de" <bp@alien8.de>,
	"acme@kernel.org" <acme@kernel.org>,
	"eranian@google.com" <eranian@google.com>,
	"jolsa@kernel.org" <jolsa@kernel.org>,
	"ak@linux.intel.com" <ak@linux.intel.com>
Subject: RE: [PATCH V3 2/2] perf/x86: add sysfs entry to freeze counter on SMI
Date: Tue, 28 Mar 2017 19:03:07 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1703281901300.3616@nanos> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077536C61D3@SHSMSX103.ccr.corp.intel.com>

On Tue, 28 Mar 2017, Liang, Kan wrote:
> > On Mon, 27 Mar 2017, kan.liang@intel.com wrote:
> > 	put_online_cpus();
> > 
> > Aside of that, when this is set to SMI freeze, what causes a CPU which
> > comes online after that point to set the bit as well? Nothing AFAICT.
> 
> I've patched the intel_pmu_cpu_starting.
> I think it guarantees that the new online CPU is set.

Only when the hotplug protection of the write is in place.....

> @@ -3174,6 +3174,11 @@ static void intel_pmu_cpu_starting(int cpu)
>  
>  	cpuc->lbr_sel = NULL;
>  
> +	if (x86_pmu.attr_freeze_on_smi)
> +		msr_set_bit_on_cpu(cpu, MSR_IA32_DEBUGCTLMSR, DEBUGCTLMSR_FREEZE_WHILE_SMM_BIT);

Can you please use brackets and line breaks?

Thanks,

	tglx

      reply	other threads:[~2017-03-28 17:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 18:30 [PATCH V3 0/2] measure SMI cost (kernel) kan.liang
2017-03-27 18:30 ` [PATCH V3 1/2] x86/msr: add msr_set/clear_bit_on_cpu/cpus access functions kan.liang
2017-03-28  8:36   ` Thomas Gleixner
2017-03-28 17:23     ` Thomas Gleixner
2017-03-28 17:38       ` Liang, Kan
2017-03-28 18:34         ` Thomas Gleixner
2017-03-27 18:30 ` [PATCH V3 2/2] perf/x86: add sysfs entry to freeze counter on SMI kan.liang
2017-03-28  8:42   ` Thomas Gleixner
2017-03-28 13:23     ` Liang, Kan
2017-03-28 17:03       ` Thomas Gleixner [this message]

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=alpine.DEB.2.20.1703281901300.3616@nanos \
    --to=tglx@linutronix.de \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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®