linux/fs/proc
KAMEZAWA Hiroyuki f2c66cd8ee /proc/stat: scalability of irq num per cpu
/proc/stat shows the total number of all interrupts to each cpu.  But when
the number of IRQs are very large, it take very long time and 'cat
/proc/stat' takes more than 10 secs.  This is because sum of all irq
events are counted when /proc/stat is read.  This patch adds "sum of all
irq" counter percpu and reduce read costs.

The cost of reading /proc/stat is important because it's used by major
applications as 'top', 'ps', 'w', etc....

A test on a mechin (4096cpu, 256 nodes, 4592 irqs) shows

 %time cat /proc/stat > /dev/null
 Before Patch:  12.627 sec
 After  Patch:  2.459 sec

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
..
Kconfig vmcore: it is not experimental any more 2010-10-26 16:52:05 -07:00
Makefile procfs: simplify conditional processing of fs/proc.o. 2010-08-11 08:59:20 -07:00
array.c CRED: Fix get_task_cred() and task_state() to not resurrect dead credentials 2010-07-29 15:16:17 -07:00
base.c signals: move cred_guard_mutex from task_struct to signal_struct 2010-10-27 18:03:12 -07:00
cmdline.c
cpuinfo.c
devices.c
generic.c remove inode_setattr 2010-08-09 16:47:37 -04:00
inode.c bkl: Remove locked .ioctl file operation 2010-08-14 00:24:24 +02:00
internal.h
interrupts.c
kcore.c kcore: add _text to KCORE_TEXT 2010-05-27 09:12:47 -07:00
kmsg.c procfs: Use generic_file_llseek in /proc/kmsg 2010-04-09 16:35:41 +02:00
loadavg.c
meminfo.c
mmu.c
nommu.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
page.c proc: export uncached bit properly in /proc/kpageflags 2010-09-09 18:57:23 -07:00
proc_devtree.c of: Drop properties with "/" in their name 2010-06-13 18:12:24 -06:00
proc_net.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
proc_sysctl.c fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
proc_tty.c Revert "tty: Add a new file /proc/tty/consoles" 2010-10-23 08:14:12 -07:00
root.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
softirqs.c procfs: fix /proc/softirqs formatting 2010-10-27 18:03:13 -07:00
stat.c /proc/stat: scalability of irq num per cpu 2010-10-27 18:03:13 -07:00
task_mmu.c /proc/pid/smaps: export amount of anonymous memory in a mapping 2010-10-27 18:03:13 -07:00
task_nommu.c nommu: add '[stack]' label to /proc/pid/maps output 2010-06-29 15:29:30 -07:00
uptime.c
version.c
vmcore.c /proc/vmcore: fix seeking 2010-09-22 17:22:38 -07:00