Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2597080ybi; Thu, 18 Jul 2019 10:55:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0Pfmt025dOXekqPKWVxi+tjmvvUmNVPQ/lRma2IHXGD1IbeURJSYELQMubTZvGgMkR1g0 X-Received: by 2002:a17:902:b497:: with SMTP id y23mr51667269plr.68.1563472520470; Thu, 18 Jul 2019 10:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563472520; cv=none; d=google.com; s=arc-20160816; b=y+WGGv61pY0rkZbcpj/elEQ3f7RESdZW3RlEnCbE/dfqKc6malcP0N60/Fd2LDmOIA oDQP6P9MqWRuG+/9eJrf0oDtv7d1DeDXsI9TftL3PL9P7kDOEYqDf0Nmbg/8EAaDjV5i 6cJyjHXGrCP3wssmTc63VQe5rf4BxL5xfHc+BxFOFpyDrM0MTH158QNa8XXnh0lIWNg6 GI1vzSbBIZZjlUivvP1Zbbg1Sjndl4XDtwIokcWY9IL7Uzcb2CPmG0WzWiI39AkTuNW6 QEZ+PTQ9Gg60x8ws0jEqAGoSnGCbXofzkzi9udCtSPqXWQdnbGKU+h5j0I2WBYWqYn4X S3kg== 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=rd7QaIB/lsFqGDOjsr5j5Cd14wGMuqN+A1zM18ay75Q=; b=gYhPwt8Dr06l51QR5WL6wEl6DxR+4gG5lMGLcG9HV+1Bj2DmPHlB3rDpEZ4SfUQBMh 0KQFnVc6KhVkA8a2GNVO95mrF7/GDNX9WUsL+nEfQZvnJhtbe4ydeX0hDFRo27ejD/Ea jybRvb6bigLGCozH1A0aF0afnMwXsF50sdI+dgmOwX6AllFYajG/2kdN8mX2gLyXaDjn jZxZYmeimu0grKp5JyuklTchLhpDAETpPEGKLOXJ5QudEfci/udhcgrQgPptYJ1PHmMu sTF3GwKa2UaO1RX9u7r9OpI68Bc/eZn3QD3vuxt9j9ux3H8qipQD4prM4FZfUHLIXQjb bDBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=TEf7btWs; 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 124si240868pgg.581.2019.07.18.10.55.03; Thu, 18 Jul 2019 10:55:20 -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=TEf7btWs; 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 S1728111AbfGRRxx (ORCPT + 99 others); Thu, 18 Jul 2019 13:53:53 -0400 Received: from terminus.zytor.com ([198.137.202.136]:42087 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbfGRRxx (ORCPT ); Thu, 18 Jul 2019 13:53:53 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x6IHqGnW2095808 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 18 Jul 2019 10:52:16 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x6IHqGnW2095808 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019061801; t=1563472338; bh=rd7QaIB/lsFqGDOjsr5j5Cd14wGMuqN+A1zM18ay75Q=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=TEf7btWsYFKQ8RyrcIDUTzoDVWnh+p2HDnsS34X3U0h3xTGMGbgCAsfFBftaCGOQt SCAhkxRxkceZSzzgtGltWbYBJxZBd3Aiu4svsiudcUvtOnKRNZlUwZSxeSE1i8cErH h0kuNojxNo/vKuUYIlYjE2+YwkJeTeu11MayBTo4ftX+q0mZ+jGDhCGbRNYBYnuBWW CWxfn5rCqrLrHeL80kD1K/6p18fhXxt1HA8IXow7Bs4oc4HhKM2sqE8u7rmTYuAhKk iYFhFEDCo3win7WLNTU317jekZEsjBetivip7Js1VsTzhM8YjQV6jR4JWG9RmVBhmx JEtU17K1Kexgw== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x6IHqFRh2095803; Thu, 18 Jul 2019 10:52:15 -0700 Date: Thu, 18 Jul 2019 10:52:15 -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: hpa@zytor.com, gregkh@linuxfoundation.org, tom.zanussi@linux.intel.com, lukas.bulwahn@gmail.com, tglx@linutronix.de, marc.zyngier@arm.com, rostedt@goodmis.org, akpm@linuxfoundation.org, frederic@kernel.org, efault@gmx.de, paulmck@linux.vnet.ibm.com, lgoncalv@redhat.com, linux-kernel@vger.kernel.org, bigeasy@linutronix.de, mingo@kernel.org, bristot@redhat.com, julia@ni.com, gratian.crisan@ni.com, torvalds@linux-foundation.org, clark.williams@gmail.com, wagi@monom.org, williams@redhat.com, tj@kernel.org, paulmck@linux.ibm.com, hch@lst.de, peterz@infradead.org Reply-To: mingo@kernel.org, clark.williams@gmail.com, torvalds@linux-foundation.org, julia@ni.com, gratian.crisan@ni.com, bristot@redhat.com, wagi@monom.org, peterz@infradead.org, hch@lst.de, tj@kernel.org, paulmck@linux.ibm.com, williams@redhat.com, tglx@linutronix.de, marc.zyngier@arm.com, lukas.bulwahn@gmail.com, tom.zanussi@linux.intel.com, gregkh@linuxfoundation.org, hpa@zytor.com, frederic@kernel.org, akpm@linuxfoundation.org, rostedt@goodmis.org, lgoncalv@redhat.com, paulmck@linux.vnet.ibm.com, efault@gmx.de, bigeasy@linutronix.de, linux-kernel@vger.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: a003296b7a97dedccb0c35c4c1e44e088050b8c4 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: a003296b7a97dedccb0c35c4c1e44e088050b8c4 Gitweb: https://git.kernel.org/tip/a003296b7a97dedccb0c35c4c1e44e088050b8c4 Author: Thomas Gleixner AuthorDate: Wed, 17 Jul 2019 22:01:49 +0200 Committer: Ingo Molnar CommitDate: Thu, 18 Jul 2019 19:47:11 +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 Cc: Andrew Morton Cc: Christoph Hellwig Cc: Clark Williams Cc: Gratian Crisan Cc: Greg Kroah-Hartman 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