diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-22 08:05:02 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-22 08:05:02 -0700 |
| commit | 6633401dda1a4994174344c80685cd89c7d1e83c (patch) | |
| tree | 1030eb9163145049102508b1efa047ba1de72ff5 /include | |
| parent | e52c02f76ae684f86f18f0fc7d7577e22a4d9318 (diff) | |
[PATCH] numa api: Add statistics
From: Andi Kleen <ak@suse.de>
Add NUMA hit/miss statistics to page allocation and display them in sysfs.
This is not 100% required for NUMA API, but without this it is very
The overhead is quite low because all counters are per CPU and only happens
when CONFIG_NUMA is defined.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/mmzone.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 51b8f3f67741..f1e1a727acb2 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -52,6 +52,14 @@ struct per_cpu_pages { struct per_cpu_pageset { struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */ +#ifdef CONFIG_NUMA + unsigned long numa_hit; /* allocated in intended node */ + unsigned long numa_miss; /* allocated in non intended node */ + unsigned long numa_foreign; /* was intended here, hit elsewhere */ + unsigned long interleave_hit; /* interleaver prefered this zone */ + unsigned long local_node; /* allocation from local node */ + unsigned long other_node; /* allocation from other node */ +#endif } ____cacheline_aligned_in_smp; #define ZONE_DMA 0 |
