lkml.org 
[lkml]   [2014]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 11/12] perf/x86: make HT bug workaround conditioned on HT enabled
On Thu, Oct 09, 2014 at 06:34:45PM +0200, Stephane Eranian wrote:

SNIP

> --- a/arch/x86/kernel/cpu/perf_event_intel.c
> +++ b/arch/x86/kernel/cpu/perf_event_intel.c
> @@ -12,6 +12,7 @@
> #include <linux/init.h>
> #include <linux/slab.h>
> #include <linux/export.h>
> +#include <linux/watchdog.h>
>
> #include <asm/cpufeature.h>
> #include <asm/hardirq.h>
> @@ -1811,7 +1812,7 @@ intel_start_scheduling(struct cpu_hw_events *cpuc)
> /*
> * nothing needed if in group validation mode
> */
> - if (cpuc->is_fake)
> + if (cpuc->is_fake || !is_ht_workaround_enabled())
> return;
> /*
> * no exclusion needed
> @@ -1849,8 +1850,9 @@ intel_stop_scheduling(struct cpu_hw_events *cpuc)
> /*
> * nothing needed if in group validation mode
> */
> - if (cpuc->is_fake)
> + if (cpuc->is_fake || !is_ht_workaround_enabled())
> return;


Is it possible to change is_ht_workaround_enabled() result within
intel_start_scheduling and intel_stop_scheduling time frame? like
following would happen:


is_ht_workaround_enabled == 1

intel_start_scheduling -> spin_lock(&excl_cntrs->lock);

# echo 0 > /sys/devices/cpu/ht_bug_workaround

is_ht_workaround_enabled == 0

intel_stop_scheduling -> wont call spin_unlock(&excl_cntrs->lock)


for some reason I can't get HT enabled on my HSW server, so I cannot try ;-)

jirka


\
 
 \ /
  Last update: 2014-10-22 17:41    [W:0.174 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site