diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2018-03-04 22:17:22 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-06 09:57:17 -0800 |
commit | cf21be919c5960da2eb7bc91f8056adb27b56712 (patch) | |
tree | 359dc62a5529d9c9cb1fae9fa6697a3606737d15 /drivers/hv/hv_balloon.c | |
parent | bba072d1627222325e79b7b8e6c0847e4a32d96c (diff) | |
download | linux-cf21be919c5960da2eb7bc91f8056adb27b56712.tar.gz linux-cf21be919c5960da2eb7bc91f8056adb27b56712.tar.bz2 linux-cf21be919c5960da2eb7bc91f8056adb27b56712.zip |
hv_balloon: trace post_status
Hyper-V balloon driver makes non-trivial calculations to convert Linux's
representation of free/used memory to what Hyper-V host expects to see. Add
a tracepoint to see what's being sent and where the data comes from.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/hv_balloon.c')
-rw-r--r-- | drivers/hv/hv_balloon.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 7514a32d0de4..b3e9f13f8bc3 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -34,6 +34,9 @@ #include <linux/hyperv.h> +#define CREATE_TRACE_POINTS +#include "hv_trace_balloon.h" + /* * We begin with definitions supporting the Dynamic Memory protocol * with the host. @@ -1159,6 +1162,9 @@ static void post_status(struct hv_dynmem_device *dm) dm->num_pages_added - dm->num_pages_onlined : 0) + compute_balloon_floor(); + trace_balloon_status(status.num_avail, status.num_committed, + vm_memory_committed(), dm->num_pages_ballooned, + dm->num_pages_added, dm->num_pages_onlined); /* * If our transaction ID is no longer current, just don't * send the status. This can happen if we were interrupted |