提交 f5f302e2 编写于 作者: D Davidlohr Bueso 提交者: Linus Torvalds

mm,vmacache: count number of system-wide flushes

These flushes deal with sequence number overflows, such as for long lived
threads.  These are rare, but interesting from a debugging PoV.  As such,
display the number of flushes when vmacache debugging is enabled.
Signed-off-by: NDavidlohr Bueso <dbueso@suse.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 16a7ade8
...@@ -90,6 +90,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, ...@@ -90,6 +90,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
#ifdef CONFIG_DEBUG_VM_VMACACHE #ifdef CONFIG_DEBUG_VM_VMACACHE
VMACACHE_FIND_CALLS, VMACACHE_FIND_CALLS,
VMACACHE_FIND_HITS, VMACACHE_FIND_HITS,
VMACACHE_FULL_FLUSHES,
#endif #endif
NR_VM_EVENT_ITEMS NR_VM_EVENT_ITEMS
}; };
......
...@@ -17,6 +17,8 @@ void vmacache_flush_all(struct mm_struct *mm) ...@@ -17,6 +17,8 @@ void vmacache_flush_all(struct mm_struct *mm)
{ {
struct task_struct *g, *p; struct task_struct *g, *p;
count_vm_vmacache_event(VMACACHE_FULL_FLUSHES);
/* /*
* Single threaded tasks need not iterate the entire * Single threaded tasks need not iterate the entire
* list of process. We can avoid the flushing as well * list of process. We can avoid the flushing as well
......
...@@ -900,6 +900,7 @@ const char * const vmstat_text[] = { ...@@ -900,6 +900,7 @@ const char * const vmstat_text[] = {
#ifdef CONFIG_DEBUG_VM_VMACACHE #ifdef CONFIG_DEBUG_VM_VMACACHE
"vmacache_find_calls", "vmacache_find_calls",
"vmacache_find_hits", "vmacache_find_hits",
"vmacache_full_flushes",
#endif #endif
#endif /* CONFIG_VM_EVENTS_COUNTERS */ #endif /* CONFIG_VM_EVENTS_COUNTERS */
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册