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.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 7111FC4363D for ; Wed, 14 Oct 2020 09:21:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1488220BED for ; Wed, 14 Oct 2020 09:21:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GW9Pn8lw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388282AbgJNJVF (ORCPT ); Wed, 14 Oct 2020 05:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731088AbgJNJUn (ORCPT ); Wed, 14 Oct 2020 05:20:43 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34FCFC041E65 for ; Tue, 13 Oct 2020 21:20:38 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id x16so1173763pgj.3 for ; Tue, 13 Oct 2020 21:20:38 -0700 (PDT) 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=sRC19ocsAAL1mtJ2J1c/RGp/arfOqOhnEUa8vMBSrp4=; b=GW9Pn8lwtiFpiNXWvRKpr1sRlcOS/g/NDsIbw9YjLuG0R2lkqK4AEazOizqZQ4K0NL IlKYMWncUI7oHCT0MNl2QwX0bsC6kBtnmDUPOuvMFx6xS/Q0CaLY3nNAaAQjYtPEl93h YuCkHLk4mhh6kMHwF+EC5RqYI5rQkXluO/qZ4aV/ggF+CcutvMuRjFa7FJxhX0i5Lnlu oVCLTbvksoQmBXRTWFEyXS8S4Gn66GpbzT4zsnqAf7PhwKUk5lmz6KinofDv1rsrHB9B 2V0MrjxVWPer+JQqO6qg/TOD6tvExFz2VW4V70gYXFV5NLGwDM88KLc7EPHEgvhCiwQq aLcA== 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=sRC19ocsAAL1mtJ2J1c/RGp/arfOqOhnEUa8vMBSrp4=; b=kVi20oGcpa+P9hIkia8/TQykiDCxyT6pUd5eWFaAq8igIQl7/ra5nlnQFJjhRlC8aK Q+LosK1UzAoHmVttCjjyvkvHvDJ7h6iFPqjLTjJ9zNiCn2AXPRUXt3N1xBay/Pp6ZRpO c/EXyGwxsN/v1eR47uDL58dwFsH24mbl25g/SRrcoBVdzu1xDS92lyDPLPRl26ZfKrxU U7TZtPGEfEn+JEIhyCQo3lL4d6PhVU64ewrerTWCby57eCxxvqtVlmeRBMqg+G7i2UFR XZrWVFMHhGHW9vCVLEpKJnU2/W5MEnB+gsRg2BgB0UlazMh7AS5ElknBaPUvbHrOsIr0 8ZBw== X-Gm-Message-State: AOAM533Q58SJP0wzIR8tJQP96kf5DnKecCp5MPBx3PaZbZWbk+HybQD6 HsuDMi0bl8SGhG26dbP9XTa41A== X-Google-Smtp-Source: ABdhPJxwwBZkPJwYyNWVBoXOO7FKu6S+l6w0Y4TBNKBUp23Gr0IwwNVWP1f990BT75JWgTy0taYkng== X-Received: by 2002:a63:1e21:: with SMTP id e33mr2318898pge.270.1602649236190; Tue, 13 Oct 2020 21:20:36 -0700 (PDT) Received: from localhost ([122.181.54.133]) by smtp.gmail.com with ESMTPSA id l13sm1383186pgq.33.2020.10.13.21.20.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2020 21:20:35 -0700 (PDT) Date: Wed, 14 Oct 2020 09:50:33 +0530 From: Viresh Kumar To: Lukasz Luba Cc: Nicola Mazzucato , Ionela Voinescu , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, vireshk@kernel.org, daniel.lezcano@linaro.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, robh+dt@kernel.org, sudeep.holla@arm.com, chris.redpath@arm.com, morten.rasmussen@arm.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/2] [RFC] CPUFreq: Add support for cpu-perf-dependencies Message-ID: <20201014042033.tmsbanj5xgh2lmul@vireshk-i7> References: <20200924095347.32148-1-nicola.mazzucato@arm.com> <20200924095347.32148-3-nicola.mazzucato@arm.com> <20201006071909.3cgz7i5v35dgnuzn@vireshk-i7> <2417d7b5-bc58-fa30-192c-e5991ec22ce0@arm.com> <20201008110241.dcyxdtqqj7slwmnc@vireshk-i7> <20201008150317.GB20268@arm.com> <56846759-e3a6-9471-827d-27af0c3d410d@arm.com> <20201009053921.pkq4pcyrv4r7ylzu@vireshk-i7> <6a739b1b-e345-fa09-d815-6e9601aff5f6@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a739b1b-e345-fa09-d815-6e9601aff5f6@arm.com> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13-10-20, 14:53, Lukasz Luba wrote: > I've started wondering based on the OPP code if this is a good solution. > We would end up with one (?) instance of opp_table and list of devices > pinned to it, in: opp_table->dev_list > It can be seen e.g. in function dev_pm_opp_get_sharing_cpus(), > where we retrieve the cpumask simply looping through the devices: > > list_for_each_entry(opp_dev, &opp_table->dev_list, node) > cpumask_set_cpu(opp_dev->dev->id, cpumask); > > > This means we have a single OPP table for all pinned CPUs. > I wonder if this is not too strong assumption for still being compliant > with SCMI spec, when in theory performance levels might differ... > (please correct me here it that would never happen) > > There is also 2nd function dev_pm_opp_of_get_sharing_cpus() which looks > more promising. But I still don't know if the framework will allow us > to have private OPP tables when we use 'shared' in DT. > > Could you clarify if we would get 'private' opp table for each CPU, > which could be then populated independently, but still 2nd function will > work? I think there is some misunderstanding here in your part. The opp-table in the code is shared between CPUs only when the "opp-shared" property is present in the OPP table. If that property isn't available, even if same DT opp-table is pointed at by all the CPUs, the code will have separate copies of the OPP table. Though in your case (with performance-levels) it shouldn't matter as code will never create an OPP table I suppose. -- viresh 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 DD7F8C433DF for ; Wed, 14 Oct 2020 04:22:11 +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 64BF62222A for ; Wed, 14 Oct 2020 04:22:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LNSjqCn6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GW9Pn8lw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64BF62222A 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=b7Ugv/Teqvvuaq2zYqfbfzY4t/rX7AsechH+Zteq1DI=; b=LNSjqCn6tj4QpVIF1gkN9xi5S 9GtBLEmrxHW3dD6Ty/lAKrypyQC+uDXC4jtx1s8d4PE2rw2k2ItROL6hJ5fX4nV0E4FYvgoDhV3T/ bD27dbV+/9Ivjgah7Oxpet2XWevMIpM9AxVZ/XndvOV7T8AL2nz26vYI7cM4ClSetCSDj054UHuDX MsqiK1mVOsSoFJ43c3WWUAnMhUQL2voDfGJ5dUeoP0ch3RkI+qepNs+Dt80tPYy+ljOB1yUD3wVV+ NZ/mMKeAPq5DMUkxngyUhiD3cDdxRzkQmh55A3IB0WMRyNvBxHJTMBwnJOgiCQwdmbrtA0S5+sfKc xFvUfkGew==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSYHN-00048U-17; Wed, 14 Oct 2020 04:20:45 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSYHI-00048A-Px for linux-arm-kernel@lists.infradead.org; Wed, 14 Oct 2020 04:20:43 +0000 Received: by mail-pg1-x543.google.com with SMTP id h6so1175680pgk.4 for ; Tue, 13 Oct 2020 21:20:39 -0700 (PDT) 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=sRC19ocsAAL1mtJ2J1c/RGp/arfOqOhnEUa8vMBSrp4=; b=GW9Pn8lwtiFpiNXWvRKpr1sRlcOS/g/NDsIbw9YjLuG0R2lkqK4AEazOizqZQ4K0NL IlKYMWncUI7oHCT0MNl2QwX0bsC6kBtnmDUPOuvMFx6xS/Q0CaLY3nNAaAQjYtPEl93h YuCkHLk4mhh6kMHwF+EC5RqYI5rQkXluO/qZ4aV/ggF+CcutvMuRjFa7FJxhX0i5Lnlu oVCLTbvksoQmBXRTWFEyXS8S4Gn66GpbzT4zsnqAf7PhwKUk5lmz6KinofDv1rsrHB9B 2V0MrjxVWPer+JQqO6qg/TOD6tvExFz2VW4V70gYXFV5NLGwDM88KLc7EPHEgvhCiwQq aLcA== 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=sRC19ocsAAL1mtJ2J1c/RGp/arfOqOhnEUa8vMBSrp4=; b=paY0AHl3/D+BHxxXZcpPXqPfIRvrgNLJZfh1YxHkdIGug0mSliPkautwqWN/5pjWM7 Hb/w/ervVPHEjnEyekGoNGRdxZQE2S4xqPN5QYZbRlxw759HXBSVq6PzQC88F1kqzuWa kvcBYiMZ4Sw7er9c8uKGlCzhRRLwB0f5u93zVxEGhIRwjePsjZmB5BlziIFrDvuRsWXK orf1PiNLSZkregw1gG4TGG08VFWRHw0mN4CMWV3KS9W8+DcZpjHmXlvPMCZn5c7q+gLc YilH0QSFBVEZSSqCWc2K/3jF6rM0guY1Sirr+i4xNeBMyi3BWLIYloW/rgyJgLT6W7jl Suow== X-Gm-Message-State: AOAM5334wMiMSgx2GXgCEjprR42v95ympC3RQTiGFB5XNrb9dCssnN0O 2O9P0+iy1TUcOlSOCbdAisy1Gfrtcb1vaw== X-Google-Smtp-Source: ABdhPJxwwBZkPJwYyNWVBoXOO7FKu6S+l6w0Y4TBNKBUp23Gr0IwwNVWP1f990BT75JWgTy0taYkng== X-Received: by 2002:a63:1e21:: with SMTP id e33mr2318898pge.270.1602649236190; Tue, 13 Oct 2020 21:20:36 -0700 (PDT) Received: from localhost ([122.181.54.133]) by smtp.gmail.com with ESMTPSA id l13sm1383186pgq.33.2020.10.13.21.20.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2020 21:20:35 -0700 (PDT) Date: Wed, 14 Oct 2020 09:50:33 +0530 From: Viresh Kumar To: Lukasz Luba Subject: Re: [PATCH v2 2/2] [RFC] CPUFreq: Add support for cpu-perf-dependencies Message-ID: <20201014042033.tmsbanj5xgh2lmul@vireshk-i7> References: <20200924095347.32148-1-nicola.mazzucato@arm.com> <20200924095347.32148-3-nicola.mazzucato@arm.com> <20201006071909.3cgz7i5v35dgnuzn@vireshk-i7> <2417d7b5-bc58-fa30-192c-e5991ec22ce0@arm.com> <20201008110241.dcyxdtqqj7slwmnc@vireshk-i7> <20201008150317.GB20268@arm.com> <56846759-e3a6-9471-827d-27af0c3d410d@arm.com> <20201009053921.pkq4pcyrv4r7ylzu@vireshk-i7> <6a739b1b-e345-fa09-d815-6e9601aff5f6@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6a739b1b-e345-fa09-d815-6e9601aff5f6@arm.com> User-Agent: NeoMutt/20180716-391-311a52 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_002040_911312_D81E3842 X-CRM114-Status: GOOD ( 20.03 ) 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: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, vireshk@kernel.org, daniel.lezcano@linaro.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, robh+dt@kernel.org, Nicola Mazzucato , sudeep.holla@arm.com, chris.redpath@arm.com, Ionela Voinescu , morten.rasmussen@arm.com, linux-arm-kernel@lists.infradead.org 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 13-10-20, 14:53, Lukasz Luba wrote: > I've started wondering based on the OPP code if this is a good solution. > We would end up with one (?) instance of opp_table and list of devices > pinned to it, in: opp_table->dev_list > It can be seen e.g. in function dev_pm_opp_get_sharing_cpus(), > where we retrieve the cpumask simply looping through the devices: > > list_for_each_entry(opp_dev, &opp_table->dev_list, node) > cpumask_set_cpu(opp_dev->dev->id, cpumask); > > > This means we have a single OPP table for all pinned CPUs. > I wonder if this is not too strong assumption for still being compliant > with SCMI spec, when in theory performance levels might differ... > (please correct me here it that would never happen) > > There is also 2nd function dev_pm_opp_of_get_sharing_cpus() which looks > more promising. But I still don't know if the framework will allow us > to have private OPP tables when we use 'shared' in DT. > > Could you clarify if we would get 'private' opp table for each CPU, > which could be then populated independently, but still 2nd function will > work? I think there is some misunderstanding here in your part. The opp-table in the code is shared between CPUs only when the "opp-shared" property is present in the OPP table. If that property isn't available, even if same DT opp-table is pointed at by all the CPUs, the code will have separate copies of the OPP table. Though in your case (with performance-levels) it shouldn't matter as code will never create an OPP table I suppose. -- viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel