Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 21 Jun 2018 11:22:42 -0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fVxfl-0005a6-7p for speck@linutronix.de; Thu, 21 Jun 2018 13:22:41 +0200 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVxfg-0006Yp-9c for speck@linutronix.de; Thu, 21 Jun 2018 11:22:37 +0000 Date: Thu, 21 Jun 2018 13:22:34 +0200 From: Peter Zijlstra Subject: [MODERATED] Re: [patch V2 01/12] sched/smt: Update sched_smt_present at runtime Message-ID: <20180621112234.GY2494@hirez.programming.kicks-ass.net> References: <20180606192714.754943543@linutronix.de> <20180606192807.014995293@linutronix.de> <20180611183508.GA25607@char.us.oracle.com> MIME-Version: 1.0 In-Reply-To: <20180611183508.GA25607@char.us.oracle.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Mon, Jun 11, 2018 at 02:35:08PM -0400, speck for Konrad Rzeszutek Wilk wrote: > > +#ifdef CONFIG_SCHED_SMT > > + /* > > + * We can't rely on the sched domains themselves to reliably inform us > > + * of SMT, but if we ever see a CPU with siblings pass by, enable the > > + * SMT code. > > + * > > + * The failure case for domains is when we boot with SMT disabled, then > > + * create partitions that split all cores and then hotplug the > > Don't you nee to first hotplug the siblings, then create the partitions? Not with things like isolcpus. Suppose 0-9 are SMT0 and 10-19 are SMT1 and boot with isolcpus=10-19. The actual sched domains that result from that will not contain a complete core and thus would not enable the key. I'm not entirely sure if the scenario from the comment is possible; that would require cpusets to be created for offline CPUs. But the basic point remains the same, it is possible to construct domains such that no single core is 'complete' and it will thus not observe SMT (through the domains).