Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp982843rdb; Tue, 19 Sep 2023 17:02:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQeILCWr1o0oOPjqrcIdyeGXqIZaapBdXq35km0Fn+upl5uTog25HgfstSvzS1EYNGq0L4 X-Received: by 2002:a05:6a21:7794:b0:14c:def0:db07 with SMTP id bd20-20020a056a21779400b0014cdef0db07mr1017929pzc.34.1695168133548; Tue, 19 Sep 2023 17:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695168133; cv=none; d=google.com; s=arc-20160816; b=KXCpLjTyMFtaRrkzWKSZGaU835W3dhNiHPc2EEpBNVCH+SJa1iGkYq3U9z3AVH+wsF YTtYVBVMfO48Hls3G+EXLia9PyV2aaxqwb5S9vwZWOc0VbiHpX0e3GR9LE1vHSnGBMZT Uz35ZKF9nEHP9BKdbFwCg+QeEEKrT4N3hXIzRu0wONkU/yIRp+S6FkrnJEIgf5vHxlGs GuagJWBcJZpP2oCxOdx/QmRHOMr5ldpGyMYeDtuaW3++7cljTbltd00yI/f4mpGBCVKX fure1Y/VhAryvfQ+17GlOzdnur+VL6HM2l/bmWHKTunTT40AzuX1p9BnrpdFqFDafKAJ J73Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=mKyOmmSSJD2Ws4VR+XqPS/XNP5VPNOwNw6yDdf2ZDQU=; fh=Niy+72CFVNC2bK0/w1kjVxNknXio1nMl4bCxcHNPXsU=; b=f3ep+PK2Mk/3iW/3ndWgOL2rOAwIoGuYwlcO9yli11JhxS4rqEL45bp0wQ1um9MczM LLUUTfZxg+LwyDqPMqrqQoRJEY3w+uX4/+mPk9qYZAnxQ6sbGcz1y2Bs++TWSrIUV3zF tIwGCvfrRPipLvqah+fndEHMFAEpsFgt4FpivLmDoCeOImdXKiSKmqXuXcEehNH66j+s Dga0wbRXhQxTK+5i4EDqISiS5JerjCAVQMyoA46CiZz6hvjuZamS6UpHvxRweEwD3q5w 4wBXkHQNNjODtfZ+aiUXAWdmMMJFazbPFbPdMLDl8S7qb6/nEQGBnWDFkYgPIIXTCiql Boog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xXqJqYUZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="HSw+FE/2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id k34-20020a17090a3ea500b00262ff3a4545si272242pjc.169.2023.09.19.17.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 17:02:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xXqJqYUZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="HSw+FE/2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2BF91801B9EF; Tue, 19 Sep 2023 11:32:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229772AbjISScA (ORCPT + 99 others); Tue, 19 Sep 2023 14:32:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229853AbjISSb6 (ORCPT ); Tue, 19 Sep 2023 14:31:58 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE05997; Tue, 19 Sep 2023 11:31:52 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695148311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mKyOmmSSJD2Ws4VR+XqPS/XNP5VPNOwNw6yDdf2ZDQU=; b=xXqJqYUZla9VpgC4S4ShTGkMIL3gkkhNvGjlWhi5L1gkuz5icUdocjTZfEjeUV9x1XfF1d 9gCf9onnbE0u4V9GNNs47U9xjPBMw2DWytTSoQsodttKIzqkL+7HlaYEWW4FSVqwFkxP9b m3N7cld1jgwk+v3jf2F2vowyOYzbp0oeTYfBdyMg3skppXJK7mZs9rhgY8B0yUaEjzj5rv eNPjV+ty7EkQisVX1wCgp5HdgxQTcki84SeKDSqMlKMRQ4Dwk5yJNMqTIIkjzdPuUEmZXw ZLXZiD6XCNIDxdM95XJgYydUDvKFSGuDWDp3q+ZqWzDj1uSibW0RuXplJpLfmA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695148311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mKyOmmSSJD2Ws4VR+XqPS/XNP5VPNOwNw6yDdf2ZDQU=; b=HSw+FE/2ECBsn8P+jBW//lrHd8c9W9Bxp5rJpQcF0U/qlJOFxqfRtQIDeqJGdvK2cG7ELT v2DdyOFXFBXeLSDg== To: Linus Torvalds , John Paul Adrian Glaubitz Cc: Peter Zijlstra , Matthew Wilcox , 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 Subject: Re: Arches that don't support PREEMPT In-Reply-To: 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> Date: Tue, 19 Sep 2023 20:31:50 +0200 Message-ID: <87pm2eui95.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain 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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 19 Sep 2023 11:32:09 -0700 (PDT) On Tue, Sep 19 2023 at 10:25, Linus Torvalds wrote: > 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. The only thing these architectures should gain is the preempt counter itself, but yes the extra preemption points are not mandatory to have, i.e. we simply do not enable them for the nostalgia club. The removal of cond_resched() might cause latencies, but then I doubt that these museus pieces are used for real work :) Thanks, tglx