Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2781117ybi; Thu, 18 Jul 2019 14:19:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxc+C5CaUa6WQfbwjD5ZCk+qPY2X+sqN//bewWT/Gk4xRzH9qs6KHL76cZztJDoeFQsIcXU X-Received: by 2002:a17:902:e58b:: with SMTP id cl11mr51219069plb.24.1563484744468; Thu, 18 Jul 2019 14:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563484744; cv=none; d=google.com; s=arc-20160816; b=jLWK46T6J0xBaWN0PiSKhOg1PEF4WBivlrIo9A9GhYMqT4Ggoq66bZMM1mXjUtKtZK pDqpzQiTR3yz5bpv/qODtAgCik0FhWjlN5+xvYqX4kSfGrA4m/EvJP6IO6iD673JhZja lDunEi1r/mC5tXrDi/1ljJ/U1QumgfTAnqPND/Oj1g79vRlsZhHTkKVOfm8SYqenyPuj ejIRTrJZaoBLPkK+WpTRdQL7WSLHUYeB7I6NCl248HsVJHSiO4L7Ww7y+dvZw8t3JmR8 kpqS5TSo3MPptdy/dOkuJX6llN+tcYHy3b7xasDDFHBK8l8GO/T3zjIAnc1xte1Mx8Bi EonA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=jz7955kGbyUBLoiWj4srCxrmMGflmpWrYP14eUEMtK4=; b=vnHA9NzWMYT5xiWrcojcrOZ9nQy6p7VM5z8XtCAjyeOmHY9Dcsxye8KvXu2a4QBcPI kClfEYVbY6iZyS3yyYjEeT9oetguoOIs/cDGYnce4GNTL1tWbYr+f7PFKB8aB7Zzw/SV EXENyfEtXhlb9nnt22Q8jzoGsJkNey8SppX/NGkkLxw6MW1JFBpVzmex/QK3cFmiKair 4SdthjuvF6FsGAnlQ5vcMoioqSkhoEUL/52Zd85NdOeG31MKtd/RkWXw6lI5PiIuEj5o via0dFyOZYmdUradMbgmECRHQE2bJSIsEz1IJWFOdJ1MWTZgTEQhN9MlfCi5TNh2hoYq 1gEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=C129nuXc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si768484plu.126.2019.07.18.14.18.48; Thu, 18 Jul 2019 14:19:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=C129nuXc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391319AbfGRVRv (ORCPT + 99 others); Thu, 18 Jul 2019 17:17:51 -0400 Received: from terminus.zytor.com ([198.137.202.136]:38107 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391249AbfGRVRu (ORCPT ); Thu, 18 Jul 2019 17:17:50 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x6ILGHQO2166514 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 18 Jul 2019 14:16:17 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x6ILGHQO2166514 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019061801; t=1563484578; bh=jz7955kGbyUBLoiWj4srCxrmMGflmpWrYP14eUEMtK4=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=C129nuXcuVNQKSK1Hg8+zcaPGaPyE3PmwHSbXRGDb/XxXg2n6CWSrl0cEAGNjLyLz LYHGiNWzOeH1iQsYuuFGvulLnzByQAiWqZ9DUaZ5a/0wNPdc2JMmTfNRzZRe9uk0Dg 40UDbNKJAD7aU94YttCyQ8SXyXcQi7R7XWv95DI/zyxlg1ZWcMd45VEv046E2atosK U1Tv5GcH9e7YKxddKQQzUpELKrG3qjMfWry4kePRVjfowwEjTDp22dpu985RGVNf3+ lsIXL+61z/+cVHBU38w+lz73Gx4pN4YlQh9TyVspczyln57dRZ81qpcr6sQrNJJvTV bmsQIgBE4dYEQ== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x6ILGGNR2166511; Thu, 18 Jul 2019 14:16:16 -0700 Date: Thu, 18 Jul 2019 14:16:16 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Thomas Gleixner Message-ID: Cc: julia@ni.com, tglx@linutronix.de, peterz@infradead.org, paulmck@linux.ibm.com, frederic@kernel.org, linux-kernel@vger.kernel.org, tj@kernel.org, lgoncalv@redhat.com, lukas.bulwahn@gmail.com, bigeasy@linutronix.de, rostedt@goodmis.org, mingo@kernel.org, bristot@redhat.com, tom.zanussi@linux.intel.com, marc.zyngier@arm.com, efault@gmx.de, gratian.crisan@ni.com, williams@redhat.com, hch@lst.de, wagi@monom.org, gregkh@linuxfoundation.org, hpa@zytor.com, akpm@linuxfoundation.org, torvalds@linux-foundation.org Reply-To: akpm@linuxfoundation.org, torvalds@linux-foundation.org, gratian.crisan@ni.com, hch@lst.de, williams@redhat.com, wagi@monom.org, gregkh@linuxfoundation.org, hpa@zytor.com, efault@gmx.de, tom.zanussi@linux.intel.com, marc.zyngier@arm.com, lukas.bulwahn@gmail.com, bigeasy@linutronix.de, rostedt@goodmis.org, mingo@kernel.org, bristot@redhat.com, tj@kernel.org, lgoncalv@redhat.com, linux-kernel@vger.kernel.org, julia@ni.com, tglx@linutronix.de, peterz@infradead.org, paulmck@linux.ibm.com, frederic@kernel.org In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/urgent] sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT Git-Commit-ID: a50a3f4b6a313dc76912bd4ad3b8b4f4b479c801 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=1.2 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_48_96,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, DKIM_VALID_EF,FREEMAIL_FORGED_REPLYTO autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a50a3f4b6a313dc76912bd4ad3b8b4f4b479c801 Gitweb: https://git.kernel.org/tip/a50a3f4b6a313dc76912bd4ad3b8b4f4b479c801 Author: Thomas Gleixner AuthorDate: Wed, 17 Jul 2019 22:01:49 +0200 Committer: Ingo Molnar CommitDate: Thu, 18 Jul 2019 23:10:57 +0200 sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT Add a new entry to the preemption menu which enables the real-time support for the kernel. The choice is only enabled when an architecture supports it. It selects PREEMPT as the RT features depend on it. To achieve that the existing PREEMPT choice is renamed to PREEMPT_LL which select PREEMPT as well. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Paul E. McKenney Acked-by: Steven Rostedt (VMware) Acked-by: Clark Williams Acked-by: Daniel Bristot de Oliveira Acked-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) Acked-by: Marc Zyngier Acked-by: Daniel Wagner Acked-by: Luis Claudio R. Goncalves Acked-by: Julia Cartwright Acked-by: Tom Zanussi Acked-by: Gratian Crisan Acked-by: Sebastian Siewior Cc: Andrew Morton Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Lukas Bulwahn Cc: Mike Galbraith Cc: Tejun Heo Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907172200190.1778@nanos.tec.linutronix.de Signed-off-by: Ingo Molnar --- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index c47b328eada0..ada51f36bd5d 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -801,6 +801,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool n diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index dc0b682ec2d9..fc020c09b7e8 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making @@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc.) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemptible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemptible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT