Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1087308ybl; Wed, 4 Dec 2019 16:45:59 -0800 (PST) X-Google-Smtp-Source: APXvYqyhFz4DI7QQGP9qrNhTyiNzICRVyrOGaQOhF3k06boeAGeWIe2/HgBqMnBjYWF4AdRX4PYp X-Received: by 2002:a05:6830:1251:: with SMTP id s17mr4685071otp.108.1575506758992; Wed, 04 Dec 2019 16:45:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575506758; cv=none; d=google.com; s=arc-20160816; b=LWCLjxMmjZL0saoTacr3bWsR4dN0H4x3+qssN8oPV2rFKzg6wcOnstGn9UBTOzwuE3 nOvvjkj8XrQVdBFYfnqmsjyfGBl+0j/AKs/Y7SPIh+34PMkkW7oPIMruTpEvIdmxtpsc ju+Nu+h1rRvUMNLkBpVkhr4xWuk9N40Whd+YLiiOxcK8X53uQAY2m992dGwLTovZQ/iN qVCx/FT0pnM1yUv56oy20/e5vJ/+Ib/0iEq8XhjjHT9V/ao8CTUvFxp+vG2l6+MHELR5 waQ+kSL3DMqkbYJUoiv139QLOoHml7CI9mh69x/kd1HlvlMDfKbYK4topT75cVkG3UEZ JNeA== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :dkim-signature:dkim-filter; bh=/CC29oPu67Q/tmNtvrlijkJ86gIb9KAxAYPLtSeV3Ds=; b=kRKQb3len0vBv56x0MwV7Mr6RPUI6uIdqdMKU+BUqJeeRLK33GiaAUMAZ9l8xBi0ju deBEedrL+cm602PMoaq64URLGh674Ht8cK9QFMp71667e5lFq0MfeUiAGcKis9dskXmW q+7lWS+faUhENiLwG3aoGyDUur9pQ3OlbfSIWRpDmjE5IiTj1/HlBCe8eSyAqJxd6QhL XekeOtL9ABP2Ndjo+oGg02p3oqdzC0a3A0ol94KU4DT5anue4AU1awkCrEUvopTNpYAj YByMlklv81NxsYqLVMPCVAF/kAmhpFom0APMPcd77M6oLTjuwW9mu9XXW+7+LVz7mgeL 3Z8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sysclose.org header.s=201903 header.b=EX3JyqgY; dkim=pass header.i=@sysclose.org header.s=201903 header.b=tsIjByNP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=sysclose.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si4188898oia.264.2019.12.04.16.45.45; Wed, 04 Dec 2019 16:45:58 -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; dkim=pass header.i=@sysclose.org header.s=201903 header.b=EX3JyqgY; dkim=pass header.i=@sysclose.org header.s=201903 header.b=tsIjByNP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=sysclose.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728459AbfLEAo4 (ORCPT + 99 others); Wed, 4 Dec 2019 19:44:56 -0500 Received: from smtp.sysclose.org ([69.164.214.230]:44946 "EHLO sysclose.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728011AbfLEAoz (ORCPT ); Wed, 4 Dec 2019 19:44:55 -0500 X-Greylist: delayed 302 seconds by postgrey-1.27 at vger.kernel.org; Wed, 04 Dec 2019 19:44:55 EST Received: by sysclose.org (Postfix, from userid 5001) id 455883E52; Thu, 5 Dec 2019 00:40:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 sysclose.org 455883E52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sysclose.org; s=201903; t=1575506411; bh=/CC29oPu67Q/tmNtvrlijkJ86gIb9KAxAYPLtSeV3Ds=; h=From:To:Cc:Subject:Date:From; b=EX3JyqgYnsA2SCLr8r3BkBqfLpL8BZqMoqcbG00VLlhPoWsSpLP83FTjr9WWBh++w R7bJx6S8MvGZreMtEC06clKGmkaU3K6yKt5capiYKtaO9/TZiFfVw/U3ZhfyVSqaop 9iBPX1KuzKloCJkzS3KmzH1J16fScUaJWCWc3BuzBiCfCMm1jTG2Skm55Hf6GYMryC ZwSdSyW7gFSMOWWh64ToHnV9QhbbDIGpJWuIEkEwqsFfOme8s88TzdsYL3hYM2OR9k UVsKWeSiHM3Nt8xirUGjzK2TtckOtloDweBySBncZEvejnhKWEyZar3+X473edyksv mnqFJI2DXydvw== X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.sysclose.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (unknown [45.71.104.69]) by sysclose.org (Postfix) with ESMTPSA id 2735130A6; Thu, 5 Dec 2019 00:40:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 sysclose.org 2735130A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sysclose.org; s=201903; t=1575506409; bh=/CC29oPu67Q/tmNtvrlijkJ86gIb9KAxAYPLtSeV3Ds=; h=From:To:Cc:Subject:Date:From; b=tsIjByNPh6g6GQphQt/cG7qg43mVOa8wUS+rZzXZqzmS96oHfBIkumckvlHIpVrDS m5rneD+NOgLP1UgFVWdYWuFbGfjd0q2uHSjdsENT0rnj+udNDIkENDcytN3GvhDpXf OU8j+x5XBQ5sHKn5XWMEnljgFfN9HOxVmXI7pD24jb+sLPV9ogRBfFbZdS77YAMG/d +k4WdQAy4/nLx4pRsDUJGB/AAyOymN7YqwhW3BSn9EI6YrvTEHpQ+YqDOMdfpUY4t6 dRFvbhu1dQJblexHFINXELljXZRtCmgrrqbECcy6o4wIJZ+bNWDVcUZsQ9If3jhftb WWCAAHDOFG+Iw== From: Flavio Leitner To: linux-kernel@vger.kernel.org Cc: Frederic Weisbecker Subject: [PATCH] /proc/stat: fix wrong cpustat gnice value Date: Wed, 4 Dec 2019 21:39:36 -0300 Message-Id: <20191205003936.2635315-1-fbl@sysclose.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The value being used for guest_nice should be CPUTIME_GUEST_NICE and not CPUTIME_USER. Fixes: 26dae145a76c "procfs: Use all-in-one vtime aware kcpustat accessor" Signed-off-by: Flavio Leitner --- fs/proc/stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/proc/stat.c b/fs/proc/stat.c index 37bdbec5b402..fd931d3e77be 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -134,7 +134,7 @@ static int show_stat(struct seq_file *p, void *v) softirq += cpustat[CPUTIME_SOFTIRQ]; steal += cpustat[CPUTIME_STEAL]; guest += cpustat[CPUTIME_GUEST]; - guest_nice += cpustat[CPUTIME_USER]; + guest_nice += cpustat[CPUTIME_GUEST_NICE]; sum += kstat_cpu_irqs_sum(i); sum += arch_irq_stat_cpu(i); @@ -175,7 +175,7 @@ static int show_stat(struct seq_file *p, void *v) softirq = cpustat[CPUTIME_SOFTIRQ]; steal = cpustat[CPUTIME_STEAL]; guest = cpustat[CPUTIME_GUEST]; - guest_nice = cpustat[CPUTIME_USER]; + guest_nice = cpustat[CPUTIME_GUEST_NICE]; seq_printf(p, "cpu%d", i); seq_put_decimal_ull(p, " ", nsec_to_clock_t(user)); seq_put_decimal_ull(p, " ", nsec_to_clock_t(nice)); -- 2.23.0