Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4458712ybi; Mon, 15 Jul 2019 09:12:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjNvTs3hg6tC7z/DejQpqZCGSkZWrdvhg/VHqzyMd5GUdHMID/9Q3o4adyKjWKiFYHnTks X-Received: by 2002:a63:c84d:: with SMTP id l13mr22623179pgi.154.1563207164353; Mon, 15 Jul 2019 09:12:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563207164; cv=none; d=google.com; s=arc-20160816; b=rRd5DbfuZeBisNb3IPB7i6Ymz0rQ1W1hbSI+GmVb6We8mC/prmsr9UnGK0giQjNnyB 8y5vzR96kXDXV/PXhSWvrAXEn1EbCFq+bCFNzpiFtQSTTjBOEoEPo+XZJiFrkeg0GKRD kyv2j0USBIzps7DeiEh7F4CEtPoArRDYWDCV9hU/I86qhgMhSoswjDmvjTC1az+e8MI3 OAw3XlcSanyPGnFsZCFa4D3knjdc2sDrjgyS43MzjcfHJpWFsYDYVSf+6XYDFbq+Odf+ beJkmxQCLAc35nMxc/bbA3KEIZOZkbrTQNMs30ABKpot+tKvyQ6n0NxEfCNFfaWSE10Y lJjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:subject:cc:to :from:date:user-agent:message-id; bh=SvLH3fMM0mC9pAOVtV7YlWIvxI6I4Sn7h5uKmgzvZ2E=; b=gzZcTBVdhxESUBdOJnCCudCPE0SVYtxUOGKyPU8wTXOwPb1m4oSKxf+34e/leQZXaG hk6nTEoDFiNPlzFeAfx/3dD9l+bFGmkRNCxvBkJaon6vm/MSK02qnB/fJbYZrkRHNGBz tiT2ICuqPdYub21EiR1yDPbW1j9d2v7FViMiukBOZN5C2eXh/g09Y8AGxcE7JQrKudVj 0OaLZoZ8lAtQNF1dCdHBtERVR/Wmzz/i2u1n+Yr66W4TuvgJV7Q12MQGGxjbTBLDWvN9 AUNO4kdpntmHfyejU6Kmft249UySw+0PvHhdhu1SDgKjzZ8yRvGmB42PHJCBtc3FUyMJ o22g== 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 v61si15861736plb.191.2019.07.15.09.12.27; Mon, 15 Jul 2019 09:12:44 -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 S1730539AbfGOQMC (ORCPT + 99 others); Mon, 15 Jul 2019 12:12:02 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:48277 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729533AbfGOQMC (ORCPT ); Mon, 15 Jul 2019 12:12:02 -0400 Received: from localhost ([127.0.0.1] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1hn3Zw-0000Hf-QO; Mon, 15 Jul 2019 18:11:52 +0200 Message-Id: <20190715150601.205143057@linutronix.de> User-Agent: quilt/0.65 Date: Mon, 15 Jul 2019 17:04:03 +0200 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 Subject: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT References: <20190715150402.798499167@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 --- 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-preemtible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemtible 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