Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2369020ybi; Thu, 18 Jul 2019 07:22:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyqHvW0jywCM8pxp12APQb0k8NbhNR7QoPuJBjgrVCfacvRapCICO5j3pZ8+A4fAovDf5z X-Received: by 2002:a63:9249:: with SMTP id s9mr46464788pgn.356.1563459725018; Thu, 18 Jul 2019 07:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563459725; cv=none; d=google.com; s=arc-20160816; b=OnD8g6E3TQUxwPSf9luCzNkx/+zKgaqJE4vyZ8SaDZPHei8AEQP95R85NIWD4Hd/CY PBa5uiythZCxxo2aw16E8jROvvEQrbRdnPxqbLoGpZmWGH/3ua8AldWpCiwZ8xERSpfn qH/OrT4Da1uKgd6efCoN5GkvwyansDYHL8HgaIAJXHdoYFkNtDQhMtRiEK92goA1ODsp Kp/1LdW3PG7ga9jTAa9YF+PUPFL/mg0QDr6uCsCjHN1TML3YdNTVimOkT3dElHPIQ4Zp eX2z1qoBbKOVOKKzmg+hMM7KPw/MMr0JRIsL3hBB4Fj5pqtJbAmbBFfFpgLtiw8pX+Hu CBBw== 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=AmdxMoMzuLsh1qy0WRK6wfOHnIglwr04LEu/wExBCJk=; b=p0OxxgkTTCWxiUbU5sHwYvkbIkNPgZDpBstE2sqwmhinX9tKiDDbB/5QI1Z7kfJpjC Dk6rqlk5R+mN9wrQ2l3ndgPXN2XoKyK9foKNfjW19MNQ+ep8okBTz3iC+ydxtRA+Var+ /uYTQuxOWoMVUo3LUFYGjG0E/s5lQiiioBQWCyZ9DcfylDy/nvTgGJ3N/rd8DNxaKUqx AAB/jlGb2daTRsImm8Y41YtqcZ2sLvHEuMsNTFCtuJc0K9z8L0y0/dIgrst7yTM7hUSh 9Xcd87u4mSdDkOwVPuUbV70An6WkW8TncDzc4U4YcgXWB7BUiHqsb8ofJcNoWstoeWYL nwIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=eTHUdDlV; 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 p20si11471023pgk.158.2019.07.18.07.21.48; Thu, 18 Jul 2019 07:22: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=eTHUdDlV; 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 S2390454AbfGROVE (ORCPT + 99 others); Thu, 18 Jul 2019 10:21:04 -0400 Received: from terminus.zytor.com ([198.137.202.136]:35389 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbfGROVD (ORCPT ); Thu, 18 Jul 2019 10:21:03 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x6IEJMYd2020610 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 18 Jul 2019 07:19:22 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x6IEJMYd2020610 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019061801; t=1563459564; bh=AmdxMoMzuLsh1qy0WRK6wfOHnIglwr04LEu/wExBCJk=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=eTHUdDlVWA4BaJiDpdnnWjxgYZj7R0Lt++CmqqLnGhdTSF9liSeXOyvxajLQOgCrX jj9Y6dNeYCoKkbMesPh/VP5ExdI7etAJSGw8ZpRywymc2VGk30IVxRgG9knCAmgNby uISVteHT2Jcp48WH/RKiS/9e3Np4wMxGeKo3nC8mLra6f7aRHyFNfzBjFGGLyqFrDj RNRa1/ojiblzxusGAX91CRHUdyQ1ZMWfr7eajmeT/HptGK9/LvdC98uavbL1uXebGm yNYDJ+6jiV80M0c4JQklSMUWvY4RORldj49EbmyY6KfqcEFts3Q7sS+qlc/NZtwTIw yt62U2CXTSCWw== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x6IEJLdT2020601; Thu, 18 Jul 2019 07:19:21 -0700 Date: Thu, 18 Jul 2019 07:19:21 -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: paulmck@linux.vnet.ibm.com, williams@redhat.com, frederic@kernel.org, peterz@infradead.org, mingo@kernel.org, rostedt@goodmis.org, hpa@zytor.com, lukas.bulwahn@gmail.com, julia@ni.com, linux-kernel@vger.kernel.org, efault@gmx.de, marc.zyngier@arm.com, bristot@redhat.com, torvalds@linux-foundation.org, tom.zanussi@linux.intel.com, gregkh@linuxfoundation.org, hch@lst.de, bigeasy@linutronix.de, lgoncalv@redhat.com, clark.williams@gmail.com, tj@kernel.org, gratian.crisan@ni.com, wagi@monom.org, paulmck@linux.ibm.com, akpm@linuxfoundation.org, tglx@linutronix.de Reply-To: gratian.crisan@ni.com, tj@kernel.org, clark.williams@gmail.com, lgoncalv@redhat.com, bigeasy@linutronix.de, hch@lst.de, tglx@linutronix.de, akpm@linuxfoundation.org, paulmck@linux.ibm.com, wagi@monom.org, marc.zyngier@arm.com, efault@gmx.de, tom.zanussi@linux.intel.com, gregkh@linuxfoundation.org, torvalds@linux-foundation.org, bristot@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, lukas.bulwahn@gmail.com, julia@ni.com, frederic@kernel.org, williams@redhat.com, paulmck@linux.vnet.ibm.com, rostedt@goodmis.org, mingo@kernel.org, peterz@infradead.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: 2c2ffb925b368a1f00d4ddcc837f830394861d6c 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: 2c2ffb925b368a1f00d4ddcc837f830394861d6c Gitweb: https://git.kernel.org/tip/2c2ffb925b368a1f00d4ddcc837f830394861d6c Author: Thomas Gleixner AuthorDate: Wed, 17 Jul 2019 22:01:49 +0200 Committer: Ingo Molnar CommitDate: Thu, 18 Jul 2019 14:53:32 +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 Cc: Andrew Morton Cc: Christoph Hellwig Cc: Clark Williams Cc: Gratian Crisan Cc: Greg Kroah-Hartman Cc: Julia Cartwright Cc: Linus Torvalds Cc: Lukas Bulwahn Cc: Mike Galbraith Cc: Paul McKenney Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Tejun Heo Cc: Tom Zanussi 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