Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1698379ybb; Fri, 29 Mar 2019 09:29:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2Cr+yp9Cth2Vrz9yDXLqwnpqEHZx3sPrvQ/sDfBddgXQlTmvLdtHz0sMCLh7h/JlYkdfG X-Received: by 2002:aa7:818a:: with SMTP id g10mr47377935pfi.178.1553876958750; Fri, 29 Mar 2019 09:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553876958; cv=none; d=google.com; s=arc-20160816; b=BUVlOIqTKSAbj+xSrXjUbSTuLWT991bOKzF2DZPnyQN/WNF+STBgzTRtqJ4o6R1+9c 71jfv6Jmy7J0udrt48+ePl/HSfH/t/G/vYdEzUBHmO2PqxTYZNSwnfjhychbn3BwYqjC 57UvnK4fzaNkzKUamkluArC/YEupyj7o3dqTaugY1TCokxSzP38XXRPqa/ll2kU0gVHC lFqgLKhVz7z3a6z6ks0rxbfP5CBUk0yV9GBXL7+VwvY0SMJVjERiLA0nr3WgXf86QVxg 7SkVBwQg8460wfmEyFtTrbpzQHKxK2G6L86wEXZXQmVtE2h4VUYsnyH00YBw3a5HCz0q mUeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YQifcgOJIEnXbpGsAdpyW1DMIrznz7DUp7kc21R+uXo=; b=I1HlTZa02O7zsnAXfe5tKIgSN28tsCEGa4gFZFvfKumPCHxsJaYqLgOTXgLRbOHtj1 0ggJXvLH1mAFCNVsNYy7iQASS7JrYR5udomW3gXikl8DJHSwXGbvZ/ZAqDpFCpIaPpQC xgK0G2SUDz4d8Dv4wrHidYw8v4S2Z551SfGd91Jc+9WBbYrkA0RHsR0U1XqJN/Wd1S46 5djQTwisSANrAjdWrcJHvpS4nB1DsjTwhCat/b3gCF0+kRP2aKgETmRZbqmUSHMa9Xu6 xU2WdrHKlYRb/r/fKnuVbmHtRsVs/YXC22dwBgpQRKxG0Lbipajse8RA2DYmYbn9p0kn YqEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CspyTwQ2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a19si2123713pgw.244.2019.03.29.09.29.02; Fri, 29 Mar 2019 09:29:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CspyTwQ2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729774AbfC2Q0z (ORCPT + 99 others); Fri, 29 Mar 2019 12:26:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:39856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728720AbfC2Q0z (ORCPT ); Fri, 29 Mar 2019 12:26:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BB4F52173C; Fri, 29 Mar 2019 16:26:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553876814; bh=Tccv/yg+5lH9K1dXNYk4rXg6MPswEtky165ALatvt9A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CspyTwQ2USzqVg46DHPocag4nY8KdT/QVnLT8M0E7OIaedW6/tf+B1AiSWtU9FA0O DuAwMQtFu0z1dJweqTs+uobfXiwDpst7idxWjgRrNRI8GvvCpbU7PP9i/Q21d9Gnhp 9cyndw4KkMRfrNWUTlhxqPTqt+OniJ90HepBqQU8= Date: Fri, 29 Mar 2019 17:26:51 +0100 From: Greg KH To: Lingutla Chandrasekhar Cc: quentin.perret@arm.com, sudeep.holla@arm.com, dietmar.eggemann@arm.com, juri.lelli@gmail.com, catalin.marinas@arm.com, jeremy.linton@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2] arch_topology: Make cpu_capacity sysfs node as ready-only Message-ID: <20190329162651.GA9608@kroah.com> References: <20190328044705.16838-1-clingutla@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190328044705.16838-1-clingutla@codeaurora.org> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 28, 2019 at 10:17:05AM +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 hotplugged 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 asymmetry between cpus in the system. > While at it, remove cpu_scale_mutex usage, which used for sysfs write > protection. > > Tested-by: Dietmar Eggemann > Tested-by: Quentin Perret > Reviewed-by: Quentin Perret > Acked-by: Sudeep Holla > Signed-off-by: Lingutla Chandrasekhar I see 3 "v2" patches in my queue, all different :( Also, you need to list what changed below the --- line as the documentation says to do so. Please fix up and resend v3. thanks, greg k-h