numa api: Add statistics
Subsystems (4)
PATCH 27/57 numa api: Add statistics
From: Andi Kleen <[email protected]>
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.
---
25-akpm/include/linux/mmzone.h | 8 +++++++ 25-akpm/mm/page_alloc.c | 42 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 46 insertions(+), 4 deletions(-)
include/linux/mmzone.h renamed from include/linux/mmzone.h~numa-api-statistics +8 -0
@@ -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
mm/page_alloc.c renamed from mm/page_alloc.c~numa-api-statistics +38 -4
76 lines not on this page · raw message
_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>