Thread (48 messages) 48 messages, 6 authors, 2017-01-04

Re: [PATCH 4/7] mm, vmscan: show LRU name in mm_vmscan_lru_isolate tracepoint

From: Michal Hocko <mhocko@kernel.org>
Date: 2017-01-03 20:47:57
Also in: lkml

On Tue 03-01-17 18:08:58, Vlastimil Babka wrote:
On 12/28/2016 04:30 PM, Michal Hocko wrote:
quoted
From: Michal Hocko <mhocko@suse.com>

mm_vmscan_lru_isolate currently prints only whether the LRU we isolate
from is file or anonymous but we do not know which LRU this is. It is
useful to know whether the list is file or anonymous as well. Change
the tracepoint to show symbolic names of the lru rather.

Signed-off-by: Michal Hocko <mhocko@suse.com>
---
 include/trace/events/vmscan.h | 20 ++++++++++++++------
 mm/vmscan.c                   |  2 +-
 2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index 6af4dae46db2..cc0b4c456c78 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -36,6 +36,14 @@
 		(RECLAIM_WB_ASYNC) \
 	)

+#define show_lru_name(lru) \
+	__print_symbolic(lru, \
+			{LRU_INACTIVE_ANON, "LRU_INACTIVE_ANON"}, \
+			{LRU_ACTIVE_ANON, "LRU_ACTIVE_ANON"}, \
+			{LRU_INACTIVE_FILE, "LRU_INACTIVE_FILE"}, \
+			{LRU_ACTIVE_FILE, "LRU_ACTIVE_FILE"}, \
+			{LRU_UNEVICTABLE, "LRU_UNEVICTABLE"})
+
Does this work with external tools such as trace-cmd, i.e. does it export
the correct format file?
How do I find out?
I wouldn't expect it to be that easy to avoid the EM()/EMe() dance :)
Well, I will not pretend I understand the EM dances...
Also can we make the symbolic names lower_case and without the LRU_ prefix?
I think it's more consistent with other mm tracepoints, shorter and nicer.
OK, will make it lowercase without the LRU_ prefix.

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help