From: Nico Pache <npache@redhat.com>
To: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: mhiramat@kernel.org, rostedt@goodmis.org
Subject: [PATCH] tracing: vmscan: add file/anon identifier to lru_shrink_[in]active tracepoints
Date: Fri, 4 Aug 2023 14:53:26 -0600 [thread overview]
Message-ID: <20230804205326.33952-1-npache@redhat.com> (raw)
Add the file variable to the tracepoint data for both the active and
inactive lru shrink functions. This should help increase observability
in the LRU reclaim algorithm.
Signed-off-by: Nico Pache <npache@redhat.com>
---
include/trace/events/vmscan.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index d2123dd960d5..055d50c10842 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -372,6 +372,7 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
__field(unsigned long, nr_unmap_fail)
__field(int, priority)
__field(int, reclaim_flags)
+ __field(int, file)
),
TP_fast_assign(
@@ -388,10 +389,11 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
__entry->nr_unmap_fail = stat->nr_unmap_fail;
__entry->priority = priority;
__entry->reclaim_flags = trace_reclaim_flags(file);
+ __entry->file = file;
),
- TP_printk("nid=%d nr_scanned=%ld nr_reclaimed=%ld nr_dirty=%ld nr_writeback=%ld nr_congested=%ld nr_immediate=%ld nr_activate_anon=%d nr_activate_file=%d nr_ref_keep=%ld nr_unmap_fail=%ld priority=%d flags=%s",
- __entry->nid,
+ TP_printk("nid=%d is_file=%d nr_scanned=%ld nr_reclaimed=%ld nr_dirty=%ld nr_writeback=%ld nr_congested=%ld nr_immediate=%ld nr_activate_anon=%d nr_activate_file=%d nr_ref_keep=%ld nr_unmap_fail=%ld priority=%d flags=%s",
+ __entry->nid, __entry->file,
__entry->nr_scanned, __entry->nr_reclaimed,
__entry->nr_dirty, __entry->nr_writeback,
__entry->nr_congested, __entry->nr_immediate,
@@ -417,6 +419,7 @@ TRACE_EVENT(mm_vmscan_lru_shrink_active,
__field(unsigned long, nr_referenced)
__field(int, priority)
__field(int, reclaim_flags)
+ __field(int, file)
),
TP_fast_assign(
@@ -427,10 +430,11 @@ TRACE_EVENT(mm_vmscan_lru_shrink_active,
__entry->nr_referenced = nr_referenced;
__entry->priority = priority;
__entry->reclaim_flags = trace_reclaim_flags(file);
+ __entry->file = file;
),
- TP_printk("nid=%d nr_taken=%ld nr_active=%ld nr_deactivated=%ld nr_referenced=%ld priority=%d flags=%s",
- __entry->nid,
+ TP_printk("nid=%d is_file=%d nr_taken=%ld nr_active=%ld nr_deactivated=%ld nr_referenced=%ld priority=%d flags=%s",
+ __entry->nid, __entry->file,
__entry->nr_taken,
__entry->nr_active, __entry->nr_deactivated, __entry->nr_referenced,
__entry->priority,
--
2.41.0
reply other threads:[~2023-08-04 20:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230804205326.33952-1-npache@redhat.com \
--to=npache@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®