Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1314081ybi; Wed, 17 Jul 2019 13:04:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYwOJIkZw4ZuXdpIf8XQu/fDjgy4pgQBiO031zJXSujxeD5uBB0hpxIIWRf5n2rKAdODP9 X-Received: by 2002:a63:f807:: with SMTP id n7mr44564709pgh.119.1563393859701; Wed, 17 Jul 2019 13:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563393859; cv=none; d=google.com; s=arc-20160816; b=nkdkX4jvKVNUIGVdSod3IQYJgRspMCM/fXqDMSvGxQGOZub69+EQsEJzTEL4qDynJ/ tZ1V4NNo2O4yt8/9iIN3gvdoTk4G09iZBOsxllorlwePIJRSfSllFgzwCkQXX+jsQC58 ge1l0e+VXM01QaLasE4EXtX+NCVxKD7t6x5kEIMh9z2R7nVgY5St4aIoNHKlu7/S29Ux 9UPhZzU9eLpqlo/+K4HkhxhTYM3ZaXtLOx3F1XMe9eCcYfVihnFvMZ5xE+AQ12IbQ4V3 UjZXElZYNN2AV530tUd4zecqJk5IZq+A1I2xcfEDb7J4LhXGP/NyNiq7LZ8T1tGjt3GZ RfYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=3sKNOCo4NJlxII6FAcc6VHbQJWNr3PpBXdqndS6QX1s=; b=buKfNPsZTz5CiRroWC5XyPhOKxW8x6dF9u1f5Va2ezaZi/SwhaUkuXCQOnuuS+YZhP Fbf5jBj6566m3T+FJBGRw25s/JKDI/djeEfcjns/daawdcE0nhlWFRJuQucyzkodxFXh /Tq5LTlllf0ALoRToKhNFbk5/1UObuazhjy+WYmU4Z+ldsLnXI1MaYjfFC98nCjlvJeW WxWNW0PdLx7zCuF2GrNj83Q37TEUTeycgCW2W5S8EMmfdBj3kfJ6vU2QqL0P+qfzEWSQ tlB8sgA9+SxPC6s3Wl1gJfU3kFXoBK95yW/iNkEbxlEModWSCjjMbQ0BMCkg0hkouH9I 6OfQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si17771121pls.183.2019.07.17.13.04.03; Wed, 17 Jul 2019 13:04:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727419AbfGQUCA (ORCPT + 99 others); Wed, 17 Jul 2019 16:02:00 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:54983 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbfGQUB7 (ORCPT ); Wed, 17 Jul 2019 16:01:59 -0400 Received: from pd9ef1cb8.dip0.t-ipconnect.de ([217.239.28.184] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hnq7b-0003TQ-D4; Wed, 17 Jul 2019 22:01:51 +0200 Date: Wed, 17 Jul 2019 22:01:49 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds cc: LKML , Andrew Morton , Greg Kroah-Hartman , Ingo Molnar , Peter Zijlstra , Steven Rostedt , Sebastian Siewior , Paul McKenney , Christoph Hellwig , Tejun Heo , Lukas Bulwahn , Daniel Wagner , Tom Zanussi , Daniel Bristot de Oliveira , Clark Williams , Julia Cartwright , Marc Zyngier , Frederic Weisbecker , Gratian Crisan Subject: [patch V2 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT In-Reply-To: <20190715150601.205143057@linutronix.de> Message-ID: References: <20190715150402.798499167@linutronix.de> <20190715150601.205143057@linutronix.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Acked-by: Marc Zyngier Acked-by: Daniel Wagner --- V2: Fix typos in help text, collect acks --- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) --- a/arch/Kconfig +++ b/arch/Kconfig @@ -809,6 +809,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 --- 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