KAMEZAWA Hiroyuki
478735e388
/proc/stat: fix scalability of irq sum of all cpu
...
In /proc/stat, the number of per-IRQ event is shown by making a sum each
irq's events on all cpus. But we can make use of kstat_irqs().
kstat_irqs() do the same calculation, If !CONFIG_GENERIC_HARDIRQ,
it's not a big cost. (Both of the number of cpus and irqs are small.)
If a system is very big and CONFIG_GENERIC_HARDIRQ, it does
for_each_irq()
for_each_cpu()
- look up a radix tree
- read desc->irq_stat[cpu]
This seems not efficient. This patch adds kstat_irqs() for
CONFIG_GENRIC_HARDIRQ and change the calculation as
for_each_irq()
look up radix tree
for_each_cpu()
- read desc->irq_stat[cpu]
This reduces cost.
A test on (4096cpusp, 256 nodes, 4592 irqs) host (by Jack Steiner)
%time cat /proc/stat > /dev/null
Before Patch: 2.459 sec
After Patch : .561 sec
[akpm@linux-foundation.org: unexport kstat_irqs, coding-style tweaks]
[akpm@linux-foundation.org: fix unused variable 'per_irq_sum']
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: Jack Steiner <steiner@sgi.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:13 -07:00
..
2010-10-22 15:34:13 -05:00
2010-10-15 15:53:27 +02:00
2010-10-27 18:03:13 -07:00
2010-10-26 16:52:13 -07:00
2010-09-09 20:48:37 +02:00
2010-10-24 13:41:39 -07:00
2008-02-09 23:27:01 -08:00
2010-08-09 16:48:42 -04:00
2010-07-14 11:29:46 +02:00
2010-07-28 10:18:55 -04:00
2010-08-12 14:23:04 -07:00
2010-08-10 11:39:13 -07:00
2010-07-28 09:58:19 -04:00
2010-07-28 09:58:17 -04:00
2010-08-11 00:28:20 -04:00
2008-06-27 18:09:16 +02:00
2009-12-12 13:08:14 +01:00
2010-04-02 20:12:00 +02:00
2010-10-27 18:03:08 -07:00
2010-10-27 18:03:09 -07:00
2010-09-14 16:08:45 -07:00
2010-10-15 15:53:27 +02:00
2010-06-08 21:40:36 +02:00
2010-10-21 10:12:44 +11:00
2010-10-27 18:03:12 -07:00
2009-09-18 09:48:52 -07:00
2008-10-16 11:21:30 -07:00
2010-03-06 11:26:46 -08:00
2010-08-09 20:45:05 -07:00
2010-10-27 18:03:13 -07:00
2009-04-05 11:04:19 -07:00
2010-10-27 18:03:12 -07:00
2009-07-18 14:19:53 +02:00
2010-09-18 12:19:21 +02:00
2010-10-25 21:26:11 -04:00
2010-09-09 18:57:24 -07:00
2010-10-14 13:29:59 +02:00
2010-08-17 09:11:52 +02:00
2010-10-18 19:58:55 +02:00
2010-10-18 19:58:50 +02:00
2009-11-18 16:32:12 +01:00
2010-09-22 16:30:46 -04:00
2010-05-20 21:04:21 -05:00
2008-10-20 08:52:34 -07:00
2008-07-28 14:37:38 +02:00
2009-12-03 11:50:11 +01:00
2008-12-25 09:31:28 +01:00
2010-10-26 16:52:13 -07:00
2010-10-01 10:50:58 -07:00
2010-08-17 18:07:43 -07:00
2010-10-22 10:52:56 -07:00
2010-05-21 09:37:31 -07:00
2010-06-29 10:07:09 +02:00
2010-03-30 22:02:32 +09:00
2010-05-04 05:38:16 +02:00
2010-04-06 00:15:37 +02:00
2009-02-14 23:27:59 +01:00
2010-10-18 18:44:26 +02:00
2010-10-21 18:52:11 -07:00
2010-10-08 10:46:27 +02:00
2009-10-11 11:20:58 -07:00
2009-12-14 23:55:32 +01:00
2010-09-03 08:19:51 +02:00
2009-01-14 18:09:02 +01:00
2010-02-25 10:34:26 +01:00
2010-10-27 18:03:09 -07:00
2010-03-30 22:02:32 +09:00
2010-08-04 15:23:14 -07:00
2010-08-11 08:59:22 -07:00
2010-08-11 23:04:20 +09:30
2010-10-21 12:54:49 -07:00
2010-03-30 22:02:32 +09:00
2010-08-19 17:18:02 -07:00
2010-10-24 13:41:39 -07:00
2010-08-10 12:07:51 -07:00
2010-07-23 15:08:12 +02:00
2010-10-26 16:52:16 -07:00
2010-10-15 15:53:27 +02:00
2010-10-27 18:03:12 -07:00
2010-08-09 20:45:06 -07:00
2010-10-07 09:43:11 +02:00
2010-08-27 10:51:17 -07:00
2010-08-20 08:55:00 -07:00
2010-09-23 09:16:42 -07:00
2010-09-02 16:15:30 -07:00
2010-09-23 09:16:53 -07:00
2010-10-07 10:41:06 -07:00
2010-09-23 09:16:53 -07:00
2010-05-27 09:12:48 -07:00
2010-03-30 22:02:32 +09:00
2010-05-11 12:01:10 -07:00
2009-04-06 11:14:02 +02:00
2009-12-14 23:55:33 +01:00
2010-10-19 11:29:56 +02:00
2009-12-14 23:55:33 +01:00
2007-12-18 15:21:13 +01:00
2010-06-09 10:34:49 +02:00
2010-07-17 12:06:22 +02:00
2010-07-17 12:06:22 +02:00
2010-07-21 21:46:12 +02:00
2010-10-21 12:55:43 -07:00
2010-10-18 20:52:27 +02:00
2010-04-23 11:02:02 +02:00
2010-10-18 20:52:26 +02:00
2010-06-18 10:46:56 +02:00
2010-10-18 18:41:58 +02:00
2010-10-21 12:55:43 -07:00
2009-03-02 15:41:30 -08:00
2008-08-05 14:33:47 -07:00
2010-10-27 18:03:12 -07:00
2010-09-10 16:48:40 +02:00
2010-10-23 08:25:36 -07:00
2009-12-14 23:55:33 +01:00
2010-09-23 09:14:51 -07:00
2008-12-25 11:44:43 +01:00
2010-10-26 16:52:15 -07:00
2010-09-23 17:03:55 +10:00
2010-08-31 17:00:18 -07:00
2010-05-25 08:07:05 -07:00
2010-10-15 14:42:24 -07:00
2010-10-26 17:58:44 -07:00
2010-03-30 22:02:32 +09:00
2010-10-14 08:55:27 +02:00
2010-07-27 12:40:54 +02:00
2008-05-02 16:18:42 -07:00
2010-10-18 19:58:50 +02:00
2010-10-18 19:58:56 +02:00
2010-03-06 11:26:23 -08:00
2009-09-23 18:13:10 -07:00
2009-01-12 16:04:37 +01:00
2010-06-16 14:55:34 -07:00
2009-12-02 10:22:59 +01:00
2010-10-26 16:52:15 -07:00
2009-11-12 02:04:55 -08:00
2009-06-18 13:03:55 -07:00
2010-10-26 17:32:41 -07:00
2010-10-21 12:54:49 -07:00
2010-06-29 10:07:14 +02:00
2010-10-26 16:52:14 -07:00