summaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorAlex Ng <alexng@messages.microsoft.com>2017-08-06 22:12:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-16 18:14:43 +0200
commitc548f3957efa57b6f1a1f4c90013232f6f488682 (patch)
tree91b8429b9c286d807c07910f6c0ee31b4dd2de52 /drivers/hv
parentDrivers: hv: balloon: Show the max dynamic memory assigned (diff)
downloadlinux-c548f3957efa57b6f1a1f4c90013232f6f488682.tar.xz
linux-c548f3957efa57b6f1a1f4c90013232f6f488682.zip
Drivers: hv: balloon: Initialize last_post_time on startup
When left uninitialized, this sometimes fails the following check in post_status(): if (!time_after(now, (last_post_time + HZ))) { return; } This causes unnecessary delays in reporting memory pressure to host after booting up. Signed-off-by: Alex Ng <alexng@messages.microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/hv_balloon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 7cec4826b011..db0e6652d7ef 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -1655,6 +1655,7 @@ static int balloon_probe(struct hv_device *dev,
}
dm_device.state = DM_INITIALIZED;
+ last_post_time = jiffies;
return 0;