From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2D93C4332F for ; Wed, 8 Nov 2023 08:52:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4443280016; Wed, 8 Nov 2023 03:52:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3F4D78D00AD; Wed, 8 Nov 2023 03:52:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2BB5C80016; Wed, 8 Nov 2023 03:52:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 114D68D00AD for ; Wed, 8 Nov 2023 03:52:36 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D005B80311 for ; Wed, 8 Nov 2023 08:52:35 +0000 (UTC) X-FDA: 81434171070.27.E89C0D3 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf16.hostedemail.com (Postfix) with ESMTP id 9C7C1180008 for ; Wed, 8 Nov 2023 08:52:33 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=ogS2QB56; spf=none (imf16.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699433554; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Ew0pjkTaVlRlSlP9yHv6pHGhMc/rPDL4MInWiMJucXU=; b=EUc8IkCZYkM1nIzvHxctZYPuVwikInfsBI2VfdraHVYyFGJG3M8ds+Zo+ZJyG0FCAp1xSy axf3Ii2kWburSR0qubtrPyBYWu88OTES4Qk9L8bt38GYJIRMxA33vjBMiWLnrsJ8Glk08S iF2XCkH+4HWURp2AGtdu874/gwernDY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699433554; a=rsa-sha256; cv=none; b=x119V1VKGi3JeT4s7CMKVvAA2zL2n6dAqMYRPVy6QZsjDr3D1up/37aL/LzywQwAiC6pv+ yeDUypdpYQLUihnM9jzPivKZ4g/CAjFJOq0Y0xUCxtB3W+futHxeaMiSOiqTHe4kmC/R4B EqOUIbsDGefkvmS6CS3FU+ckDTZN0DQ= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=ogS2QB56; spf=none (imf16.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Ew0pjkTaVlRlSlP9yHv6pHGhMc/rPDL4MInWiMJucXU=; b=ogS2QB56Sr7RRY2Q+ZZjJz4fYi wyQJfhGRqsA+LFwTVUe92NlR6V1fCOvnMoVNPyPEOhmhtwBH6a9qoMOi7TAB3j8ZV4Xupuu/iKbH7 RUJPLlSGzMRWHX2d/kBHcstuORZwpB/moRxuf18/L9C6krlo+qzCnIFSgEh687eLEVc7HwIcOZBq9 GpkIYEpk+Rd5vohQFm9FEVpuFZUBGKl/vCvYLBQH7qOUWu9wCFtz+maMwD2sQQhl4w9ylWnal6lgr BTlI1J9NDjIm2ymdUMadaAxGH4AvpeA4qO8/keANPhdOcHCVR3G6R5e3WRJSTqdkIL0ovEjbSH3v4 2v6FAghQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1r0eI0-0000cp-Az; Wed, 08 Nov 2023 08:51:57 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id AAF6130049D; Wed, 8 Nov 2023 09:51:56 +0100 (CET) Date: Wed, 8 Nov 2023 09:51:56 +0100 From: Peter Zijlstra To: Ankur Arora Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@aculab.com, richard@nod.at, mjguzik@gmail.com Subject: Re: [RFC PATCH 00/86] Make the kernel preemptible Message-ID: <20231108085156.GD8262@noisy.programming.kicks-ass.net> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-Rspamd-Queue-Id: 9C7C1180008 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: gndshstosrym4xn7pidsde4w74qaap3p X-HE-Tag: 1699433553-728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IzhlGYvF/fVFM0zNqTcjFfwqDuPIPAgE/8qe5FhvDkptnaUPWI5+5t8QSKxbLQEqIfgZ3JLnQuViKR4PPINHt77mM10v4o/7KXlVdFROTZ6r6uCJhnMBNThIeEQkaHlw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, Nov 07, 2023 at 01:56:46PM -0800, Ankur Arora wrote: > Hi, > > We have two models of preemption: voluntary and full 3, also none (RT is not actually a preemption model). > (and RT which is > a fuller form of full preemption.) It is not in fact a different preemption model, it is the same full preemption, the difference with RT is that it makes a lot more stuff preemptible, but the fundamental preemption model is the same -- full. > In this series -- which is based > on Thomas' PoC (see [1]), we try to unify the two by letting the > scheduler enforce policy for the voluntary preemption models as well. Well, you've also taken out preempt_dynamic for some obscure reason :/ > Please review. > Ankur Arora (86): > Revert "riscv: support PREEMPT_DYNAMIC with static keys" > Revert "sched/core: Make sched_dynamic_mutex static" > Revert "ftrace: Use preemption model accessors for trace header > printout" > Revert "preempt/dynamic: Introduce preemption model accessors" > Revert "kcsan: Use preemption model accessors" > Revert "entry: Fix compile error in > dynamic_irqentry_exit_cond_resched()" > Revert "livepatch,sched: Add livepatch task switching to > cond_resched()" > Revert "arm64: Support PREEMPT_DYNAMIC" > Revert "sched/preempt: Add PREEMPT_DYNAMIC using static keys" > Revert "sched/preempt: Decouple HAVE_PREEMPT_DYNAMIC from > GENERIC_ENTRY" > Revert "sched/preempt: Simplify irqentry_exit_cond_resched() callers" > Revert "sched/preempt: Refactor sched_dynamic_update()" > Revert "sched/preempt: Move PREEMPT_DYNAMIC logic later" > Revert "preempt/dynamic: Fix setup_preempt_mode() return value" > Revert "preempt: Restore preemption model selection configs" > Revert "sched: Provide Kconfig support for default dynamic preempt > mode" > sched/preempt: remove PREEMPT_DYNAMIC from the build version > Revert "preempt/dynamic: Fix typo in macro conditional statement" > Revert "sched,preempt: Move preempt_dynamic to debug.c" > Revert "static_call: Relax static_call_update() function argument > type" > Revert "sched/core: Use -EINVAL in sched_dynamic_mode()" > Revert "sched/core: Stop using magic values in sched_dynamic_mode()" > Revert "sched,x86: Allow !PREEMPT_DYNAMIC" > Revert "sched: Harden PREEMPT_DYNAMIC" > Revert "sched: Add /debug/sched_preempt" > Revert "preempt/dynamic: Support dynamic preempt with preempt= boot > option" > Revert "preempt/dynamic: Provide irqentry_exit_cond_resched() static > call" > Revert "preempt/dynamic: Provide preempt_schedule[_notrace]() static > calls" > Revert "preempt/dynamic: Provide cond_resched() and might_resched() > static calls" > Revert "preempt: Introduce CONFIG_PREEMPT_DYNAMIC" NAK Even if you were to remove PREEMPT_NONE, which should be a separate series, but that isn't on the table at all afaict, removing preempt_dynamic doesn't make sense. You still want the preempt= boot time argument and the /debug/sched/preempt things to dynamically switch between the models. Please, focus on the voluntary thing, gut that and then replace it with the lazy thing, but leave everything else in place. Re dynamic preempt, gutting the current voluntary preemption model means getting rid of the cond_resched and might_resched toggles but you'll gain a switch to kill the lazy stuff.