Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp837019rdb; Tue, 19 Sep 2023 11:34:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGK0GuNXqEg86Wvyokgmm5aNdv7XfmJMwk8sEn4sLbgqKosrOQrOjdLTSSCwpcMcBdmWgWA X-Received: by 2002:a17:903:11d1:b0:1c1:e7b2:27af with SMTP id q17-20020a17090311d100b001c1e7b227afmr258491plh.57.1695148443960; Tue, 19 Sep 2023 11:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695148443; cv=none; d=google.com; s=arc-20160816; b=QolY1XTtdN96nWFCudPIivxogS3MRIS5XIm2w1zBxOn/z8OXvpWHglgPjch72pGQnN bHpPMnvt0GbNYwZrDQfw2X5guGAYmqzkA1Ovuj83hOpo2nhNNPq2v9cin5/KiloO4Dq+ 28LnZzbkM/0Okv0rRasLR9SCODfHAzGlshjEBn9wSjZAffLxllj/WqDzauDbjNYKY4pl dT4+r4qtysJ+8pItMc2x4fOxWUd6O5wr7vnavKUUOw38Nyo8bnJJdi9vDtEgOxgJuAFp r5k3ZHXMEp42jFw1uaC+Lh/wdoLoSHtfA9jJmy3IC6gyg15gXBxLmV5ZHmgheY13gFnJ gahA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PUjFUwCVE5/xUduoxjL7lC1W3crAzRPXEbwf2O/yhew=; fh=IxvuNp5bHtxt6ueBjKr96UUYgu03iq+QIyUHWpszgOk=; b=0oGAwmk841o3VHCV+WFINtRoDybbS861zjBBnnViKDKI2dcwBL4eiUbl3luQpdBVe3 tyH2p49nOrFt11z5lyEZAThl316j8qS35UIHI54aO/LjKSnPU6vrjnBJYA/XA2eNpyfJ kiscrLnYqwoOUVcMufNW+l5MjpftSwQjFq24v/+nC9hrTVvqHx954hdMm403e42ICI0S cM5WEsWL7nD5id2fk8GUWiVxYnySj97WSNZZBKd2arYCjutjx4b1kFKwkALJ5LbvpCw7 dtR5tHPMUmrTvU7E7pzfLxSNFCXY5qvQ071bq+gzTPwJefD9T+mihoXK3TsR9SDkPNqQ /siw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IJQRWuVT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id n6-20020a170903110600b001bb1504b696si10496353plh.4.2023.09.19.11.34.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 11:34:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IJQRWuVT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 677E480203DA; Tue, 19 Sep 2023 10:25:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230010AbjISRZn (ORCPT + 99 others); Tue, 19 Sep 2023 13:25:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbjISRZm (ORCPT ); Tue, 19 Sep 2023 13:25:42 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85A579F for ; Tue, 19 Sep 2023 10:25:36 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2c008d8fd07so41497211fa.1 for ; Tue, 19 Sep 2023 10:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1695144335; x=1695749135; darn=vger.kernel.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=IJQRWuVT4GWUyGUYFvpMnG+Mgr+MKOYHZcY4hDVFvtc1yPFOVK7pX08ApSParXpHLy 8aV8hqWNV2c/NIpLAweOm2ZyCQXZOuCGna1apzIJXQA4U+rZD5Dq/LoO3iR6KzZwIiM0 tn0UyfYpSj5rmmcwj2E2KD7BwbTlvdeeW89ow= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695144335; x=1695749135; 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=DbFOGrP7v5CK1kLuARxt7PZ0H+gt2UGsnAXCSP0Tjen02/Y5GZGCht6EArKDWP4mIZ xFDlni2dssfxV8cti2PR4c8ojQV5B0cvIHtf1BqdktUZkfq7irjB63MGsuqiBWU1JT8c YxLghluWsnj7Z2jnwqUaF5EBkvY1tcqEue0lO/SIGwc5aLlUs9luQAXYHJuJaYVSqU+F 7WGoBv8QvN7sswYkMKTeBzktdUpfiPk/ka6Nrmd3nv4Yjq9/ZIzs0nsGHtk2Nk+nZ2Ph IkARUI66X+XJESzhA9nRyI1HrG7hMjqLZDJmEzxrH3J+aiAvoo8TojyGEkqfsGnAO4lc ET3w== X-Gm-Message-State: AOJu0YztmOEnZ0SMcLpi6p7GFjMG6j6qUhkpZY1qPPQ1ue3ABAcg6u/v xGi/huSYsxUZ4a1V0KoCdp7LOA/FApBn4NXcpDljFry0 X-Received: by 2002:a2e:8084:0:b0:2c0:302d:f995 with SMTP id i4-20020a2e8084000000b002c0302df995mr116672ljg.1.1695144334706; Tue, 19 Sep 2023 10:25:34 -0700 (PDT) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com. [209.85.167.54]) by smtp.gmail.com with ESMTPSA id q16-20020a2e9150000000b002c02bccfb5esm381535ljg.77.2023.09.19.10.25.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Sep 2023 10:25:34 -0700 (PDT) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-502e7d66c1eso9430168e87.1 for ; Tue, 19 Sep 2023 10:25: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-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 19 Sep 2023 10:25:45 -0700 (PDT) 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