mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
mm,vmacache: add debug data
Introduce a CONFIG_DEBUG_VM_VMACACHE option to enable counting the cache hit rate -- exported in /proc/vmstat. Any updates to the caching scheme needs this kind of data, thus it can save some work re-implementing the counting all the time. Signed-off-by: Davidlohr Bueso <davidlohr@hp.com> Cc: Aswin Chandramouleeswaran <aswin@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6f04f48dc9
commit
4f115147ff
5 changed files with 34 additions and 2 deletions
|
@ -95,6 +95,12 @@ static inline void vm_events_fold_cpu(int cpu)
|
|||
#define count_vm_tlb_events(x, y) do { (void)(y); } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_VM_VMACACHE
|
||||
#define count_vm_vmacache_event(x) count_vm_event(x)
|
||||
#else
|
||||
#define count_vm_vmacache_event(x) do {} while (0)
|
||||
#endif
|
||||
|
||||
#define __count_zone_vm_events(item, zone, delta) \
|
||||
__count_vm_events(item##_NORMAL - ZONE_NORMAL + \
|
||||
zone_idx(zone), delta)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue