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 39C88CE79A8 for ; Tue, 19 Sep 2023 17:32:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B0DB46B00A1; Tue, 19 Sep 2023 13:32:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ABE0C6B00A2; Tue, 19 Sep 2023 13:32:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 985216B00A3; Tue, 19 Sep 2023 13:32:39 -0400 (EDT) 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 88A9F6B00A1 for ; Tue, 19 Sep 2023 13:32:39 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3861C1209C3 for ; Tue, 19 Sep 2023 17:32:39 +0000 (UTC) X-FDA: 81254041638.24.BF0EE1B Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by imf11.hostedemail.com (Postfix) with ESMTP id 359154001B for ; Tue, 19 Sep 2023 17:32:36 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=hJidq2bY; dmarc=none; spf=pass (imf11.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.53 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695144757; 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=PUjFUwCVE5/xUduoxjL7lC1W3crAzRPXEbwf2O/yhew=; b=7J4Mzpeba0nscHejOTeJE2inm4AMSgTwsFwcD01lSlcB/G09hiGGZIsK1PFrE9DopRDF9y /64mj/W6K1CcvgWssvsErknmrlJtnTOKYOstNOlst1LRR/ZREXCL1ovNGpbn+J5xQP/8Y/ raiFCNbok7e+tgm7X3hxWBcwLFtK6E8= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=hJidq2bY; dmarc=none; spf=pass (imf11.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.53 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1695144757; a=rsa-sha256; cv=none; b=B4BhrmQdv3s7gi0JC6aIzHTDG/pBKfohpCPQ1qGiasZw/zlsUH7drn7cKPfAQxmSIb4Ov0 xd3BvALi4wlEvLZYn4X1tvsx/wUbybkCR85IlLNYYqypkZH7tdFSYBacL0tX/RhZcFEB+a PVjaKO98iqdPrvkmJqlMBg2rxVfnxIw= Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-502934c88b7so9875077e87.2 for ; Tue, 19 Sep 2023 10:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1695144755; x=1695749555; darn=kvack.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PUjFUwCVE5/xUduoxjL7lC1W3crAzRPXEbwf2O/yhew=; b=hJidq2bYmadkUzXWS1rnzu+xzDgGN0YmVfhZIcnu22R3VF4W1atpTNom0tZWeekvnf JDpv5+AF3iG9cJkrIWqH0ZCZ3ryu9/3ItM+ejMOeAPuFpi1TNS4cUJwFubfGd9kwLGik kKQwpXWz088m+LkChMSVFHADqJ7M2RoXQr5Vk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695144755; x=1695749555; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PUjFUwCVE5/xUduoxjL7lC1W3crAzRPXEbwf2O/yhew=; b=noDyt5bh2HaFHcOGU9wkggOIxZtwBKRJHSSGTqIwhc7vN1+oONy7/KREafq4or/P4h QX9oQLN8T/Ul1n0C6PhcxBDFZYhY7W575FeO10BQ+3OvLABC/jqE1jckB6SRqNGfZrJO D+3i6wEuGzq7fLE5VOnYsGFqcj1WJD6M61lsDA3C8pqXObt6b8EDmGcIAOLtF2359HQ7 Vqf4L0GJy8cfj+t9z6xP6QbVJI+rExDmjXGLf24YXdCJFH6EVWIsZjrS5VPlILWjzgl8 no81SvajUf/FRFtH2Ax+Tt+2Fd0KKz0eCb9YwiwtT7SNN/J0XxylWeSAXbCcibDkp7bJ uBEQ== X-Gm-Message-State: AOJu0YzhAw3ogXo+N3wkYdYX6wkU9lKayIavElEGu5Jy/jJksHusP73P 0u2gjQIH4hELpGW2CEiwtUpbix8g4yfnnV/+gU4JaFwo X-Google-Smtp-Source: AGHT+IFQFfyfWUTm/xKK97Jgv2+/6tY4ORnSwYhGbEPizeW6wBCmpYer76y/0EADzgKmrK6ty4Tk0A== X-Received: by 2002:a05:6512:234f:b0:503:1be5:24ed with SMTP id p15-20020a056512234f00b005031be524edmr308434lfu.44.1695144755035; Tue, 19 Sep 2023 10:32:35 -0700 (PDT) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com. [209.85.221.50]) by smtp.gmail.com with ESMTPSA id q18-20020a056402519200b00530a0ceb4a0sm5956160edd.37.2023.09.19.10.32.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Sep 2023 10:32:34 -0700 (PDT) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-3214cdb4b27so2406851f8f.1 for ; Tue, 19 Sep 2023 10:32:34 -0700 (PDT) X-Received: by 2002:a19:e04b:0:b0:4fe:3724:fdae with SMTP id g11-20020a19e04b000000b004fe3724fdaemr269206lfj.66.1695144333866; Tue, 19 Sep 2023 10:25:33 -0700 (PDT) MIME-Version: 1.0 References: <87zg1u1h5t.fsf@oracle.com> <20230911150410.GC9098@noisy.programming.kicks-ass.net> <87h6o01w1a.fsf@oracle.com> <20230912082606.GB35261@noisy.programming.kicks-ass.net> <87cyyfxd4k.ffs@tglx> <87led2wdj0.ffs@tglx> <0e69f7df80dc5878071deb0d80938138d19de1d1.camel@physik.fu-berlin.de> <20230919134218.GA39281@noisy.programming.kicks-ass.net> In-Reply-To: From: Linus Torvalds Date: Tue, 19 Sep 2023 10:25:17 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Arches that don't support PREEMPT To: John Paul Adrian Glaubitz Cc: Peter Zijlstra , Matthew Wilcox , Thomas Gleixner , Ankur Arora , linux-kernel@vger.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, mgorman@suse.de, rostedt@goodmis.org, 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, Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org, Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org, Brian Cain , linux-hexagon@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , linux-alpha@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 359154001B X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 86eowosxn3hnu8gx9is4gixpj4imgnif X-HE-Tag: 1695144756-524280 X-HE-Meta: U2FsdGVkX1/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CTbZNxEMfr2N8/jt9SzKNufuDIQ8Kqg43LZRjL4FKbJ28IFm2scZTupGsv/BT+dNLvwPCdlmjzzKQ+6s8+DUbX1er4LYO0KvsjQvB8vA9hBu2M9iymjN6ngVCW5H0P1YXPgyeF+ktQH9EaiaWST2zd6gad/ywbogqtbvTVMNs0ur/l3lWTu/x1fn1ZpTKD/GR5jRQLCRRmhN/1qc8x56qdqJRtTwN4PiU4OwadwUZ8UTTIQw8YTgR+VhMEZvfQ4Gl+D1IXkRpwep64bDi5NOs8w5PqN/75H5wFWIVt21/irINQoOdUcy8vWcqn5nAYYlXb2opUbxKTQmjwpTr8GUEs1UrZK34fqhw4otjiKRJOSbmLAt2OBa8wylpHGCFSHUhNVvRgWtc4bf42iiFn5wXesKef0tkV3Zw== 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: On Tue, 19 Sept 2023 at 06:48, John Paul Adrian Glaubitz wrote: > > As Geert poined out, I'm not seeing anything particular problematic with the > architectures lacking CONFIG_PREEMPT at the moment. This seems to be more > something about organizing KConfig files. It can definitely be problematic. Not the Kconfig file part, and not the preempt count part itself. But the fact that it has never been used and tested means that there might be tons of "this architecture code knows it's not preemptible, because this architecture doesn't support preemption". So you may have basic architecture code that simply doesn't have the "preempt_disable()/enable()" pairs that it needs. PeterZ mentioned the generic entry code, which does this for the entry path. But it actually goes much deeper: just do a git grep preempt_disable arch/x86/kernel and then do the same for some other architectures. Looking at alpha, for example, there *are* hits for it, so at least some of the code there clearly *tries* to do it. But does it cover all the required parts? If it's never been tested, I'd be surprised if it's all just ready to go. I do think we'd need to basically continue to support ARCH_NO_PREEMPT - and such architectures migth end up with the worst-cast latencies of only scheduling at return to user space. Linus