From: mjeanson@efficios.com (Michael Jeanson)
Subject: [lttng-dev] [PATCH lttng-modules 2/3] Fix: update writeback instrumentation for kernel 4.14
Date: Wed, 20 Sep 2017 12:12:40 -0400 [thread overview]
Message-ID: <1505923961-19003-2-git-send-email-mjeanson@efficios.com> (raw)
In-Reply-To: <1505923961-19003-1-git-send-email-mjeanson@efficios.com>
See upstream commits:
commit 11fb998986a72aa7e997d96d63d52582a01228c5
Author: Mel Gorman <mgorman at techsingularity.net>
Date: Thu Jul 28 15:46:20 2016 -0700
mm: move most file-based accounting to the node
There are now a number of accounting oddities such as mapped file pages
being accounted for on the node while the total number of file pages are
accounted on the zone. This can be coped with to some extent but it's
confusing so this patch moves the relevant file-based accounted. Due to
throttling logic in the page allocator for reliable OOM detection, it is
still necessary to track dirty and writeback pages on a per-zone basis.
commit c4a25635b60d08853a3e4eaae3ab34419a36cfa2
Author: Mel Gorman <mgorman at techsingularity.net>
Date: Thu Jul 28 15:46:23 2016 -0700
mm: move vmscan writes and file write accounting to the node
As reclaim is now node-based, it follows that page write activity due to
page reclaim should also be accounted for on the node. For consistency,
also account page writes and page dirtying on a per-node basis.
After this patch, there are a few remaining zone counters that may appear
strange but are fine. NUMA stats are still per-zone as this is a
user-space interface that tools consume. NR_MLOCK, NR_SLAB_*,
NR_PAGETABLE, NR_KERNEL_STACK and NR_BOUNCE are all allocations that
potentially pin low memory and cannot trivially be reclaimed on demand.
This information is still useful for debugging a page allocation failure
warning.
Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
instrumentation/events/lttng-module/writeback.h | 26 +++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/instrumentation/events/lttng-module/writeback.h b/instrumentation/events/lttng-module/writeback.h
index 6006c29..c472b33 100644
--- a/instrumentation/events/lttng-module/writeback.h
+++ b/instrumentation/events/lttng-module/writeback.h
@@ -400,6 +400,31 @@ LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
)
)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
+
+ writeback_global_dirty_state,
+
+ TP_PROTO(unsigned long background_thresh,
+ unsigned long dirty_thresh
+ ),
+
+ TP_ARGS(background_thresh,
+ dirty_thresh
+ ),
+
+ TP_FIELDS(
+ ctf_integer(unsigned long, nr_dirty, global_node_page_state(NR_FILE_DIRTY))
+ ctf_integer(unsigned long, nr_writeback, global_node_page_state(NR_WRITEBACK))
+ ctf_integer(unsigned long, nr_unstable, global_node_page_state(NR_UNSTABLE_NFS))
+ ctf_integer(unsigned long, nr_dirtied, global_node_page_state(NR_DIRTIED))
+ ctf_integer(unsigned long, nr_written, global_node_page_state(NR_WRITTEN))
+ ctf_integer(unsigned long, background_thresh, background_thresh)
+ ctf_integer(unsigned long, dirty_thresh, dirty_thresh)
+ ctf_integer(unsigned long, dirty_limit, global_dirty_limit)
+ )
+)
+#else
LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
writeback_global_dirty_state,
@@ -424,6 +449,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
)
)
#endif
+#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
--
2.7.4
next prev parent reply other threads:[~2017-09-20 16:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 16:12 [lttng-dev] [PATCH lttng-modules 1/3] Fix: update block " Michael Jeanson
2017-09-20 16:12 ` Michael Jeanson [this message]
2017-09-20 16:12 ` [lttng-dev] [PATCH lttng-modules 3/3] Fix: update btrfs " Michael Jeanson
2017-09-29 20:20 ` [lttng-dev] [PATCH lttng-modules 1/3] Fix: update block " Mathieu Desnoyers
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=1505923961-19003-2-git-send-email-mjeanson@efficios.com \
--to=mjeanson@efficios.com \
/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