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=unavailable 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 84EADC43381 for ; Thu, 7 Mar 2019 15:20:14 +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 521E12087C for ; Thu, 7 Mar 2019 15:20:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XLWMBcHg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 521E12087C 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=MM9JOYUS0DWw6GYZ9LOAo8GrcF6kaaBOM9lTvnPtXCM=; b=XLWMBcHgXRUkJX A09Sm+MZuE7F8FkUXLmCrHEh14Vu+l/3KWXwuFxopV0yPHZIV21MlynEFA2Pvy/fJqdzqKzOojT+K Uyk786eneuWmrxBtMBlwPyPWL/+BSkhv013nqrk4pjUER3v7DRtra+2qsRzY0fOrCW4NeRwP6GsDo HplPfwf31JLFMDs9muOFgPEDYZNBGsq0GGiOUxKriOvaPYWAhsh7UIs/Nz1bVUKR/AoKL0XOJJjTb IQWj8Glfr4KL3VFXxqp1Z+ghcH0e5NILVz+9HJgTml9Gwd9LpCmAOycBuPe623LSR3tEstgsX1mf9 LZKyX70LVutzh0/9hn4A==; 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 1h1uoU-0008Gi-Qk; Thu, 07 Mar 2019 15:20:02 +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 1h1uoQ-0008G0-W1 for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2019 15:20:00 +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 88E68EBD; Thu, 7 Mar 2019 07:19:58 -0800 (PST) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BD5813F706; Thu, 7 Mar 2019 07:19:56 -0800 (PST) Date: Thu, 7 Mar 2019 15:19:54 +0000 From: Sudeep Holla To: Lingutla Chandrasekhar Subject: Re: [PATCH v1] arch_topology: Make cpu_capacity sysfs node as ready-only Message-ID: <20190307151954.GB5778@e107155-lin> References: <20190306152254.GB19434@e105550-lin.cambridge.arm.com> <1551886073-16217-1-git-send-email-clingutla@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1551886073-16217-1-git-send-email-clingutla@codeaurora.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190307_071959_037202_1603BD5F X-CRM114-Status: GOOD ( 17.20 ) 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: catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, dietmar.eggemann@arm.com, quentin.perret@arm.com, gregkh@linuxfoundation.org, 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+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 06, 2019 at 08:57:53PM +0530, Lingutla Chandrasekhar wrote: > If user updates any cpu's cpu_capacity, then the new value is going to > be applied to all its online sibling cpus. But this need not to be correct > always, as sibling cpus (in ARM, same micro architecture cpus) would have > different cpu_capacity with different performance characteristics. > So updating the user supplied cpu_capacity to all cpu siblings > is not correct. > > And another problem is, current code assumes that 'all cpus in a cluster > or with same package_id (core_siblings), would have same cpu_capacity'. > But with commit '5bdd2b3f0f8 ("arm64: topology: add support to remove > cpu topology sibling masks")', when a cpu hotplugged out, the cpu > information gets cleared in its sibling cpus. So user supplied > cpu_capacity would be applied to only online sibling cpus at the time. > After that, if any cpu hot plugged in, it would have different cpu_capacity > than its siblings, which breaks the above assumption. > > So instead of mucking around the core sibling mask for user supplied > value, use device-tree to set cpu capacity. And make the cpu_capacity > node as read-only to know the assymetry between cpus in the system. > Acked-by: Sudeep Holla IIRC this was added for 2 possibilities though I don't completely agree no one had any objections(including me though I wonder how/why I missed to notice it now, anyways it's too late) 1. For systems that don't provide this information via device-tree/any firmware though that's the highly recommended way. With more complex topologies in horizon, I can't think of fetching/deducing this information *correctly* in any other sane way. 2. For some sort of tuning(avoid rebuild and reboot), but that's questionable as this is not a software characteristic. It's more like deriving hardware characteristics using software experiments. So, for me, we can compare this with some hardware latencies we have like CPU idle entry/exit latencies. They are tuned but not in production kernels. So if there's a case for adding this back as write capable sysfs, I would prefer that in debugfs and this sysfs is read-only ABI. Hope that helps. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel