summaryrefslogtreecommitdiff
path: root/include/linux/kernel_stat.h
AgeCommit message (Collapse)Author
2008-05-12x86: resize NR_IRQS for large machinesAlan Mayer
On machines with very large numbers of cpus, tables that are dimensioned by NR_IRQS get very large, especially the irq_desc table. They are also very sparsely used. When the cpu count is > MAX_IO_APICS, use MAX_IO_APICS to set NR_IRQS, otherwise use NR_CPUS. Signed-off-by: Alan Mayer <ajm@sgi.com> Reviewed-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-18Add scaled time to taskstats based process accountingMichael Neuling
This adds items to the taststats struct to account for user and system time based on scaling the CPU frequency and instruction issue rates. Adds account_(user|system)_time_scaled callbacks which architectures can use to account for time using this mechanism. Signed-off-by: Michael Neuling <mikey@neuling.org> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Jay Lan <jlan@engr.sgi.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-15sched: guest CPU accounting: add guest-CPU /proc/stat fieldLaurent Vivier
as recent CPUs introduce a third running state, after "user" and "system", we need a new field, "guest", in cpustat to store the time used by the CPU to run virtual CPU. Modify /proc/stat to display this new field. Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net> Acked-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2006-04-26Don't include linux/config.h from anywhere else in include/David Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-03-28[PATCH] for_each_possible_cpu: fixes for generic partKAMEZAWA Hiroyuki
replaces for_each_cpu with for_each_possible_cpu(). Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] small kernel_stat.h cleanupIngo Molnar
cleanup: use for_each_cpu() instead of an open-coded NR_CPUS loop. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-11[PATCH] cputime: introduce cputimeMartin Schwidefsky
This patch introduces the concept of (virtual) cputime. Each architecture can define its method to measure cputime. The main idea is to define a cputime_t type and a set of operations on it (see asm-generic/cputime.h). Then use the type for utime, stime, cutime, cstime, it_virt_value, it_virt_incr, it_prof_value and it_prof_incr and use the cputime operations for each access to these variables. The default implementation is jiffies based and the effect of this patch for architectures which use the default implementation should be neglectible. There is a second type cputime64_t which is necessary for the kernel_stat cpu statistics. The default cputime_t is 32 bit and based on HZ, this will overflow after 49.7 days. This is not enough for kernel_stat (ihmo not enough for a processes too), so it is necessary to have a 64 bit type. The third thing that gets introduced by this patch is an additional field for the /proc/stat interface: cpu steal time. An architecture can account cpu steal time by calls to the account_stealtime function. The cpu which backs a virtual processor doesn't spent all of its time for the virtual cpu. To get meaningful cpu usage numbers this involuntary wait time needs to be accounted and exported to user space. From: Hugh Dickins <hugh@veritas.com> The p->signal check in account_system_time is insufficient. If the timer interrupt hits near the end of exit_notify, after EXIT_ZOMBIE has been set, another cpu may release_task (NULLifying p->signal) in between account_system_time's check and check_rlimit's dereference. Nor should account_it_prof risk send_sig. But surely account_user_time is safe? Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-03-13[PATCH] Use 64-bit counters for scheduler statsAndrew Morton
From: Kingsley Cheung <kingsley@aurema.com> A number of scheduler counters wrap around after 47 days. The context-switch counter can wrap around after considerably less time. Convert them to 64-bit values.
2003-08-17Add irq and softirq time accounting to the kernelDoug Ledford
2003-07-16[PATCH] s390: irq stats.Martin Schwidefsky
Enable irq statistics for s390*. We defined NR_IRQS to 2, one for all i/o interrupts and one for all external interrupts.
2003-07-06[PATCH] Make kstat_this_cpu in terms of __get_cpu_var and use itRusty Russell
kstat_this_cpu() is defined in terms of per_cpu instead of __get_cpu_var. This patch changes that, and uses it everywhere appropriate. The sched.c change puts it in a local variable, which helps gcc generate better code.
2002-11-25[PATCH] kernel_stat cleanupAndrew Morton
Patch from Dipankar Sarma <dipankar@gamebox.net> This is a trivial cleanup removing two old unused macros from kernel_stat.h that made no sense with the new per-CPU kstat. Also included a few finicky coding style changes. Please apply.
2002-10-31[PATCH] make kernel_stat use per-cpu infrastructureAndrew Morton
Patch from Ravikiran G Thirumalai <kiran@in.ibm.com> 1. Break out disk stats from kernel_stat and move disk stat to blkdev.h 2. Group cpu stat in kernel_stat and make them "per_cpu" instead of the NR_CPUS array 3. Remove EXPORT_SYMBOL(kstat) from ksyms.c (as I noticed that no module is using kstat)
2002-10-02[PATCH] "io wait" process accountingAndrew Morton
Patch from Rik adds "I/O wait" statistics to /proc/stat. This allows us to determine how much system time is being spent awaiting IO completion. This is an important statistic, as it tends to directly subtract from job completion time. procps-2.0.9 is OK with this, but doesn't report it.
2002-10-02[PATCH] add /proc/vmstat (start of /proc/stat cleanup)Andrew Morton
Moves the VM accounting out of /proc/stat and into /proc/vmstat. The VM accounting is now per-cpu. It also moves kstat.pgpgin and kstat.pgpgout into /proc/vmstat. Which is a bit of a duplication of /proc/diskstats (SARD), but it's easy, super-cheap and makes life a lot easier for all the system monitoring applications which we just broke. We now require procps 2.0.9. Updated versions of top and vmstat are available at http://surriel.com and the Cygnus CVS is uptodate for these changes. (Rik has the CVS info at the above site). This tidies up kernel_stat quite a lot - it now only contains CPU things (interrupts and CPU loads) and disk things. So we now have: /proc/stat: CPU things and disk things /proc/vmstat: VM things (plus pgpgin, pgpgout) The SARD patch removes the disk things from /proc/stat as well.
2002-07-18[PATCH] VM instrumentationAndrew Morton
A patch from Rik which adds some operational statitics to the VM. In /proc/meminfo: PageTables: Amount of memory used for process pagetables PteChainTot: Amount of memory allocated for pte_chain objects PteChainUsed: Amount of memory currently in use for pte chains. In /proc/stat: pageallocs: Number of pages allocated in the page allocator pagefrees: Number of pages returned to the page allocator (These can be used to measure the allocation rate) pageactiv: Number of pages activated (moved to the active list) pagedeact: Number of pages deactivated (moved to the inactive list) pagefault: Total pagefaults majorfault: Major pagefaults pagescan: Number of pages which shrink_cache looked at pagesteal: Number of pages which shrink_cache freed pageoutrun: Number of calls to try_to_free_pages() allocstall: Number of calls to balance_classzone() Rik will be writing a userspace app which interprets these things. The /proc/meminfo stats are efficient, but the /proc/stat accumulators will cause undesirable cacheline bouncing. We need to break the disk statistics out of struct kernel_stat and make everything else in there per-cpu. If that doesn't happen in time for 2.6 then we disable KERNEL_STAT_INC().
2002-06-17[PATCH] Latest nonlinear CPU patchesRusty Russell
This patch removes the concept of "logical" CPU numbers, in preparation for CPU hotplugging.
2002-04-10Remove bogus networking statsRandy Dunlap
from struct kernel_stat. They are unused and not visible in any way to userspace.
2002-02-05v2.5.1.9 -> v2.5.1.10Linus Torvalds
- Kai Germaschewski: ISDN updates - Al Viro: start moving buffer cache indexing to "struct block_device *" - Greg KH: USB update - Russell King: fix up some ARM merge issues - Ingo Molnar: scalable scheduler
2002-02-04v2.4.7 -> v2.4.7.1Linus Torvalds
- Anton Altaparmakov: NTFS error checking - Johannes Erdfelt: USB updates - OGAWA Hirofumi: FAT update - Alan Cox: driver + s390 update merge - Richard Henderson: fix alpha sigsuspend error return value - Marcelo Tosatti: per-zone VM shortage - Daniel Phillips: generic use-once optimization instead of drop-behind - Bjorn Wesen: Cris architecture update - Anton Altaparmakov: support for Windows Dynamic Disks - James Washer: LDT loading SMP bug fix
2002-02-04Import changesetLinus Torvalds