Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3472566ybc; Thu, 21 Nov 2019 08:49:52 -0800 (PST) X-Google-Smtp-Source: APXvYqxH24fdwH3t01rz+NhZBh2/N7UsqcqYjWKCMyiJIq/qoxmvqXOyPZ/enlGCeLdUJYraY9gX X-Received: by 2002:a17:906:19d0:: with SMTP id h16mr14461557ejd.301.1574354991922; Thu, 21 Nov 2019 08:49:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574354991; cv=none; d=google.com; s=arc-20160816; b=ajUV37DUd2u14JPj3MC+YiS2xjo4MGoVcmEZ10DwkvkDEW89iG3sAkg5nvWtNtLQ3q qkC0OWMi9QIMpU9iEDIPJcdGCSUgH2K014NTBZQ7FzzUYbxsTqqZgxI55GSg581Lck59 qlQ5NDdPsSnKXwPt4fNIfBJX4W3samMn2a94bRfTCOd8Y5PxrVbGoV5Mh0dtHTqU1VNx lkvPzN5toKbB/53MzQDECGznnQIWlrT2qQNdqR9VFtwUQDiakQbMmFI/t/2md+pWTCnt ejIXVTouB5/+FwcAbdxKWzyO06JOUvkqNJgxhZcwHm6XD1FCIMzaDPI8wwDHEJZJi6el ZqUw== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=V4o+vMXo4RTPbBGkIR4oBCzY12eTkQPH9ucFpZBX4pY=; b=Yby6nxMrtCMtuNGlN5MWHqnoebMnxIGQE0Q/UNgQJnb3KdGvWBY3+JKAOvNHwRWV2d aXd+x8S/T8KBRmLFUcC6dWQ08lJZTzBaH69FS+t8RkBLLiO0N9hP8/VIw9eoCtbAVlYr Us7ZAZz7F6T5NTnP+GkqIlHebvewcP5BMYsyO4rKa6joBOTN+IzrHMAP4zj56w+k5mkX rh9rEcorFXoTlrlhRudUK0m3/rjjAVPZuLgZpQMV85RylxSPUsbka4ld0NJ/xZkcJbLv WZfd70mnQ3mHpiRPT5iR2ffZVvOZYiiw9iURmBxH/B3dZfJ+mP6W4m7XmURK/OdXwN0j 0Z4w== 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 b9si2088097ejq.218.2019.11.21.08.49.27; Thu, 21 Nov 2019 08:49:51 -0800 (PST) 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 S1727188AbfKUQsU (ORCPT + 99 others); Thu, 21 Nov 2019 11:48:20 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:32913 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726690AbfKUQsS (ORCPT ); Thu, 21 Nov 2019 11:48:18 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iXpcl-0000Yu-UU; Thu, 21 Nov 2019 17:48:08 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 860781C1A3C; Thu, 21 Nov 2019 17:48:07 +0100 (CET) Date: Thu, 21 Nov 2019 16:48:07 -0000 From: "tip-bot2 for Frederic Weisbecker" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] rackmeter: Use vtime aware kcpustat accessor Cc: Yauheni Kaliuta , Frederic Weisbecker , Benjamin Herrenschmidt , Peter Zijlstra , Wanpeng Li , Ingo Molnar , x86 , LKML In-Reply-To: <20191121024430.19938-7-frederic@kernel.org> References: <20191121024430.19938-7-frederic@kernel.org> MIME-Version: 1.0 Message-ID: <157435488743.21853.7693299705375133100.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 8392853e964c025b0616bd54c0cdf9cbc3c9a769 Gitweb: https://git.kernel.org/tip/8392853e964c025b0616bd54c0cdf9cbc3c9a769 Author: Frederic Weisbecker AuthorDate: Thu, 21 Nov 2019 03:44:30 +01:00 Committer: Ingo Molnar CommitterDate: Thu, 21 Nov 2019 07:59:00 +01:00 rackmeter: Use vtime aware kcpustat accessor Now that we have a vtime safe kcpustat accessor, use it to fetch CPUTIME_NICE and fix frozen kcpustat values on nohz_full CPUs. Reported-by: Yauheni Kaliuta Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Peter Zijlstra Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191121024430.19938-7-frederic@kernel.org Signed-off-by: Ingo Molnar --- drivers/macintosh/rack-meter.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 4134e58..60311e8 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c @@ -81,13 +81,14 @@ static int rackmeter_ignore_nice; */ static inline u64 get_cpu_idle_time(unsigned int cpu) { + struct kernel_cpustat *kcpustat = &kcpustat_cpu(cpu); u64 retval; - retval = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE] + - kcpustat_cpu(cpu).cpustat[CPUTIME_IOWAIT]; + retval = kcpustat->cpustat[CPUTIME_IDLE] + + kcpustat->cpustat[CPUTIME_IOWAIT]; if (rackmeter_ignore_nice) - retval += kcpustat_cpu(cpu).cpustat[CPUTIME_NICE]; + retval += kcpustat_field(kcpustat, CPUTIME_NICE, cpu); return retval; }