Re: [PATCH v3 13/13] perf/x86: add syfs entry to disable HT bug workaround

2014-11-18 Thread Borislav Petkov
On Tue, Nov 18, 2014 at 05:37:26PM +0100, Stephane Eranian wrote: > Does it need to bit a bitmask, as opposed to just a bug number (which could > be implemented as a bitmask)? > > >> enable_workaround: > >>- provide the bit number (of the workaround) to enable the workaround > > > > Right, wri

Re: [PATCH v3 13/13] perf/x86: add syfs entry to disable HT bug workaround

2014-11-18 Thread Stephane Eranian
On Tue, Nov 18, 2014 at 4:43 PM, Borislav Petkov wrote: > On Tue, Nov 18, 2014 at 04:29:59PM +0100, Stephane Eranian wrote: >> I am trying to get a better understanding of this scheme. >> >> status: >> - a summary of what is enabled/disabled? >> - With description (as suggested by Boris)? >>

Re: [PATCH v3 13/13] perf/x86: add syfs entry to disable HT bug workaround

2014-11-18 Thread Borislav Petkov
On Tue, Nov 18, 2014 at 04:29:59PM +0100, Stephane Eranian wrote: > I am trying to get a better understanding of this scheme. > > status: > - a summary of what is enabled/disabled? > - With description (as suggested by Boris)? > - File is readonly > - is that printing a variable length bit

Re: [PATCH v3 13/13] perf/x86: add syfs entry to disable HT bug workaround

2014-11-18 Thread Stephane Eranian
Hi, On Tue, Nov 18, 2014 at 1:31 AM, Thomas Gleixner wrote: > > On Tue, 18 Nov 2014, Borislav Petkov wrote: > > On Tue, Nov 18, 2014 at 12:38:14AM +0100, Thomas Gleixner wrote: > > > Well a bitmask is a pretty indescriptive item as well. Putting my user > > > hat on: Where is the documentation fo

Re: [PATCH v3 13/13] perf/x86: add syfs entry to disable HT bug workaround

2014-11-18 Thread Borislav Petkov
On Tue, Nov 18, 2014 at 05:01:28PM +0200, Maria Dimakopoulou wrote: > OK. We can call it perf_pmu_ht_bug_workaround to make this more > explicit. I think you should consider adding a more generic scheme from the get-go, as Thomas suggested instead of a specific file. We need this hammered out prop

Re: [PATCH v3 13/13] perf/x86: add syfs entry to disable HT bug workaround

2014-11-18 Thread Maria Dimakopoulou
On Tue, Nov 18, 2014 at 1:02 AM, Borislav Petkov wrote: > On Mon, Nov 17, 2014 at 08:07:05PM +0100, Stephane Eranian wrote: >> From: Maria Dimakopoulou >> >> This patch adds a sysfs entry: >> >> /sys/devices/cpu/ht_bug_workaround >> >> to activate/deactivate the PMU HT bug workaround. >> >>

Re: [PATCH v3 13/13] perf/x86: add syfs entry to disable HT bug workaround

2014-11-17 Thread Thomas Gleixner
On Tue, 18 Nov 2014, Borislav Petkov wrote: > On Tue, Nov 18, 2014 at 12:38:14AM +0100, Thomas Gleixner wrote: > > Well a bitmask is a pretty indescriptive item as well. Putting my user > > hat on: Where is the documentation for the bits? > > $ cat /sys/devices/system/cpu/bugs > 0xXX - current

Re: [PATCH v3 13/13] perf/x86: add syfs entry to disable HT bug workaround

2014-11-17 Thread Borislav Petkov
On Tue, Nov 18, 2014 at 12:38:14AM +0100, Thomas Gleixner wrote: > Well a bitmask is a pretty indescriptive item as well. Putting my user > hat on: Where is the documentation for the bits? $ cat /sys/devices/system/cpu/bugs 0xXX - currently enabled workarounds are the set bits. bit 0: workarou

Re: [PATCH v3 13/13] perf/x86: add syfs entry to disable HT bug workaround

2014-11-17 Thread Thomas Gleixner
On Tue, 18 Nov 2014, Borislav Petkov wrote: > On Mon, Nov 17, 2014 at 08:07:05PM +0100, Stephane Eranian wrote: > > From: Maria Dimakopoulou > > > > This patch adds a sysfs entry: > > > > /sys/devices/cpu/ht_bug_workaround > > > > to activate/deactivate the PMU HT bug workaround. > > > > T

Re: [PATCH v3 13/13] perf/x86: add syfs entry to disable HT bug workaround

2014-11-17 Thread Borislav Petkov
On Mon, Nov 17, 2014 at 08:07:05PM +0100, Stephane Eranian wrote: > From: Maria Dimakopoulou > > This patch adds a sysfs entry: > > /sys/devices/cpu/ht_bug_workaround > > to activate/deactivate the PMU HT bug workaround. > > To activate (activated by default): > # echo 1 > /sys/devices/