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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham 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 6BB7BC43381 for ; Wed, 6 Mar 2019 15:23:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0B53C20675 for ; Wed, 6 Mar 2019 15:23:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Fp4GQarM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B53C20675 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.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=iKBT9kKH/zY++JkRwKhoG/2bpwHBmuJ7QduD2BqjwGE=; b=Fp4GQarMw9tAg9 Zs/YwKzkC8Hf0fnJd5cNE+o7uBvoDEWQOBRXXCn9b1fahwglpkGZM6P+P424Vk4sP8L8UGJGGtu81 DuwrB6RVw1/CNJXc5BxM160z0ijs31rkuBxgeVbDH1TufTVxyNr9WitJ16pA4DOJu16L6OZhibQJr Ol7dT0FEUJbGaQdcfqLFT1KYH9xSyxgUgCUVAejbqeAFESQtdT0E5xzddcCXKqvb7JPIJARdwduRM UZsc4/2JdTCz1+NskpFU1Onuitjs6dJ8Ho1PbelWl1QHSR2SSiWRfK6PIBvO/HeXViingtBafXuuq Wjuv3jl4bDv53CqpEcGQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1YNs-0002Cq-7l; Wed, 06 Mar 2019 15:23:04 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1YNp-0002C9-CQ for linux-arm-kernel@lists.infradead.org; Wed, 06 Mar 2019 15:23:02 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 20BD080D; Wed, 6 Mar 2019 07:22:58 -0800 (PST) Received: from e105550-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 971313F703; Wed, 6 Mar 2019 07:22:56 -0800 (PST) Date: Wed, 6 Mar 2019 15:22:54 +0000 From: Morten Rasmussen To: Sudeep Holla Subject: Re: [PATCH] arch_topology: Update user supplied capacity to possible cpus in cluster Message-ID: <20190306152254.GB19434@e105550-lin.cambridge.arm.com> References: <6d7eb7cc-2453-3a7b-9163-ef9a5389220f@codeaurora.org> <20190228152555.GA13165@e107155-lin> <5785fd91-3d76-78e6-f4c5-7ed07be1a14d@codeaurora.org> <20190304182138.GA7553@e107155-lin> <20190305092322.q7odi3inofnvzhre@queper01-lin> <20190305111321.GA5458@e107155-lin> <20190305112952.zux4bafbnhgnyvlh@queper01-lin> <20190305113633.GA2066@e107155-lin> <20190305165431.GA17946@e107155-lin> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190305165431.GA17946@e107155-lin> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190306_072301_435320_75CB4042 X-CRM114-Status: GOOD ( 28.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chandra Sekhar Lingutla , catalin.marinas@arm.com, will.deacon@arm.com, Jeremy Linton , Quentin Perret , dietmar.eggemann@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+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 05, 2019 at 04:54:31PM +0000, Sudeep Holla wrote: > On Tue, Mar 05, 2019 at 09:23:24PM +0530, Chandra Sekhar Lingutla wrote: > > > > > > On 3/5/2019 5:06 PM, Sudeep Holla wrote: > > > On Tue, Mar 05, 2019 at 11:29:55AM +0000, Quentin Perret wrote: > > >> On Tuesday 05 Mar 2019 at 11:13:21 (+0000), Sudeep Holla wrote: > > >> [...] > > >>> While I like the idea, I am afraid that linking this to cpufreq policy > > >>> may not be good. How will we deal with it on systems without CPUfreq ? > > >> > > >> Maybe something like this ? > > >> > > >> policy = cpufreq_cpu_get(cpu); > > >> if (policy) { > > >> for_each_cpu(i, policy->related_cpus) { > > >> /* Update capacity for @i*/ > > >> } > > >> cpufreq_cpu_put(policy); > > >> } else { > > >> /* Update capacity for @cpu*/ > > >> } > > >> > > >> I think it's OK to assume per-cpu capacities w/o CPUFreq. The only > > >> case where it makes sense to 'bind' the capacity of several CPUs > > >> together is when they're part of the same perf domain, I think. If you > > >> don't know what the perf domains are, then there's nothing sensible you > > >> can do. Moving away from using the topology masks is certainly good thing if we can't kill the write ability through sysfs. My only concern with the per-cpu approach for non-cpufreq systems is that we have to be sure that the rebuild of the sched_domain hierarchy doesn't go wrong when you have different capacities in the same group. I don't think it will but it is worth checking. > > >> > > > > > > Makes sense. > > > > > >> And for the dependency, a large part of the arch_topology driver is > > >> already dependent on CPUFreq -- it registers a CPUFreq notifier on boot > > >> to re-scale the CPU capacities depending on the max freq of the various > > >> policies and so on. So the dependency is already there somehow. > > >> > > > > > > Sorry when I mentioned dependency, I meant absence of it needs to be > > > dealt with. Your suggestion looks good. > > > > > >> [...] > > >> > > >>> I think if there are no valid users of this, we *must* remove it. As I > > >>> have pointed out in past, giving user such access will need platform > > >>> knowledge. Though it's debatable topic, firmware providing this > > >>> information is the only correct solution IMO. > > >> > > >> Yeah, if nobody is using it then maybe we can just remove it. Or at > > >> least we can give it a go and if somebody complains then we can 'fix' it > > >> with something like my snippet above :-) > > >> > > > > > > Happy to Ack code removing it ;). The argument that it can't be provided > > > by firmware is no longer valid. We already have some dependency on DVFS > > > data from the firmware for this to be functional correctly. > > > > > If at all nobody uses it, making it as read-only (under debugfs) would be > > good ? > > Yes, but under sysfs as it is now. Just remove write capability and make > it read-only. > > > or else we are ok to update patch with related_cpus ? > > As Quentin, mentions only if anyone has objections to the above and > provide valid use-case with details on how kernel can validate the data > provided from the user which is the most difficult part IMO. +1 Morten _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel