Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5760359iob; Tue, 10 May 2022 03:06:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFi8fQ8fwZarnP+o8ZmK2u4txe4A+F8uoVu2IWYp0NctA1hxJxB2Ev6qp579+QuHpZSv1r X-Received: by 2002:a05:6402:d52:b0:425:dda4:b676 with SMTP id ec18-20020a0564020d5200b00425dda4b676mr21956199edb.277.1652177164296; Tue, 10 May 2022 03:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652177164; cv=none; d=google.com; s=arc-20160816; b=wmS+zJ5Gc6VrTkRzSvDjEFJj3S3X/p712eTK/Hwd5afUIx9Jm5574FmvgqI50Mx2wW 4Rs9UFWBrKNSR/jbA3t1vwnFoRF3YkFY/TRxrvJ05i8ZbWuggjyLIV2duUfT6Nld8f0j /emUBTxduvD/OybET5ftM085CQqMrE+J3yDCQWv1cJpS4EjMG1BG2PmhN5c49h+J2yff pjvBp0i4g/aChPtSI0wkfudl07xyEtza5L68gnMK+o4+ZNC/8cUtF9TJxP8JkGV5lZU9 3gjTVAY4MK4GDuOK+6E/mWzgaWRShkuZH8LdNCI6DhPrio9VA5Yv9NoDyPqbW1MPV3VF LgSg== 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:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=D8Qz/xvrsWKKpXL9RLp/nvSMlMtetnF+P9aicmm6cuo=; b=UTXtzT9ZMDhjIafq+t0WxSQ2dQQXgBjOIMeJ6cacr0ASnMmzB2RSq8eQWXtXkGC246 Hxz3ziwC3FvdyD6f7Mcj4RbIXJZ4lpnTV60cySnHuLLyuQqLVFS+SSJz5+XovznHou33 n62zw5DOcO2idWUQ+8MClASz0dHmLF4ibPMU+lB/kzi9ueHkl6D7X2z0n3iiBbJajNov 7Bsun7V7Ox3tlbm8ZkvAmaWJ/kondnPJC3+s7BhR0MtpAerQ3mmnNEO3UuP6APGjyAFq Ao5hhWtk5+g8eBOw+t7REJRqpgtHTx+2HLP507/X1XEMMfln1LQOv2XD802SKPUzJDSK G63Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LXGst13R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a056402438100b00426305b74a9si5713191edc.165.2022.05.10.03.05.40; Tue, 10 May 2022 03:06:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LXGst13R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238435AbiEJJM4 (ORCPT + 99 others); Tue, 10 May 2022 05:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238411AbiEJJMz (ORCPT ); Tue, 10 May 2022 05:12:55 -0400 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F0C12555B8; Tue, 10 May 2022 02:08:59 -0700 (PDT) Received: by mail-qt1-x82e.google.com with SMTP id o11so13048058qtp.13; Tue, 10 May 2022 02:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=D8Qz/xvrsWKKpXL9RLp/nvSMlMtetnF+P9aicmm6cuo=; b=LXGst13RLeQoCnT/V5H/Yibwn3XE5hfpV+SYcB+jBsH2oKzLLpgX2juQOvjPJFtRdR wQtlW2PLGPabzn4MzarVdysE1DHIPC3bYOKsJYHeT2yIij7XndAMSXok1l3rQhjA9EKO SzPiiOK+kbhXSFFuf3d2qvOAkQhvMWW5nUe8IKBZex6cc/LRXg2nuaW3Ci8SyK1P4TfJ Yw1NXjz2DT8+FJD3ruvFEtWD83Bx/2EcAitvJnS7msvmhCagDsTOLYH+xiMpMXDvBK9+ LJhApIdKp5eizrUXkWFKTngbgDeT7Bqc5V1bic11LialdJKJvB7mBg6+2j50eLAafcik vnYQ== 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:reply-to :from:date:message-id:subject:to:cc; bh=D8Qz/xvrsWKKpXL9RLp/nvSMlMtetnF+P9aicmm6cuo=; b=Nq7+xFma/xcAfbpSPWKTzMqzKWOaTpB7e8laHDLdDSe+/oPmV2iQ5NCPxS5pcpsR5Z V/CPtuzbpPww6tZDthqZAVQVuolLGAcvjeHXMU37OTLug0Yxmzh0KgP3eaoIsbeEhbMn YcMdkW976i1ij9diVDS3YAu8/9h3hWGxvcOFFRW8TcK/AsS5dGBq+g5QXrzSaEbrSuZU FTzksgWyUg4hIKHQ82ey9cv66lP9O6PtfZ6bU3q6gpQyxRrn2xmwHqWbXJTDqIRQI7na W9cTcDwNBXIYoR8771uI8OUvFafjdkIAq2noM99VV0LQQViZ/BUBBHOCtmivP635P/IN zsqw== X-Gm-Message-State: AOAM531CLkckdqgWVXyeZzdtJiPWupUZWn0WaIZGlDAdH175QlGNyS5m pv2pwjD9oNzs/XXSrK6EHY6mSAKrVvR3L9wIoGGTmfw3Snk= X-Received: by 2002:a05:622a:4d1:b0:2f3:d1c7:b31f with SMTP id q17-20020a05622a04d100b002f3d1c7b31fmr12895238qtx.163.1652173738572; Tue, 10 May 2022 02:08:58 -0700 (PDT) MIME-Version: 1.0 References: <20220509120337.92472-1-cw00.choi@samsung.com> In-Reply-To: Reply-To: cwchoi00@gmail.com From: Chanwoo Choi Date: Tue, 10 May 2022 18:08:22 +0900 Message-ID: Subject: Re: [PATCH v3 0/4] PM / devfreq: Add cpu based scaling support to passive governor To: Chen-Yu Tsai Cc: Linux PM list , linux-kernel , Johnson Wang , Matthias Kaehlcke , jia-wei.chang@mediatek.com, andrew-sh.cheng@mediatek.com, hsinyi@chromium.org, Saravana Kannan , Chanwoo Choi , MyungJoo Ham , Kyungmin Park Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chen-Yu, On Tue, May 10, 2022 at 6:00 PM Chen-Yu Tsai wrote: > > On Mon, May 9, 2022 at 8:03 PM Chanwoo Choi wrote: > > > > The devfreq passive governor has already supported the devfreq parent device > > for coupling the frequency change if some hardware have the constraints > > such as power sharing and so on. > > > > Add cpu based scaling support to passive governor with required-opp property. > > It uses the cpufreq notifier to catch the frequency change timing of cpufreq > > and get the next frequency according to new cpu frequency by using required-opp > > property. It is based on patch[1] and then just code clean-up by myself. > > > > Make the common code for both passive_devfreq and passive_cpufreq > > parent type to remove the duplicate code. > > > > [1] [RFC,v2] PM / devfreq: Add cpu based scaling support to passive_governor > > - https://lore.kernel.org/patchwork/patch/1101049/ > > > > Changes from v2: > > : https://patchwork.kernel.org/project/linux-pm/cover/20220507150145.531864-1-cw00.choi@samsung.com/ > > - Drop the following patch ("PM / devfreq: passive: Update frequency when start governor") > > - Move p_data->this initialization into cpufreq_passive_regiser_notifier() > > > > Changes from v1: > > : https://patchwork.kernel.org/project/linux-pm/cover/20210617060546.26933-1-cw00.choi@samsung.com/ > > - Rename cpu_data variable to parent_cpu_data to avoid build fail > > - Use for_each_possible_cpu macro when register cpufreq transition notifier > > - Add missing exception handling when cpufreq_passive_register_notifier is failed > > - Keep cpufreq_policy for posible cpus instead of NR_CPU in order to avoid > > the memory waste when NR_CPU is too high. > > - Add reviewed-by tag of Matthias Kaehlcke for patch1 > > > > > > Chanwoo Choi (3): > > PM / devfreq: Export devfreq_get_freq_range symbol within devfreq > > PM / devfreq: passive: Reduce duplicate code when passive_devfreq case > > PM / devfreq: passive: Keep cpufreq_policy for possible cpus > > > > Saravana Kannan (1): > > PM / devfreq: Add cpu based scaling support to passive governor > > Tested-by: Chen-Yu Tsai > > on next-20220509 in conjunction with the MediaTek cpufreq [1], CCI devfreq [2] > & SVS [3] series, as well as some fix-ups [4]. AFAICT the CCI devfreq device > is reacting and making frequency changes. > > > Regards > ChenYu > > [1] https://lore.kernel.org/all/20220422075239.16437-1-rex-bc.chen@mediatek.com/ > [2] https://lore.kernel.org/all/20220408052150.22536-1-johnson.wang@mediatek.com/ > [3] https://lore.kernel.org/all/20220420102044.10832-1-roger.lu@mediatek.com/ > [4] https://github.com/wens/linux/commits/mt8183-cpufreq-cci-svs-test Thanks for your test. -- Best Regards, Chanwoo Choi