Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3399329ybz; Mon, 27 Apr 2020 15:20:23 -0700 (PDT) X-Google-Smtp-Source: APiQypJaiZXIqliSKreso1OngMqTcV1G6r1a6kDi4sUkF/s1eBPf/FKBW7YzC2SbPl3nCFjQpbWM X-Received: by 2002:a17:906:6a92:: with SMTP id p18mr22074869ejr.351.1588026023071; Mon, 27 Apr 2020 15:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588026023; cv=none; d=google.com; s=arc-20160816; b=1D99HqM89o2Ckq4E/dv0dCy+KnC1D6cYhXBZGWg8Nn8KkxnN0G4KMUvEA7ctR6dO6B O0XlZlYOuwXFh9DgqRUz1b3xC5M6vnVci0bk2qwI6lBhgRsMApBRmY7PeM5rNnXKDFsA 3f+pJqQ9/uLHfk+JxhhTD2BbEstjvyWtZPLoZ2M4gu21VoJ/RQlioEvzFs/vJqUy438n Jf6gpzJDMwrQjIpyn588wgEXxcgF4FXLsfOhI15/yYvDV3DQfzG8im5th+7rG9bv2VTC vxLtW4U6qtV8hVJFJ6TjmyFvHo93Mkhr70ekrfKm1QhmIPxBK3w6qDo9obHs7yrgBzw+ MwIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=PBimLEwchozPela6tJLfbh5qKfAypxdXlYuZ1GDpfOQ=; b=DuColMCmChNniETw0X3rc4zWaRTC0AwEyyf6hPoMMG/9ZbocX8i4pfVP/1ISqVeVEx JS/V55GkQiGefquJbRDANabdqsF0rw0o81wB9SYAvzwGZjr1PhBmfcNylLfSrabwWzJI fsEEJD/+N0JF+dpS1H5M5It78O5knu72k225bvfjmWo2DZ8I0GUIqppCBLlXqPbo9ZSj 66PioZJYkBwp+1A715a4MBigKm/ycCDgE868iWjEobDVtDlkRJGVGHAnrtHbpyV2v5Vq JGsKPy08MovlILAMKFSSseMzcwpaXTJzfsCcn51FHt0RUvgF0nAu/+me/dEWgqMD+06A dpnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b="R56Sl/G7"; 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=REJECT sp=REJECT dis=NONE) header.from=android.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d24si523435edv.539.2020.04.27.15.19.59; Mon, 27 Apr 2020 15:20:23 -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=@android.com header.s=20161025 header.b="R56Sl/G7"; 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=REJECT sp=REJECT dis=NONE) header.from=android.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726271AbgD0WR5 (ORCPT + 99 others); Mon, 27 Apr 2020 18:17:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726224AbgD0WR4 (ORCPT ); Mon, 27 Apr 2020 18:17:56 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65095C0610D5 for ; Mon, 27 Apr 2020 15:17:55 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id mq3so235429pjb.1 for ; Mon, 27 Apr 2020 15:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PBimLEwchozPela6tJLfbh5qKfAypxdXlYuZ1GDpfOQ=; b=R56Sl/G7PTx7+6SlI0DRO5f0Ah9asmUN7kq9UxGrM7D9FxNC3cnzicgZbBZQwchf13 bpnTl9NrRpvgiJM8JqsRE7uf3uynhZ7lNIXzMi028bi76dOEmHtbR05zwacMMqRxFWLX TTTEGoXGxFMG0Fez6VCeHGCwyXZQ1mS5mCL07EcWKqM2i4oxPANp9f0qhflnUEFD5U2A f17oiWcIvRV+PJqDtJ4dIK6NH2P8y3m4vg+6Rr6n+JS+fC/SNTj11RZZ/3X7EdaPeidO YDjrCqEi/E8kitRDroFDLBnfsZc4Q8luX+skyaYZ662263qfDMdDIlBQOl2BRWN37ijb +Opw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PBimLEwchozPela6tJLfbh5qKfAypxdXlYuZ1GDpfOQ=; b=RcQgg+Zs6EnsLlAn6bR0mWLCDdYM8sqeNw5FKxrY07CtikFS+sjamuuLxN7kigK0q8 eGKtHrGyHAEKTEHI+iDQ0U3xgbLwaE1KN4HOSjX27C5Z4YK1gL/6WNfXyK8kz5FHH7F9 FRIEWnhLwId5p8ak00j3Rk9NezFakZtRLVcZy5LWjF7hAIViRYvtJ0GNpY0t3SE+efOD /cDvAFO3XNVJDLMBrR8Ou0UC9445wYnw3ZIBNK5m7Hicw5JvE86bIRdF+3Dx3jF8nmCH EO+BgvKFWHqCwVmfVQtUR9T8QOAQZ8csCeQpgq1tUz0aauiFm9Q/27nxtceKjgPpA4y+ GYOQ== X-Gm-Message-State: AGi0PuYBxM627Rsv8lowgMGC6pwXAA9FVYXcBfQcQmpRcZmniMalltZy HhULf3+PfWmOd8yNbUdz2FTBrA== X-Received: by 2002:a17:902:aa88:: with SMTP id d8mr26681797plr.213.1588025874662; Mon, 27 Apr 2020 15:17:54 -0700 (PDT) Received: from localhost (c-73-170-36-70.hsd1.ca.comcast.net. [73.170.36.70]) by smtp.gmail.com with ESMTPSA id g184sm13320823pfb.80.2020.04.27.15.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 15:17:54 -0700 (PDT) Date: Mon, 27 Apr 2020 15:17:52 -0700 From: Sandeep Patil To: Daniel Lezcano Cc: Saravana Kannan , Baolin Wang , Thomas Gleixner , Orson Zhai , Chunyan Zhang , LKML , Android Kernel Team Subject: Re: [PATCH 1/2] drivers/clocksource/timer-of: Remove __init markings Message-ID: <20200427221752.GA166576@google.com> References: <429da47b-ad51-30eb-ff36-b05780c941ba@linaro.org> <573b7d9e-fb5d-5c81-a981-6d965db933f3@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <573b7d9e-fb5d-5c81-a981-6d965db933f3@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) - ssp 1. https://android.googlesource.com/kernel/common-patches/ 2. https://android.googlesource.com/kernel/common/+/refs/heads/android-5.4/README.md