From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com ([134.134.136.100]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fR1k5-0004BK-Jq for speck@linutronix.de; Thu, 07 Jun 2018 22:42:46 +0200 Date: Thu, 7 Jun 2018 13:42:43 -0700 From: Andi Kleen Subject: [MODERATED] Re: [patch V2 00/12] cpu/hotplug: SMT control Message-ID: <20180607204243.GG7220@tassilo.jf.intel.com> References: <20180606192714.754943543@linutronix.de> <20180606231622.GD7220@tassilo.jf.intel.com> MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Thu, Jun 07, 2018 at 08:50:14AM +0200, speck for Thomas Gleixner wrote: > On Wed, 6 Jun 2018, speck for Andi Kleen wrote: > > On Wed, Jun 06, 2018 at 09:27:14PM +0200, speck for Thomas Gleixner wrote: > > > The following series is a reworked version of the initial proof of concept > > > patch. The main changes are: > > > > I still think it's pointless to add so much kernel code for something > > that can be done with a straight forward user script at run time > > using existing APIs. > > > > We need strong justifications to add new kernel APIs. > > > > https://raw.githubusercontent.com/andikleen/pmu-tools/master/cputop.py > > It can be done with 3 lines of bash as well. I don't think so because you need to read the topology. There are systems which have a different order of logical CPUs. > But it does neither work from the kernel command line nor does it provide > protections against re-online And why is that needed? Who onlines random CPUs? > nor full enforcement. What's the point of full enforcement? It only makes sense if you run untrusted guest. I cannot think of a credible scenario where it makes sense. > Sure it adds the massive amount of 225 lines including comments and > Documentation, but it's straight forward and works and has it's merits as a > conveniance/testing mechanism as well. IMHO a tool is far more convenient than anything in sysfs. Most people have wrappers anyways because the regist^wsysfs is so complicated these days (at least I always have to grep for the exact paths) Given a command line option is also fairly simple, but IMHO it's not really an use model we should encourage. As Linus said it only really makes sense if you actually run an untrusted guest. So you should only do it when actually do that. Making that decision at boot time is the wrong time. You will just penalize a lot of stuff totally unecessarily. The best usage for the guests is likely core isolation anyways, and I don't see how you can do that from the kernel command line. -Andi