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=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 45ACBC2D0E4 for ; Thu, 19 Nov 2020 06:41:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 AE0F02220B for ; Thu, 19 Nov 2020 06:41:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="neSIlVGk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KNy4dSWS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE0F02220B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ot92ua00cej+Nru/mUZy08EYqPiU+yNIa3i2orx0Jes=; b=neSIlVGkYUpPfkN29wB++MIP0 j9vAo803dWeBhwkJ3Yc+V6e7G5dowygJD9H61gbM6lSTtpCEA/C4BU7AJl0yLe9VUfTGv/gzhb6zg mi9T031QcqxGSXX4lbPkFKhw94Tpa9WFKJ0mkTsRITFizdAwTVQI5ytq3P7rMk1bUxwohZhDe31zw NBEPG7m2X0oPs3c+aovX0BG8cbe5Wrc76Y51ZuVMZWH4CPDUzQiTt5rp7wv5mr08xWTAiJXKYx6HM /ZG4WRdHhyR/xyK6/4wdVumdWDu09leRYrVT+F8K3/q3JPsWbi/MJmyOXqqTFotQPXDmIF6UN46b2 b9OYLZfzA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfdc3-0003p5-W6; Thu, 19 Nov 2020 06:40:12 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfdc0-0003oU-Sd for linux-arm-kernel@lists.infradead.org; Thu, 19 Nov 2020 06:40:10 +0000 Received: by mail-pg1-x541.google.com with SMTP id w4so3310856pgg.13 for ; Wed, 18 Nov 2020 22:40:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TCQz/KA2hqKOOlA4bPgpxQWY3cHnJO4JZ3EX7aXtvFw=; b=KNy4dSWS83T6VD0q14ZlJtRpheQDJqycKKgG0LErsdAYOJoJUlJR8ETl3s/YJ2TfrK 5VC5poR0aAwEFQxHuJbXN8PYDAJ6MEF26OXZeFu24AnWoZZrxuyQBTTig1inhqi224bq /FMWDYOoqE3JmW9DLCR1gbcxfanCGYNg4KFqNPZfwN/oqVjTgIWkprigETIGeftI1D2h gB5HlTOdQh4CFqFJQCo/QTnHgMMpK11d0vGmlAtBMOZ7ciqQSUFo6bLvMICU2eOTAQH3 v4M8n8loqyG7HI5er1sghVu50OuF3HVieCTjhQnDIVxbrrx2N1KiBz8jsHFSnz6KasxP cVlw== 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:user-agent; bh=TCQz/KA2hqKOOlA4bPgpxQWY3cHnJO4JZ3EX7aXtvFw=; b=MujCQYK3sQBCk/4KFxnnaFH7JPGlzMqtqGkpuAmvVJbmjMuMqDfpxqtkD1POhIqvY1 fyihPU5jeM1S7zxeulg1xqTlqv+s15fX57HL5JzcsPyW3jH1ORVG8jeDqPOTM0hsTIoI e0TDe52qY8EHh2QRHP9YjW0DPZroQjTkRPfgnFklUr6SpH4Ud+G98SOa6GVG5Y6MLv0v x64wF/s0nY69AK48DUDC77shnAHvu8O5YSFOaRQijXS61OINmk0R7T4QQ9b3bMH8fpSI oVws3nC3m9biC+RDXFGHXXWZtMcGte++8uMEeXdjXXJmc4cxvKA1cu1i6L07XfF2Alvs S2dQ== X-Gm-Message-State: AOAM53109z/UBwVFw/aI1bMmpup+ws4h6vQaFSjVX5HcqoAcpA9hSMhE cr1yQd7ycOS1hD0CYjRaX9bH9Q== X-Google-Smtp-Source: ABdhPJwrMgKHhEo1sifq6kgROK90gyHcKMGZfBb7j74eDKQYs6R7joDCoSh9SD2KOGWzFehj1TkWQA== X-Received: by 2002:a63:1d55:: with SMTP id d21mr11313790pgm.324.1605768005139; Wed, 18 Nov 2020 22:40:05 -0800 (PST) Received: from localhost ([122.172.12.172]) by smtp.gmail.com with ESMTPSA id h127sm28398286pfe.16.2020.11.18.22.40.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Nov 2020 22:40:04 -0800 (PST) Date: Thu, 19 Nov 2020 12:10:01 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Subject: Re: [PATCH v3 3/3] [RFC] CPUFreq: Add support for cpu-perf-dependencies Message-ID: <20201119064001.45iibj3u6mx3cgu2@vireshk-i7> References: <20201106105514.bhtdklyhn7goml64@vireshk-i7> <7f73bcd6-0f06-4ef0-7f02-0751e6c4d94b@arm.com> <20201109065742.22czfgyjhsjmkytf@vireshk-i7> <2fa8a5c0-f66d-34bc-7f1c-8462e7532e0a@arm.com> <20201117101128.6uapqg56arwqmm5p@vireshk-i7> <0858962e-3a30-d177-594b-bb8e3149dd8d@arm.com> <20201117105337.vjwtig3qxpc6owmw@vireshk-i7> <20201118044244.gbr4ujz6ilxatkde@vireshk-i7> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201119_014008_956694_6C5F3420 X-CRM114-Status: GOOD ( 36.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , "devicetree@vger.kernel.org" , Linux PM , Stephen Boyd , Viresh Kumar , Daniel Lezcano , "Rafael J. Wysocki" , Linux Kernel Mailing List , Morten Rasmussen , Rob Herring , Nicola Mazzucato , Sudeep Holla , Chris Redpath , Lukasz Luba , Linux ARM 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 18-11-20, 13:00, Rafael J. Wysocki wrote: > On Wed, Nov 18, 2020 at 5:42 AM Viresh Kumar wrote: > > > > On 17-11-20, 14:06, Rafael J. Wysocki wrote: > > > Is this really a cpufreq thing, though, or is it arch stuff? I think > > > the latter, because it is not necessary for anything in cpufreq. > > > > > > Yes, acpi-cpufreq happens to know this information, because it uses > > > processor_perflib, but the latter may as well be used by the arch > > > enumeration of CPUs and the freqdomain_cpus mask may be populated from > > > there. > > > > > > As far as cpufreq is concerned, if the interface to the hardware is > > > per-CPU, there is one CPU per policy and cpufreq has no business > > > knowing anything about the underlying hardware coordination. > > > > It won't be used by cpufreq for now at least and yes I understand your > > concern. I opted for this because we already have a cpufreq > > implementation for the same thing and it is usually better to reuse > > this kind of stuff instead of inventing it over. > > Do you mean related_cpus and real_cpus? Sorry about the confusion, I meant freqdomain_cpus only. > That's the granularity of the interface to the hardware I'm talking about. > > Strictly speaking, it means "these CPUs share a HW interface for perf > control" and it need not mean "these CPUs are in the same > clock/voltage domain". Specifically, it need not mean "these CPUs are > the only CPUs in the given clock/voltage domain". That's what it > means when the control is exercised by manipulating OPPs directly, but > not in general. > > In the ACPI case, for example, what the firmware tells you need not > reflect the HW topology in principle. It only tells you whether or > not it wants you to coordinate a given group of CPUs and in what way, > but this may not be the whole picture from the HW perspective. If you > need the latter, you need more information in general (at least you > need to assume that what the firmware tells you actually does reflect > the HW topology on the given SoC). > > So yes, in the particular case of OPP-based perf control, cpufreq > happens to have the same information that is needed by the other > subsystems, but otherwise it may not and what I'm saying is that it > generally is a mistake to expect cpufreq to have that information or > to be able to obtain it without the help of the arch/platform code. > Hence, it would be a mistake to design an interface based on that > expectation. > > Or looking at it from a different angle, today a cpufreq driver is > only required to specify the granularity of the HW interface for perf > control via related_cpus. It is not required to obtain extra > information beyond that. If a new mask to be populated by it is > added, the driver may need to do more work which is not necessary from > the perf control perspective. That doesn't look particularly clean to > me. > > Moreover, adding such a mask to cpufreq_policy would make the users of > it depend on cpufreq sort of artificially, which need not be useful > even. > > IMO, the information needed by all of the subsystems in question > should be obtained and made available at the arch/platform level and > everyone who needs it should be able to access it from there, > including the cpufreq driver for the given platform if that's what it > needs to do. > > BTW, cpuidle may need the information in question too, so why should > it be provided via cpufreq rather than via cpuidle? Right. -- viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel