Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5598268pxb; Tue, 16 Feb 2021 02:42:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJydaCjXVaAPh/5fOxFgl6B0n6lBWGbCwYL+Kn4hYPmDgqSKLdF4D2eQFwYAMFy7KGOV+loF X-Received: by 2002:aa7:d9cb:: with SMTP id v11mr6272768eds.153.1613472167677; Tue, 16 Feb 2021 02:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613472167; cv=none; d=google.com; s=arc-20160816; b=wcttU+7ghJcBZMgFZ17mpa6p7H5bO+NUSVe9/Mf52qAz5Y0nLsJV5WZ1iYOYwYAawq s3suonDFhzQ5lzORCA3RSnv0ZFs+yKJBh1ZygJFK/BD1NsgZ/d1DJ66m7r94mgDQeBVo GOsCScEUQ9dbpnpAUPNh9xZ+8hTVW5WeMM3gFznxTCrjm/pQ1FVObSoTRKBIwQ+dttoS LgfXlEJUVfOuUlHodEwnlx3PxBbI68qZjChj1jqIux8hp5e4KRYHx1lhJhoq9XTaWOCr gB2DGDXhJXp0cZ+ifV7i4Q/CalJibCiX0FeWet7oeXr1skOoImACz1WoU+rU4lLcZagw ig7A== 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=gHDXAw/B+mW6hMmWjHJ5AP1o5rqDQiiLPaGpdzXb7Ok=; b=O12mjsT9f6yYspAY66I9YaTMTy28TkH25pdteRUBlOrDSMXudaJ4zjfcnwQwtcHTxd M/aJjQJ4HkPQrFJm/bgxGKL1pBJGWwIG0LORH2dgy/l8+41zgQ9tezTE9hdkFw+RwiBq Uph2xhnIJjuiVLhFtHFOio8dx+OQadQaG0Ju5jgWyT3oaSnx4mTHsCJs7ikQ5fiC+Yj3 k3dcyF/+m+BGOtbfbRGTKdS0OpmYwVqLd3pf9oMCU6me1PlV7rkbr/L6xvUNdTMcAzVD VMLMf7ijUc4htyvkZZuQRpVZm/n+n+hgqf7UxLAM/FHU3Mc+EgAOoK2gcJOKno1YxsiU FdeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=IrZz0SUU; 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 z11si13587463edc.454.2021.02.16.02.42.25; Tue, 16 Feb 2021 02:42:47 -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=IrZz0SUU; 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 S229895AbhBPKk0 (ORCPT + 99 others); Tue, 16 Feb 2021 05:40:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbhBPKkW (ORCPT ); Tue, 16 Feb 2021 05:40:22 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A43DC061574; Tue, 16 Feb 2021 02:39:42 -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=gHDXAw/B+mW6hMmWjHJ5AP1o5rqDQiiLPaGpdzXb7Ok=; b=IrZz0SUU89p9EAXf/KDm2T9Y8B 02nlaxYtoPnJiHmTETta4Bf3i+3soPeGV8+LZhaWOsoU437IWVJrBaglh6jns+blO4c5SNLHbpnpq +7K0zJ0xln6dl30Gx+iKLOLVS3ushnYJ8+O2AuiPgA1AeGN3SAPKLalYqBhI7nZvbbRpjJFCYSOg8 /GAmeX06NVvF47NAblLMIqQkuiIKE/niIioyYGnGuvFeudJePh9zWYfqpsvjZt1W4JM+Uq0d4tv2E I2lzcnfQaaOCQzXpGKqqzM0K6z6yTCYcOQ5yfVtVu4/nZ9GhGnfJLBYLXsFrd0FjOwgZWIzsrkzSY KFr7W4FQ==; 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.94 #2 (Red Hat Linux)) id 1lBxkE-00Gkyh-AG; Tue, 16 Feb 2021 10:38:38 +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 482173059DD; Tue, 16 Feb 2021 11:38:12 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2CBB62058AF24; Tue, 16 Feb 2021 11:38:12 +0100 (CET) Date: Tue, 16 Feb 2021 11:38:12 +0100 From: Peter Zijlstra To: Frederic Weisbecker Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, Mike Galbraith , x86@kernel.org Subject: Re: [tip: sched/core] sched,x86: Allow !PREEMPT_DYNAMIC Message-ID: References: <161296521143.23325.3662179234825253723.tip-bot2@tip-bot2> <20210210141838.GA53130@lothringen> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210210141838.GA53130@lothringen> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 03:18:38PM +0100, Frederic Weisbecker wrote: > Also should we add something like this? I suppose we can do that, but I'd rather have actual numbers to go with it, I don't think the trampolines are really that terrible. > From: Frederic Weisbecker > Date: Wed, 10 Feb 2021 15:11:39 +0100 > Subject: [PATCH] preempt/dynamic: Make PREEMPT_DYNAMIC optional > > In order not to make the small trampoline overhead mandatory for archs > that support HAVE_STATIC_CALL but not HAVE_STATIC_CALL_INLINE, make > PREEMPT_DYNAMIC optional. > > Signed-off-by: Frederic Weisbecker > --- > kernel/Kconfig.preempt | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt > index 416017301660..1fe759677907 100644 > --- a/kernel/Kconfig.preempt > +++ b/kernel/Kconfig.preempt > @@ -40,7 +40,6 @@ config PREEMPT > depends on !ARCH_NO_PREEMPT > select PREEMPTION > select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK > - select PREEMPT_DYNAMIC if HAVE_PREEMPT_DYNAMIC > help > This option reduces the latency of the kernel by making > all kernel code (that is not executing in a critical section) > @@ -83,11 +82,13 @@ config PREEMPTION > select PREEMPT_COUNT > > config PREEMPT_DYNAMIC > - bool > + bool "Override preemption flavour at boot time" > + depends on HAVE_PREEMPT_DYNAMIC && PREEMPT > + default HAVE_STATIC_CALL_INLINE > help > This option allows to define the preemption model on the kernel > - command line parameter and thus override the default preemption > - model defined during compile time. > + command line parameter "preempt=" and thus override the default > + preemption model defined during compile time. > > The feature is primarily interesting for Linux distributions which > provide a pre-built kernel binary to reduce the number of kernel > @@ -99,3 +100,5 @@ config PREEMPT_DYNAMIC > > Interesting if you want the same pre-built kernel should be used for > both Server and Desktop workloads. > + > + Say Y if you have CONFIG_HAVE_STATIC_CALL_INLINE. > -- > 2.25.1 >