Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2100160ybp; Sat, 5 Oct 2019 05:43:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpjeE7yapn4kv7F0Yo2ppJ1RpjrifQFV1MQFUuOj+q+H2jX1bzueT+31+SU4KGXSuMaHWG X-Received: by 2002:a05:6402:1583:: with SMTP id c3mr20569096edv.286.1570279411609; Sat, 05 Oct 2019 05:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570279411; cv=none; d=google.com; s=arc-20160816; b=onBw15A11x9RcuSjXpPaoMnO+wuXfxXeJHgYY9LuGrzaF8p8pvlgOx05PoqScR8PzN JZwgq6vwxxIvMYGSD2Tp8dD1+SDhsueT9NtU/4iTphugG+7Q0n7oJt7ciCAS+vGwXyks WAfFzLBMX8eODAgIC2Tu/i+xhO51YZki4z0jXXvO8QCpShtNapbkL+bxas4GK//IzEaZ VXingZYntxmen/FPFpZKfqp81hPHRGaZaScUOQAHh5FA5dZvehyWFJgyVzBhKqt3umDP hqUCkU/n3cTp8xvjNGXp+xsDcGpmuPpkiuo+SuldDpnqLVoGNhXVNiVVtMGNrf83XQwO Bc/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=O8rAZ6D217xCwpencHI6tegDEYfU21tQvW0dqs53+Xc=; b=ShqAHBO6igFmW3sKZPFMnlCm2xy6Wqjrro9W0/mlgn6rLTYZ+WxH68daJoI3byv7L6 TUFQ0pa4fRpi9ao+OMrPxLriz/FcDzq9kBUiv0+bIlqC5zxz7S67dOal6m+zN5A8Gsjg DhcxZRyx/Uas3gdTOhLqWHz94Hmw/WOoGsmDkEOAb5adgsk1N2CB0SztAKsyZIu03B3P M/KjhmCoCUht2A4Y3BNVHUD7zeR1H5aUGBEBK9Jvz8AVVsO1/kqsCSchm30OXvA9u+PF 51N/o1gusXIgiUZh+86zAgQVOxk92OX6UVkrjSp9aKfgua3rl2PwufmNjaXZOKI+os3q cm0g== ARC-Authentication-Results: i=1; mx.google.com; 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 c14si4350408ejz.242.2019.10.05.05.43.07; Sat, 05 Oct 2019 05:43:31 -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; 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 S1728272AbfJEMkm (ORCPT + 99 others); Sat, 5 Oct 2019 08:40:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:37808 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727322AbfJEMkl (ORCPT ); Sat, 5 Oct 2019 08:40:41 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9A173AE40; Sat, 5 Oct 2019 12:40:39 +0000 (UTC) From: Thomas Renninger To: "Natarajan, Janakarajan" Cc: "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , Pu Wen , Shuah Khan , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , Allison Randal , Richard Fontana , Thomas Renninger , Borislav Petkov Subject: Re: [PATCH 1/2] Modify cpupower to schedule itself on cores it is reading MSRs from Date: Sat, 05 Oct 2019 14:40:57 +0200 Message-ID: <1798336.DyNOivuPDK@c100> In-Reply-To: <64022abd-a798-c679-1c1d-eec9b18c4fb2@amd.com> References: <20190918163445.129103-1-Janakarajan.Natarajan@amd.com> <4340017.MFpoU6RDpq@c100> <64022abd-a798-c679-1c1d-eec9b18c4fb2@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wednesday, October 2, 2019 4:45:03 PM CEST Natarajan, Janakarajan wrote: > On 9/27/19 4:48 PM, Thomas Renninger wrote: > > > On Friday, September 27, 2019 6:07:56 PM CEST Natarajan, Janakarajan > > wrote: > > >> On 9/18/2019 11:34 AM, Natarajan, Janakarajan wrote: > On a 256 logical-cpu Rome system we see C0 value from cpupower output go > from 0.01 to ~(0.1 to 1.00) > > for all cpus with the 1st patch. > > However, this goes down to ~0.01 when we use the RDPRU instruction > (which can be used to get > > APERF/MPERF from CPL > 0) and avoid using the msr module (patch 2). And this one only exists on latest AMD cpus, right? > However, for systems that provide an instruction to get register values > from userspace, would a command-line parameter be acceptable? Parameter sounds like a good idea. In fact, there already is such a paramter. cpupower monitor --help -c Schedule the process on every core before starting and ending measuring. This could be needed for the Idle_Stats monitor when no other MSR based monitor (has to be run on the core that is measured) is run in parallel. This is to wake up the processors from deeper sleep states and let the kernel reaccount its cpuidle (C-state) information before reading the cpuidle timings from sysfs. Best is you exchange the order of your patches. The 2nd looks rather straight forward and you can add my reviewed-by. If you still need adjustings with -c param, they can be discussed separately. It would also be nice to mention in which case it makes sense to use it in the manpage or advantages/drawbacks if you don't. Thanks! Thomas