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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8961CC433F5 for ; Fri, 1 Oct 2021 17:48:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70E6F61A10 for ; Fri, 1 Oct 2021 17:48:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354136AbhJARuO (ORCPT ); Fri, 1 Oct 2021 13:50:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232413AbhJARuM (ORCPT ); Fri, 1 Oct 2021 13:50:12 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52703C06177F for ; Fri, 1 Oct 2021 10:48:28 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id s17so36772460edd.8 for ; Fri, 01 Oct 2021 10:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E435VevWHNvFfwzbwrSEsjtgrZwBjPFMUID//rqAmHc=; b=HrAVVITqn8UALvaJMLEFX1IEvob89yUVhXwoNDpJg2aBCxAEgrEksiWwl/Pr+Hxc+3 3RVhXkMCRrBwLVNDhch3zhiHFzIOOlRJ43XQEf2/qVzwZWoM4xh5uiPYcItFTNLYWqgN zJYjgi49ajbjRRiITLovVYrTLgWqIYL+DdavFCwUGZNXs8U2nYCNEZ7zf3dTADSfYOfE dvmto4Slm0JeiFuzCB/HUvabALZvuz1ENrxPhlr87swuBhd8mcRoUFk0X1t9n+u+gkxA S1OAGY5w7NyVZNtD0UqccaAqAJWMZiyKOF0s0xVpbKbwkfTU7fVFJFTTCMfdlK2Q9aAN 1hsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E435VevWHNvFfwzbwrSEsjtgrZwBjPFMUID//rqAmHc=; b=GPD95h2LtaAjq1Zjlm+pYtaZn4T4cVOGeZRRw2AjxsuZhwAoQdrG931xOrUOP0Rjvv /b3bgp/1/n2x1isyXFs/tc+wfw538sTKo2ijsIgd7vxFGGwoyQ++5n6Am5BTtPCyC/3t IDbeMUiyEgf/FuTA7MoWmW3F6zcfRAKkdGuxixAIg8yl0Qc7pSJJ1kb2nAKCULaRev/w JkvE0yV/DbtNjUGPgu6/Gq23q2dbjx54Lp3B2Ug1VeX2xa0DigbRfHaRVWFk6lDKNnoy hc5Pz19DmrbvBWTh6Nt1A6gVVGoL/v1ls8O8wOGmCva1yVa85EfUKms9fLzqMt+eKUUt KVCg== X-Gm-Message-State: AOAM530Y+ZN8F5ukt981IPDThdvbaEF74FfCWXiRjhE4RP3ZamhbIOSL 5jk78w774tDO9cG+gAepMtcY8IGh9huxkcjiEWG8wA== X-Google-Smtp-Source: ABdhPJx2UKqAdOO40LH0YnQG+0frDPf32/9ThPP5PQp8PkBdz4P4kYMJpQVj2Lm4c8EVFOtz5hRi6xe/znckYZs8U8o= X-Received: by 2002:a17:906:3a58:: with SMTP id a24mr7926006ejf.67.1633110506264; Fri, 01 Oct 2021 10:48:26 -0700 (PDT) MIME-Version: 1.0 References: <20210928235635.1348330-1-willmcvicker@google.com> <7766faf8-2dd1-6525-3b9a-8ba790c29cff@canonical.com> In-Reply-To: From: Will McVicker Date: Fri, 1 Oct 2021 10:48:09 -0700 Message-ID: Subject: Re: [PATCH v2 00/12] arm64: Kconfig: Update ARCH_EXYNOS select configs To: Olof Johansson Cc: Geert Uytterhoeven , Saravana Kannan , Krzysztof Kozlowski , Russell King , Catalin Marinas , Will Deacon , Michael Turquette , Stephen Boyd , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Linus Walleij , Alessandro Zummo , Alexandre Belloni , John Stultz , Thomas Gleixner , Lee Jones , "Cc: Android Kernel" , Linux ARM , Linux Kernel Mailing List , linux-samsung-soc , linux-clk , "open list:GPIO SUBSYSTEM" , linux-rtc@vger.kernel.org, Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Fri, Oct 1, 2021 at 10:16 AM Olof Johansson wrote: > > On Fri, Oct 1, 2021 at 9:51 AM Will McVicker wrote: > > > > On Fri, Oct 1, 2021 at 9:00 AM Olof Johansson wrote: > > > > > > On Fri, Oct 1, 2021 at 4:59 AM Geert Uytterhoeven wrote: > > > > > > > > Hi Olof, > > > > > > > > On Fri, Oct 1, 2021 at 7:36 AM Olof Johansson wrote: > > > > > A much more valuable approach would be to work towards being able to > > > > > free up memory by un-probed drivers at the end of boot. That would > > > > > possibly benefit all platforms on all architectures. > > > > > > > > We used to have such a functionality in arch/ppc (not arch/powerpc!), > > > > where code/data could be tagged __prep, __chrp, or __pmac, to put it > > > > in a special section, and to be freed with initdata when unused. It > > > > was removed in v2.6.15[1], as the savings weren't worth the hassle. > > > > In a more fragmented space like arm the memory lost due to alignment > > > > of the sections would be even more substantial. > > > > > > Yeah, the balance between per-platform code size and overall kernel > > > code size shifted over time to a point where it wasn't as meaningful > > > on ppc. > > > > > > > Another problem is to know when is the end of the boot, especially > > > > with deferred probing. > > > > > > Most of this code either has a module_init() or an initcall that > > > actually registers the drivers and/or probes for the platform and does > > > the work. > > > > > > This means you can have a late equivalent hook/initcall that > > > determines whether this path ended up being probed/used. If it wasn't, > > > you can then unregister and flag the corresponding memory to be freed > > > at the end, and would take out the heuristics and guessing on needing > > > to do it automatically from the code path that's doing said freeing. > > > > > > > > > -Olof > > > > First off, I appreciate the constructive conversations and I > > understand the ask here. So I'd like to close the "we don't want this" > > and "this isn't possible" conversation. We have already proven > > downstream that it is in fact possible to modularize these drivers on > > other SoCs (mentioned earlier if you missed it) and I'd like to direct > > the conversation towards verifying/testing here instead of negatively > > arguing about how SoC vendors aren't upstreaming their drivers. I > > think everyone understands that, but unfortunately I have no control > > over that even though I would love everyone to work upstream directly. > > > > I am fine with forcing these drivers to always be enabled in some form > > upstream even though it doesn't really make much sense for a generic > > kernel that will run on Qualcomm, Exynos, Mediatek, (you name it) SoC > > devices. I thought about how to do this yesterday and wasn't able to > > come up with a proper solution that didn't always force this driver to > > be a module when CONFIG_MODULES is enabled. > > This line of reasoning: "I couldn't think of a better option" made us > merge a userspace ABI some time ago that within a few months was > replaced with a better solution. In that case it was the kernel > headers bundling with a build (extending the vmlinux size by a lot), > that seemed to have no concerns about binary growth. Not all that far > after that went in, the BPF folks came up with a solid solution for > CO-RE by introducing BTF, etc. > > So, the argument "I can't think of a better solution" is a local > maxima that we shouldn't settle for if there's a likely better global > maxima available with a bit more time/effort. If we say "this problem > is worth solving but this doesn't seem to be the solution we want to > go for" we might actually be better off long-term. > > > -Olof If the answer is, "we don't have a solution for that" then that's fine. I'm not an expert at Kconfig configurations and am asking if there is already a way to handle this. To me it sounded like there might be a solution already due to this policy of "we don't allow disabling drivers that are essential." I'll wait for Krysztof to respond (or someone who has a potential solution) before I dig into this deeper. --Will 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7947C433F5 for ; Fri, 1 Oct 2021 17:50:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7921C61A10 for ; Fri, 1 Oct 2021 17:50:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7921C61A10 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vDmIgMBY+D2dVydmdW3I1yPq6KDZfwPg4pSTAl6jukU=; b=PhYlYtkm28pjv2 W8nUcQj3k9Am/sx4l0HPi27N6PMmCPgOZ6AciOEDa1njeCQyy+yl8c0FSdFCW8xRKchstXjaUFA1e Ae+7Lxxhzib+bGpf2YFdPlXzpmeVGtU8KGeqtvveN10PoVfse/umSKLVz4+boJX0J/b/7civvkPxr YZT75nMVXbca3a6vSpzqdeo4Zfh2We59y5schwfG59jtSz7IZZ9ZixZawJzlHleaSysT6GyfLB3q5 MlhesoqINtyxkaoOg+GyxA+iY9j76AmGXAspb5hrwPsYhCgpTmzYi2JEMd0aSe96raWVT7zV9sdeH BNa0TDSOvLMMThloqSTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWMe7-0013tD-U6; Fri, 01 Oct 2021 17:48:32 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWMe4-0013sL-3g for linux-arm-kernel@lists.infradead.org; Fri, 01 Oct 2021 17:48:29 +0000 Received: by mail-ed1-x52e.google.com with SMTP id g7so36648899edv.1 for ; Fri, 01 Oct 2021 10:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E435VevWHNvFfwzbwrSEsjtgrZwBjPFMUID//rqAmHc=; b=HrAVVITqn8UALvaJMLEFX1IEvob89yUVhXwoNDpJg2aBCxAEgrEksiWwl/Pr+Hxc+3 3RVhXkMCRrBwLVNDhch3zhiHFzIOOlRJ43XQEf2/qVzwZWoM4xh5uiPYcItFTNLYWqgN zJYjgi49ajbjRRiITLovVYrTLgWqIYL+DdavFCwUGZNXs8U2nYCNEZ7zf3dTADSfYOfE dvmto4Slm0JeiFuzCB/HUvabALZvuz1ENrxPhlr87swuBhd8mcRoUFk0X1t9n+u+gkxA S1OAGY5w7NyVZNtD0UqccaAqAJWMZiyKOF0s0xVpbKbwkfTU7fVFJFTTCMfdlK2Q9aAN 1hsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E435VevWHNvFfwzbwrSEsjtgrZwBjPFMUID//rqAmHc=; b=TTOB3vJE+/X55fI24cbIgtEg0D7urXD1xDFllFtW7UifLlHLFOYV2HGsuasGu8bng8 +y2ckkilHZZFEXeTUstud4hHFf5bZxGzYvoOO0x6OPrbTBSFOTokv3Nb4+dP171G4qMe OQ5JA6t2P9ZWJnwsclpcYZBajiDIrDy5b5vRtux4h3C1vVixGaUDkdNJFLy6oi2OIxUg NfgSW/JqKZTeKpRZV1tRIL9FPIpaFLnq6JjXJH+4fefTDb1A8XFEcOb/MR2EnmQb5NuE F/1DBEg3lR3mRnMDmoNyTUiXWpl3bhSUv0HbyRfE1gLbXXYW83mUYVt2wAmlwxnYnmBr 4OVw== X-Gm-Message-State: AOAM530ZXt3be9MerFOwA4+Xo5LsGmFPyLBBjP+yLyh7+/pVn4MNZxut g3uy1PuYM9Fky8VWh0c6tJmdZmPxpu1FiOCTnJt1Ew== X-Google-Smtp-Source: ABdhPJx2UKqAdOO40LH0YnQG+0frDPf32/9ThPP5PQp8PkBdz4P4kYMJpQVj2Lm4c8EVFOtz5hRi6xe/znckYZs8U8o= X-Received: by 2002:a17:906:3a58:: with SMTP id a24mr7926006ejf.67.1633110506264; Fri, 01 Oct 2021 10:48:26 -0700 (PDT) MIME-Version: 1.0 References: <20210928235635.1348330-1-willmcvicker@google.com> <7766faf8-2dd1-6525-3b9a-8ba790c29cff@canonical.com> In-Reply-To: From: Will McVicker Date: Fri, 1 Oct 2021 10:48:09 -0700 Message-ID: Subject: Re: [PATCH v2 00/12] arm64: Kconfig: Update ARCH_EXYNOS select configs To: Olof Johansson Cc: Geert Uytterhoeven , Saravana Kannan , Krzysztof Kozlowski , Russell King , Catalin Marinas , Will Deacon , Michael Turquette , Stephen Boyd , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Linus Walleij , Alessandro Zummo , Alexandre Belloni , John Stultz , Thomas Gleixner , Lee Jones , "Cc: Android Kernel" , Linux ARM , Linux Kernel Mailing List , linux-samsung-soc , linux-clk , "open list:GPIO SUBSYSTEM" , linux-rtc@vger.kernel.org, Arnd Bergmann X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211001_104828_189258_6CABB42B X-CRM114-Status: GOOD ( 51.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 1, 2021 at 10:16 AM Olof Johansson wrote: > > On Fri, Oct 1, 2021 at 9:51 AM Will McVicker wrote: > > > > On Fri, Oct 1, 2021 at 9:00 AM Olof Johansson wrote: > > > > > > On Fri, Oct 1, 2021 at 4:59 AM Geert Uytterhoeven wrote: > > > > > > > > Hi Olof, > > > > > > > > On Fri, Oct 1, 2021 at 7:36 AM Olof Johansson wrote: > > > > > A much more valuable approach would be to work towards being able to > > > > > free up memory by un-probed drivers at the end of boot. That would > > > > > possibly benefit all platforms on all architectures. > > > > > > > > We used to have such a functionality in arch/ppc (not arch/powerpc!), > > > > where code/data could be tagged __prep, __chrp, or __pmac, to put it > > > > in a special section, and to be freed with initdata when unused. It > > > > was removed in v2.6.15[1], as the savings weren't worth the hassle. > > > > In a more fragmented space like arm the memory lost due to alignment > > > > of the sections would be even more substantial. > > > > > > Yeah, the balance between per-platform code size and overall kernel > > > code size shifted over time to a point where it wasn't as meaningful > > > on ppc. > > > > > > > Another problem is to know when is the end of the boot, especially > > > > with deferred probing. > > > > > > Most of this code either has a module_init() or an initcall that > > > actually registers the drivers and/or probes for the platform and does > > > the work. > > > > > > This means you can have a late equivalent hook/initcall that > > > determines whether this path ended up being probed/used. If it wasn't, > > > you can then unregister and flag the corresponding memory to be freed > > > at the end, and would take out the heuristics and guessing on needing > > > to do it automatically from the code path that's doing said freeing. > > > > > > > > > -Olof > > > > First off, I appreciate the constructive conversations and I > > understand the ask here. So I'd like to close the "we don't want this" > > and "this isn't possible" conversation. We have already proven > > downstream that it is in fact possible to modularize these drivers on > > other SoCs (mentioned earlier if you missed it) and I'd like to direct > > the conversation towards verifying/testing here instead of negatively > > arguing about how SoC vendors aren't upstreaming their drivers. I > > think everyone understands that, but unfortunately I have no control > > over that even though I would love everyone to work upstream directly. > > > > I am fine with forcing these drivers to always be enabled in some form > > upstream even though it doesn't really make much sense for a generic > > kernel that will run on Qualcomm, Exynos, Mediatek, (you name it) SoC > > devices. I thought about how to do this yesterday and wasn't able to > > come up with a proper solution that didn't always force this driver to > > be a module when CONFIG_MODULES is enabled. > > This line of reasoning: "I couldn't think of a better option" made us > merge a userspace ABI some time ago that within a few months was > replaced with a better solution. In that case it was the kernel > headers bundling with a build (extending the vmlinux size by a lot), > that seemed to have no concerns about binary growth. Not all that far > after that went in, the BPF folks came up with a solid solution for > CO-RE by introducing BTF, etc. > > So, the argument "I can't think of a better solution" is a local > maxima that we shouldn't settle for if there's a likely better global > maxima available with a bit more time/effort. If we say "this problem > is worth solving but this doesn't seem to be the solution we want to > go for" we might actually be better off long-term. > > > -Olof If the answer is, "we don't have a solution for that" then that's fine. I'm not an expert at Kconfig configurations and am asking if there is already a way to handle this. To me it sounded like there might be a solution already due to this policy of "we don't allow disabling drivers that are essential." I'll wait for Krysztof to respond (or someone who has a potential solution) before I dig into this deeper. --Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel