Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3792122ybz; Tue, 28 Apr 2020 00:05:29 -0700 (PDT) X-Google-Smtp-Source: APiQypIO4m8TKM8tZJhtQ6/0MT0RNc+QkzlrOkLTZh8NGRrTab/UNnF9xhZ8zgepAj1EoGkuW4uR X-Received: by 2002:a50:beca:: with SMTP id e10mr21409254edk.294.1588057529517; Tue, 28 Apr 2020 00:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588057529; cv=none; d=google.com; s=arc-20160816; b=Gx7eV1zylEE2cm+NcTLCF/kKgEEmeiYCGX4Y/tTsXUcZP0irLfvaLLVhvIwD71Y+sl I1go2pC6KP6RS9m/2LNnADOv+4fjdKvO6gcB/E8hg5lDZuX+xurCkoXc1rX+NY/FQfCz iBqLw9fYjz2hEVN4g80O8+hLcs8g7lDRn41i5aWLQoPobYtRNyu2LzEV0K7Fj3gjCoR0 QTUa5pRsqEZ/ISV5HgzkEnDBbv83rtl89HpSLJHcDYAGcjf+GY5Ue1lpyIR9AV4DLWzl NnhM4cE03ObngmBAGFfmDrrxxPZ1NfvvwdomsaOnBdMyurdZbZ1rzet/4T1WN+mVI+vQ nUEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=G6N4yhymXWw02MnYWh1RN32cSvRi2zEAbucISOfq9jw=; b=zJcOYz60Q8k3y+6CDdts+G/KGGBPMJizRp3CIR43isImb1cih0/ISJBjkBivf7iV1v ciu8zEs8UV59tScH+0v6PKTKvMo/xXWiiYQkYymqCQAp46Y+1i+VPVqASsEEdOn5e5wE pTDDwsWQf0LttbEE5jL/iIdWST13Olh+jSyRmCpoXAXXGyH6B9mFXj4+UQN6aP/950Lg vB+5QyuKS3vTVwJYS8zL495Nq3b7zxn6xeU9K/B8fMKuy+q+HVkXH3hHWl9uI+f1sd5j NgHil68ryB7chGfFsEpM8MpZojec4ELiGZTvGzI99dO3/rfGH1vA0GDp4vZ9KQXMaYRp oOrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FM7U1nx8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id os26si1377942ejb.421.2020.04.28.00.05.05; Tue, 28 Apr 2020 00:05:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FM7U1nx8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726489AbgD1HCn (ORCPT + 99 others); Tue, 28 Apr 2020 03:02:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726291AbgD1HCm (ORCPT ); Tue, 28 Apr 2020 03:02:42 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83355C03C1A9 for ; Tue, 28 Apr 2020 00:02:42 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id u127so1551971wmg.1 for ; Tue, 28 Apr 2020 00:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=G6N4yhymXWw02MnYWh1RN32cSvRi2zEAbucISOfq9jw=; b=FM7U1nx8DLUt8iXFnYRZeEmE5PBB81CXDZcjIhnu3C9pEIQDH1sYmmW4CKAumw6woD 0PFg3KtqCTTSA4joplvdQZQiVTk25lFNbGhWErY0NO8dYXVZJC1x7fQjk6fy7IDZOK5w zVYTYMNZ+chlDowzIHoeHtB1tqjclqdzcKft/Ncpm1n6EbLcRYLU3u+GbEzolqfomtu5 Qu5c0PUF2e8pp2RPZFN2mLjLK4sWkwJ5MGNNWE1YcFX9s5m4n0+BeNVKfLoT1FEgpUlL K5+m59hlxZ/MewfAqqxrdlKb+uwiywJkTY+sAgVc4LaQrfwM7hZA7Gpw2MMivwCl/SZE 2Z9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=G6N4yhymXWw02MnYWh1RN32cSvRi2zEAbucISOfq9jw=; b=obsx3/1UoMPleGbzuxxCHRFmpjUHqZZXg0qKaVCe8ZLDgFJdw9fMSlAJkhgx+6SY7Y uoEpHmGQDDQclHbtA2Djqu3FWI8OyhvdQyD1f3WVQaW8yU4Erc5LwF5YwmNA7OdQt4D2 0gsH9KabcRVV8UXi7un9MOlCHbHNyFRsWgDG9hnxB3ehHhOoBjsc78u+VrG/EX1y2JJ9 tvISNIJ2up/NrlgavOAsnUy2EJNIQEV1pri+fNZa9fPdGQq/FuVRoht4G1yQkfTkbo3g YU1R/egceX8C519Jobu59YWlYFbcNh/is+IWBeNigCa4oZFm4WhMhsa4d8MRQbHHE9+A jMkA== X-Gm-Message-State: AGi0PuY5C1ou3ouU6ZEzAfiST3Chn+e+gBLTFE82+SeAoT9ae/4EZ+e8 pNRFg2avBAcQDDI+M8Bosv3hvw== X-Received: by 2002:a1c:a4c2:: with SMTP id n185mr3071256wme.104.1588057360678; Tue, 28 Apr 2020 00:02:40 -0700 (PDT) Received: from [192.168.0.41] (lns-bzn-59-82-252-135-148.adsl.proxad.net. [82.252.135.148]) by smtp.googlemail.com with ESMTPSA id p6sm24029339wrt.3.2020.04.28.00.02.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Apr 2020 00:02:40 -0700 (PDT) Subject: Re: [PATCH 1/2] drivers/clocksource/timer-of: Remove __init markings To: Sandeep Patil Cc: Saravana Kannan , Baolin Wang , Thomas Gleixner , Orson Zhai , Chunyan Zhang , LKML , Android Kernel Team References: <429da47b-ad51-30eb-ff36-b05780c941ba@linaro.org> <573b7d9e-fb5d-5c81-a981-6d965db933f3@linaro.org> <20200427221752.GA166576@google.com> From: Daniel Lezcano Message-ID: <7c508403-3b53-8285-5724-c2bca221b77a@linaro.org> Date: Tue, 28 Apr 2020 09:02:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200427221752.GA166576@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Saravana, On 28/04/2020 00:17, Sandeep Patil wrote: > Hi Daniel, > > On Mon, Apr 27, 2020 at 10:50:24PM +0200, Daniel Lezcano wrote: >> On 27/04/2020 22:12, Saravana Kannan wrote: >>> On Mon, Apr 27, 2020 at 1:09 PM Daniel Lezcano >>> wrote: >>>> >>>> On 27/04/2020 21:04, Saravana Kannan wrote: >>>>> On Mon, Apr 27, 2020 at 10:13 AM Daniel Lezcano >>>>> wrote: >>>>>> >>>>>> On 13/04/2020 04:55, Baolin Wang wrote: >>>>>>> Hi Daniel, >>>>>>> >>>>>>> On Tue, Mar 24, 2020 at 1:59 PM Baolin Wang wrote: >>>>>>>> >>>>>>>> From: Saravana Kannan >>>>>>>> >>>>>>>> This allows timer drivers to be compiled as modules. >>>>>>>> >>>>>>>> Signed-off-by: Saravana Kannan >>>>>>>> Signed-off-by: Baolin Wang >>>>>>> >>>>>>> Do you have any comments for this patch set? Thanks. >>>>>> >>>>>> If my understanding is correct, this patch is part of the GKI picture >>>>>> where hardware drivers are converted to modules. >>>>>> >>>>>> But do we really want to convert timer drivers to modules ? >>>>>> >>>>>> Is the core time framework able to support that (eg. load + unload ) >>>>> >>>>> So this will mainly be used for secondary timers that the system >>>>> supports. Not for the main one that's set up during early boot for >>>>> sched timer to work. For the primary timer during boot up, we still >>>>> expect that to be the default ARM timer and don't want/expect that to >>>>> be a module (it can't be). >>>> >>>> My question is about clockevents_config_and_register() for instance, is >>>> there a function to unregister in the core framework ? >>> >>> We can just have these modules be "permanent" modules that can't be >>> unloaded. They just need to not implement module_exit(). >> >> You are right. >> >> I can understand the goal of making everything as much modular as possible. >> >> But TBH, I have a bad feeling about this. Sounds like GKI will give the >> opportunity to companies to stop upstreaming their drivers and favoring >> fragmentation like what we had several years ago. Not sure it is a good >> thing, especially for upstream SoC support. > > ... and that is a very valid concern too IMO. > > However, the way we see it, as things stand today, we don't even know what > goes into Linux on all android phones out there. We know what we add, as part > of the AOSP kernel, however, what actually runs on the device is normally > about a million lines of code changes on top of what we do. > > So, for the GKI parts, we are doing the following > > 1. Making the peripheral drivers modules also means the GKI must have all the > core framework changes built-in. This gets us the list of core kernel changes > that ship on Android devices so we can work on upstreaming them OR find the > appropriate alternative. For Android, that answers the canonical > - "Where is the use case?" question coming from anyone. > > You can see the list of these out-of-tree changes is growing by the day in > AOSP right now[1]. Its there for everyone to find in exactly *one place*. > Note that, almost all of those patches have been posted on the list already. > That's the first pre-requisite for any change that goes into AOSP kernel[2]. > > 2. Once we have a core kernel that *truly* works on all Android devices, we > will have built up list of changes we want to upstream (or anyone can pick > them from our public tree). Android will still continue to move to newer > kernel versions easily (may be at a difference cadence ..) > > 3. About the incentive for upstream SoC support: As part of GKI, we are not > promising a forever stable kernel<->module interface. We still change it each > year. The *best way* for anyone to have their SoC / peripheral supported is > _still_ "going upstream". In fact, we advertise it as such[2]. The modularity > aspect just brings a much needed flexibility for execution. The flexibility > is needed given the number of stakeholders involved just in the kernel as of > today. (Its a mix of Upstream, Google, SoC manufacturer, device maker and > many other small parts). > > > 4. We also haven't been so keen on the "unloading" of a module. We know there > were subsystems where unloading may not work as expected. Then again, to my > knowledge, nobody has been stress testing with 500+ different modules that > register to all core frameworks being loaded and unloaded at random times. > Even if someone did, we just didn't think its worth the hassle or time at > this moment. Unloading the module didn't buy us anything. (Although, I do get > the point about "correctness" -- so it shouldn't also be obviously broken) That was my understanding of the GKI, thanks for confirming. Putting apart the non-technical aspect of these changes, the benefit I see is the memory usage optimization regarding the single kernel image. With the ARM64 defconfig, multiple platforms and their corresponding drivers are compiled-in. It results in a big kernel image which fails to load because of overlapping on DT load address (or something else). When that is detected, it is fine to adjust the load addresses, otherwise it is painful to narrow down the root cause. In order to prevent this, we have to customize the defconfig each version release. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog