[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3b8d1463-a671-add0-9b92-51e7518f1c07@infradead.org>
Date: Thu, 19 Apr 2018 10:38:42 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Waiman Long <longman@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Kate Stewart <kstewart@...uxfoundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc/stat: Separate out individual irq counts into
/proc/stat_irqs
On 04/19/18 10:09, Waiman Long wrote:
> It was found that reading /proc/stat could be time consuming on
> systems with a lot of irqs. For example, reading /proc/stat in a
> certain 2-socket Skylake server took about 4.6ms because it had over
> 5k irqs. In that particular case, the majority of the CPU cycles for
> reading /proc/stat was spent in the kstat_irqs() function. Therefore,
> application performance can be impacted if the application reads
> /proc/stat rather frequently.
>
> The "intr" line within /proc/stat contains a sum total of all the irqs
> that have happened followed by a list of irq counts for each individual
> irq number. In many cases, the first number is good enough. The
> individual irq counts may not provide that much more information.
>
> In order to avoid this kind of performance issue, all these individual
> irq counts are now separated into a new /proc/stat_irqs file. The
> sum total irq count will stay in /proc/stat and be duplicated in
> /proc/stat_irqs. Applications that need to look up individual irq counts
> will now have to look into /proc/stat_irqs instead of /proc/stat.
>
> Signed-off-by: Waiman Long <longman@...hat.com>
> ---
> fs/proc/stat.c | 48 +++++++++++++++++++++++++++++++++++++++++-------
> 1 file changed, 41 insertions(+), 7 deletions(-)
Also please update Documentation/filesystems/proc.txt.
thanks,
--
~Randy
Powered by blists - more mailing lists