From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:60576 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726918AbfAGPNL (ORCPT ); Mon, 7 Jan 2019 10:13:11 -0500 From: Waiman Long To: Andrew Morton , Alexey Dobriyan , Luis Chamberlain , Kees Cook , Jonathan Corbet Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, Davidlohr Bueso , Miklos Szeredi , Daniel Colascione , Dave Chinner , Randy Dunlap , Waiman Long Subject: [PATCH 0/2] /proc/stat: Reduce irqs counting performance overhead Date: Mon, 7 Jan 2019 10:12:56 -0500 Message-Id: <1546873978-27797-1-git-send-email-longman@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: As newer systems have more and more IRQs and CPUs available in their system, the performance of reading /proc/stat frequently is getting worse and worse. Last year, I had proposed patch to extract out the IRQ line of /proc/stat into a new procfs file. However, this may break existing applications that depend on the presence of the IRQ line in /proc/stat. Davidlohr had proposed a new /proc/stat2 file which is almost the same as /proc/stat except that it has no IRQ line. This will require change in applications to use the new procfs file. This patchset uses a different approach to reduce the performance impact by using a sysctl parameter to control the maximum frequency at which the IRQ count computation can be done. The result is that the IRQ counts from /proc/stat may be a bit stale, but still provide the needed information. Waiman Long (2): /proc/stat: Extract irqs counting code into show_stat_irqs() /proc/stat: Add sysctl parameter to control irq counts latency Documentation/sysctl/fs.txt | 16 +++++++++ fs/proc/stat.c | 87 +++++++++++++++++++++++++++++++++++++++------ kernel/sysctl.c | 12 +++++++ 3 files changed, 105 insertions(+), 10 deletions(-) -- 1.8.3.1