Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1692090imj; Fri, 8 Feb 2019 05:55:25 -0800 (PST) X-Google-Smtp-Source: AHgI3IYGe6za3KZqyaavCKX06SwK9aGl9LDvLrBUsSiw3kd3i1EZkJksq9d6P/H338kPC4I0obNJ X-Received: by 2002:a17:902:8643:: with SMTP id y3mr10255065plt.80.1549634125393; Fri, 08 Feb 2019 05:55:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549634125; cv=none; d=google.com; s=arc-20160816; b=NpMeNcuAcsGl4aZ1YQIvjpB8MzORIeKPEiRvj2TihGABZIj7lz/XCYN2s+c0vjcmN7 1nRS80F7jLWjZU59cQ8RgMPFfxahv1xxmlO8kb8Thi3h3sdSU2xCbhKPRf4VkGQ71rQX gEY3jBM0WAgHpDi9GoTYacqDKCshTjktaKlLaJ/EbomeqiXsrMB4pClAIvX9ZIa+9wSr gS2x9sj4VKGGZhRCmukd3sC7VK/qW9kI53CP6qe4CEKYT306xtFwNcayQ8j6fGePJ1Yx 06/59/jqk3mwTYGY509v5i0mSD8a70psPALZoeFVBlRPM9DsbtwPIQfIt1ppk1Tnabs3 xJ1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:cc:to:from:date:user-agent :message-id; bh=s7HnHDbd1DnfYMgdp2zQz5SHPYuRaWBaX4ISQ9lyvP8=; b=U9lvxYF2r7e5E1U48hPLkjuBv9I67u9AOaiKRijGqo8BiGKxtIh/5t1BOsl9aNQwt5 pcknG37hX3Hp1yDykiuqLQkyxAy8UsVAUnrY4GUorLq7ptDgXeob7YwyTq75jMgHCLHW 1QTNzkJfxZe23N38j361sTMHLAqDXxZZ5pNqgFOYzMNo9HoZSyVA+tJI0V9oj1Bm13hH iQbo8TYXEz9RHip9wRpdNeczHg0SllFX9OFqxSLHpCLkLMX+edc/X+cXXAqd5sagA8rS Yde5mNQ9DuX/IhXdB9y/7XJYM1au/X2+auq+n0ZYoGW6rNhETAVTRWd1HZPwedifPmzD cmzg== 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 t74si2064728pgc.150.2019.02.08.05.55.09; Fri, 08 Feb 2019 05:55:25 -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 S1727661AbfBHNx7 (ORCPT + 99 others); Fri, 8 Feb 2019 08:53:59 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:43868 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726568AbfBHNx7 (ORCPT ); Fri, 8 Feb 2019 08:53:59 -0500 Received: from localhost ([127.0.0.1] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1gs6bJ-000290-M5; Fri, 08 Feb 2019 14:53:53 +0100 Message-Id: <20190208134802.218483159@linutronix.de> User-Agent: quilt/0.65 Date: Fri, 08 Feb 2019 14:48:02 +0100 From: Thomas Gleixner To: LKML Cc: Waiman Long , Matthew Wilcox , Andrew Morton , Alexey Dobriyan , Kees Cook , linux-fsdevel@vger.kernel.org, Davidlohr Bueso , Miklos Szeredi , Daniel Colascione , Dave Chinner , Randy Dunlap , Marc Zyngier Subject: [patch V2 0/2] genirq, proc: Speedup /proc/stat interrupt statistics Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Waiman reported that on large systems with a large amount of interrupts the readout of /proc/stat takes a long time to sum up the interrupt statistics. In principle this is not a problem. but for unknown reasons some enterprise quality software reads /proc/stat with a high frequency. The reason for this is that interrupt statistics are accounted per cpu. So the /proc/stat logic has to sum up the interrupt stats for each interrupt. The following series addresses this by making the interrupt statitics code in the core generate the sum directly and by making the loop in the /proc/stat read function smarter. V1 -> V2: Address review feedback: undo struct layout changes, make variables unsigned and add test results to the changelog. Thanks, tglx 8<---------------- fs/proc/stat.c | 29 ++++++++++++++++++++++++++--- include/linux/irqdesc.h | 1 + kernel/irq/chip.c | 12 ++++++++++-- kernel/irq/internals.h | 8 +++++++- kernel/irq/irqdesc.c | 7 ++++++- 5 files changed, 50 insertions(+), 7 deletions(-)