Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1860720imu; Thu, 10 Jan 2019 04:22:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN4jf1hIw/je8VPvp6/PHMgKx8VDdp9vW4wSfJwEajxhJ9c8D9KCLxvvN9/0VeUxpzBwFwiG X-Received: by 2002:a63:cb4a:: with SMTP id m10mr8839673pgi.105.1547122941255; Thu, 10 Jan 2019 04:22:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547122941; cv=none; d=google.com; s=arc-20160816; b=MT1dhUehN1ChcghQrLVhnRZleAFwLMCYJdpkDEMI2YShBRLlxHtAJHOb/DjaSakSBy 8WXQQwXf+OGlXrv/gclCkjfg59dXXZ0GmgdvO/vmAhsRM/zptRuT/x3HNzNtUpwVd7Uf ZfsRmX6fXOf1wam5UG/JmEgWkFo8Z6d7LSUaUq36R+99iUL5TMd1miBLmaNU2WCzuPBM /4HdW3mmL2peVFQCq0rTMEHs/HRr1/J6aJ8WONT1DeFXC68dipfP/0QKk1PNSvvAz5O8 eUqZ4YBcBs4CksP+C1DnksW63sl2nmoTnrWqTQs9W7yXc5XZkm2oVNI1VUfgpc3+E6EN uUQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=VYzGOa/q4O95DkX+6YIfJDNNbHLvS20U7eE4uQUeTss=; b=EHBXa6hJVvsP57O35oKpheYZo0EfR2ABiOHlvnxyYZFT3RxfnfGYJrXT6cE+09+i+w MCGVpS7v107HzPhZmZmsGIeUwdJESdlEMMe9HmGLvsEVQpPjvl4da4Qv0lrFqwcFF4c8 EPcgkA2aaXr5+VxWn+wp5BWpm4Rt7CONgq+ZxpZuh8rU8T7R8BCqq8642xWcH48a4AsU RZcRzxZg53aMoM3FRAjIHJKButwHDDxi3SbmTknwbQml4AqJ1rvKWjsC3Pf6tna+8qTG K86MgPCwO8q6hGFZ4/+SOZwgcdXj5eb4T3b+wk55SleVPIcm9/uK4K7AMbMoLjqvxU+4 4BKQ== 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 q20si3086079pgl.268.2019.01.10.04.22.06; Thu, 10 Jan 2019 04:22:21 -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 S1728331AbfAJLVJ (ORCPT + 99 others); Thu, 10 Jan 2019 06:21:09 -0500 Received: from out1.zte.com.cn ([202.103.147.172]:36620 "EHLO mxct.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727806AbfAJLVJ (ORCPT ); Thu, 10 Jan 2019 06:21:09 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id 240F7C0F34802E181BE6; Thu, 10 Jan 2019 19:21:06 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id x0ABKxh9084969; Thu, 10 Jan 2019 19:20:59 +0800 (GMT-8) (envelope-from tan.hu@zte.com.cn) Received: from localhost.localdomain ([10.75.9.60]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2019011019213058-21524191 ; Thu, 10 Jan 2019 19:21:30 +0800 From: Tan Hu To: adobriyan@gmail.com Cc: zhong.weidong@zte.com.cn, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH] proc: only export statistics of softirqs for online cpus Date: Thu, 10 Jan 2019 19:24:01 +0800 Message-Id: <1547119441-28314-1-git-send-email-tan.hu@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2019-01-10 19:21:30, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-01-10 19:20:47, Serialize complete at 2019-01-10 19:20:47 X-MAIL: mse01.zte.com.cn x0ABKxh9084969 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only export statistics of softirqs for online cpus like /proc/interrupts, it would be more clearly. Signed-off-by: Tan Hu --- fs/proc/softirqs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/proc/softirqs.c b/fs/proc/softirqs.c index 12901dc..b7e6a0f 100644 --- a/fs/proc/softirqs.c +++ b/fs/proc/softirqs.c @@ -12,13 +12,13 @@ static int show_softirqs(struct seq_file *p, void *v) int i, j; seq_puts(p, " "); - for_each_possible_cpu(i) + for_each_online_cpu(i) seq_printf(p, "CPU%-8d", i); seq_putc(p, '\n'); for (i = 0; i < NR_SOFTIRQS; i++) { seq_printf(p, "%12s:", softirq_to_name[i]); - for_each_possible_cpu(j) + for_each_online_cpu(j) seq_printf(p, " %10u", kstat_softirqs_cpu(i, j)); seq_putc(p, '\n'); } -- 1.8.3.1