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 X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75313C433E0 for ; Tue, 23 Mar 2021 16:00:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48BB7619D5 for ; Tue, 23 Mar 2021 16:00:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232806AbhCWQAD (ORCPT ); Tue, 23 Mar 2021 12:00:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233024AbhCWP77 (ORCPT ); Tue, 23 Mar 2021 11:59:59 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF10DC061574 for ; Tue, 23 Mar 2021 08:59:58 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id f22-20020a7bc8d60000b029010c024a1407so13313278wml.2 for ; Tue, 23 Mar 2021 08:59:58 -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=EnmmDyggAPflRAaQCTg3wppfJzBgN0JGaB14tjos9c0=; b=Q+TmW/roG4k+tejpfFry3lutYo8+nsqkPocgK+U9Ez5mH9ey5+jTNs4GjWy3NlRN0k UlNrZvX6PNXX1dNwxmplhDKfYU+L1H1nQ4w2765jkRpdJdzzzCNQkWPZ9MOhKyA26n2V lhcSlSUFU7yE0PVB01quV9BN2ilxUOg2blO0qNqJehQB2KgpIrBiGdHxzL/r2tBFnMi/ MZny2ap41FAbE7IaCnJZTwNB3QEQ7wQ38fa8NmiOa2sd2yJfJxXpbLkKqn+H1i1gyIi8 uwyg9axR1h+J8UmOPdYsLa0KNB4iBXD6OYJpChmOwKAqz47HDdRCwuMHK9h3XIRqXNZW 3TNg== 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=EnmmDyggAPflRAaQCTg3wppfJzBgN0JGaB14tjos9c0=; b=cTsGANrYoRDeaIqlrqR+RdkPTsmhBtwb7MzMzQpcmz5mRI9GnGjY9jNaJKHwsdg8wW 82GoKIhkeTcnySNIOECO6emq1MjYrmUHELvpisy9uy9HYLELtF8ApnLQttIAxhQTE3/M WAou+CKgU7Lahb3tTVPeKFue8pYB2Muq0uIrw9O+hOZlBZYJGBNZZ2wgBHEUTe2Tv2YG sNci8SitUDivIRf54VHN3U4QeMiHyiiW2NmYrLT/tpNNIbz/jY/MN+kTAwbJdSd8+/ax gASSstqviY77xCUiDJydvrQQP6jHJgLwr6oPFFoPI/MP1whOfWO9+PA5dDZen1s3Uwof oGsg== X-Gm-Message-State: AOAM533dGw4r8a+c9OOfJsuJ003J0yaOO05cqpw9DtFvB7eiGenJ3Qft 6w6h/9yXtPBi0n27k4oaJijKeg== X-Google-Smtp-Source: ABdhPJxNCgPMDHZiGsXzDevWQJr0r951c/0Rvmbk8hQ+TO2TIhuPA8AFqJo1qAkmK4vk0bzTHeloNA== X-Received: by 2002:a1c:541a:: with SMTP id i26mr3888198wmb.75.1616515197459; Tue, 23 Mar 2021 08:59:57 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:91e2:6a05:a4ac:7d0a? ([2a01:e34:ed2f:f020:91e2:6a05:a4ac:7d0a]) by smtp.googlemail.com with ESMTPSA id c8sm25845957wrd.55.2021.03.23.08.59.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Mar 2021 08:59:56 -0700 (PDT) Subject: Re: [PATCH] powercap/drivers/dtpm: Add dtpm devfreq with energy model support To: Lukasz Luba Cc: cwchoi00@gmail.com, myungjoo.ham@samsung.com, kyungmin.park@samsung.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rafael@kernel.org References: <20210319162836.9364-1-daniel.lezcano@linaro.org> <9a9931f4-ece5-4fe9-5f88-871a2e759200@arm.com> From: Daniel Lezcano Message-ID: <030ccf82-cc25-7287-7409-d33a2dbd2cee@linaro.org> Date: Tue, 23 Mar 2021 16:59:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <9a9931f4-ece5-4fe9-5f88-871a2e759200@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/03/2021 16:56, Lukasz Luba wrote: > Hi Daniel, > > On 3/19/21 4:28 PM, Daniel Lezcano wrote: >> Currently the dtpm supports the CPUs via cpufreq and the energy >> model. This change provides the same for the device which supports >> devfreq. >> >> Each device supporting devfreq and having an energy model can register >> themselves in the list of supported devices. >> >> The concept is the same as the cpufreq dtpm support: the QoS is used >> to aggregate the requests and the energy model gives the value of the >> instantaneous power consumption ponderated by the load of the device. >> > > > I've just started the review, but I have a blocking question: > > Why there is no unregister function (like 'dtmp_unregister_devfreq')? > Do you consider any devfreq drivers to be modules? > > The code looks like an API that it's going to be called directly in > e.g. GPU driver in it's probe function. In that case probably the > module unloading should call dtmp unregister. > > Could you explain this to me please? So I can continue the review. Just forgot the unregister function :) -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog