From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com ([192.55.52.136]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fR1vu-0004OW-4T for speck@linutronix.de; Thu, 07 Jun 2018 22:54:58 +0200 From: Andi Kleen Subject: [MODERATED] [PATCH 0/1] SMTCTL 0 Date: Thu, 7 Jun 2018 13:54:54 -0700 Message-Id: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 To: speck@linutronix.de List-ID: Here's an alternative proposal for SMT disabling. I reimplemented my script as a C tool and put it into tools/* # smtctl --enable # smtctl --disable # smtctl --print Advantages: - No kernel changes (although it would benefit from a minor one, see the commit) - Much easier to use at runtime than opaque sysfs - Encourages the right use model of only switching SMT state when it is actually needed and based on a conscious decision, not unnecessarily or globally. Andi Kleen (1): tools/smtctl: Add smtctl to enable/disable SMT at runtime tools/smtctl/Makefile | 10 ++ tools/smtctl/smtctl.c | 257 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 267 insertions(+) create mode 100644 tools/smtctl/Makefile create mode 100644 tools/smtctl/smtctl.c -- 2.14.3