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

From: Thomas Gleixner
Date: Mon Nov 17 2014 - 19:31:50 EST

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
> 0xXXXXXX - currently enabled workarounds are the set bits.
> bit 0: workaround for bug#blabla
> bit 1: workaround for bug#1
> bit 2: workaround for bug#2; remember to do <bla> before disabling workaround
> ...
> bits n-63 are reserved, cannot be set and RAZ.

You sure that 64 are enough?

You need to create stable but numbers, i.e. each bug gets a fixed but
number whethr it affects the machine or not. Otherwise you will drive
admins completely nuts.

> This will be issued when user cats the sysfs file.

That might work as well, though you want that to be:





The latter two take a bit number rather than a magic mask.

So while it looks less effort to implement and extend in the first
place I think, that a bit of infrastructure work will make the
explicit scheme I proposed before a no brainer to maintain and extend,
but I cannot judge what's more intuitive to use.



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at