Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp31118pxu; Wed, 25 Nov 2020 12:15:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeP64Y8kRvCHaa5ayRnyuA5aHuYlDdgcAu8ClyD445JJ3eNhC0FcEa6gjFrqLtKE5Z5QK1 X-Received: by 2002:a17:906:168e:: with SMTP id s14mr4449018ejd.464.1606335312972; Wed, 25 Nov 2020 12:15:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606335312; cv=none; d=google.com; s=arc-20160816; b=CqkwxMeD0ArAIimxsyxXI0a2LOeZTBfrx9QYxE5BGVfaczXZMieiSaTeQqqwiXx0jn Rhk8veNjmvzd4WXqnr2PNbcVzFdRql0gbWj1BmHJFaPgedIT+9qCQdR79AWYBjen0wed XjMsNCO4USeInClSlDKC2jYI7bahxyP8z0JUBmggMrgSS3sJl6usTGtF4Ci97AWUI4dO 7h6bji/ycthOXM0Q0rwNUYM6SmKO4Ml1l5A440Jn5L4KzlR9nKnCZSWS5wf3TvZoFz+P iIPc3YcbzwgdI0Wtjd3HDNTS/yo+hd7xeMLrq96vZx2fjM6duHO2fL8YnWABJDuk8u92 ijIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2wKI8RYv0bVfSPNfFQE9o0e5gpFpVXfZLwEElJH4yO0=; b=cNNmlz1YNBKGZ7DWwszMgaBhHgkjKiWWG/aCpeNq40SX33u8+mDKPVTH0D4eLhBtJf P+vPsseyyNxCNNSCAaF66kTY9fRySxigjMqdxLPWCu+1Mn/bmEVjPJn2pEZvQvPDX8Jk x7zCjhlne0GME7h2rRz4eNytwKv17U9/izcSjPhhSuzwPAKoGANhlRXZbi80ldRO5jpk fbfYNdnhgWfFsTwYeM2N2wwntDnCb6NcJIOLyHMvXqD1xuhjJQXyO4FqiLYde9jGN8LT hGKP0LXme19oCTnjYIZXB4EsYqx0NCvH6J379vhoIvYx65Cx4PsF1q+0ea30km3AV7Dh J0Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=tOpKgRX3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si1786679ejv.112.2020.11.25.12.14.35; Wed, 25 Nov 2020 12:15:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=tOpKgRX3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727074AbgKYNq1 (ORCPT + 99 others); Wed, 25 Nov 2020 08:46:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbgKYNq1 (ORCPT ); Wed, 25 Nov 2020 08:46:27 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53A77C0613D4 for ; Wed, 25 Nov 2020 05:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2wKI8RYv0bVfSPNfFQE9o0e5gpFpVXfZLwEElJH4yO0=; b=tOpKgRX3Vxp9G/ml5rHjQ5pniU q304QasuZq2zb2+PG4L3X3CdcQNXTuMY10iqXHweVl+FUFRUe58JN9CvlIvd0JpjOWyXiWD8axe85 2pDO/Syn1kseWbz2EyBdvOcPP38npCidwSoaicG49XbFXp0++iSl5ScFvp2vhPOa1ruVW8B49nNv2 jC4tZdCdPrPC5hSJheMQu4QWapOlW5DwY18npU0jukd6Aoegc2EGFrG1AQEKno66yxmthH1LUPfSc KU0ucBdqboha+4Qnj5taQ5F2MIO/LncW6HPXQN/RCBn+Wj7lCRamEx4FkXSmhop7bYgOFkodzLMGs YbBHCn1g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1khv74-00089Q-TE; Wed, 25 Nov 2020 13:45:39 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B5282300DAE; Wed, 25 Nov 2020 14:45:37 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9836A200DF1C9; Wed, 25 Nov 2020 14:45:37 +0100 (CET) Date: Wed, 25 Nov 2020 14:45:37 +0100 From: Peter Zijlstra To: "Joel Fernandes (Google)" Cc: Nishanth Aravamudan , Julien Desfossez , Tim Chen , Vineeth Pillai , Aaron Lu , Aubrey Li , tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, keescook@chromium.org, kerrnel@google.com, Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , vineeth@bitbyteword.org, Chen Yu , Christian Brauner , Agata Gruza , Antonio Gomez Iglesias , graf@amazon.com, konrad.wilk@oracle.com, dfaggioli@suse.com, pjt@google.com, rostedt@goodmis.org, derkling@google.com, benbjiang@tencent.com, Alexandre Chartre , James.Bottomley@hansenpartnership.com, OWeisse@umich.edu, Dhaval Giani , Junaid Shahid , jsbarnes@google.com, chris.hyser@oracle.com, Ben Segall , Josh Don , Hao Luo , Tom Lendacky , Aubrey Li , "Paul E. McKenney" , Tim Chen Subject: Re: [PATCH -tip 31/32] sched: Add a coresched command line option Message-ID: <20201125134537.GA2414@hirez.programming.kicks-ass.net> References: <20201117232003.3580179-1-joel@joelfernandes.org> <20201117232003.3580179-32-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201117232003.3580179-32-joel@joelfernandes.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 17, 2020 at 06:20:01PM -0500, Joel Fernandes (Google) wrote: > Some hardware such as certain AMD variants don't have cross-HT MDS/L1TF > issues. Detect this and don't enable core scheduling as it can > needlessly slow those device down. > > However, some users may want core scheduling even if the hardware is > secure. To support them, add a coresched= option which defaults to > 'secure' and can be overridden to 'on' if the user wants to enable > coresched even if the HW is not vulnerable. 'off' would disable > core scheduling in any case. This is all sorts of wrong, and the reason is because you hard-coded that stupid policy. Core scheduling should always be available on SMT (provided you did that CONFIG_ thing). Even on AMD systems RT tasks might want to claim the core exclusively.