Blob Blame History Raw
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sun, 6 Aug 2017 13:12:55 -0700
Patch-mainline: v4.14-rc1
Subject: Drivers: hv: balloon: Initialize last_post_time on startup
Git-commit: c548f3957efa57b6f1a1f4c90013232f6f488682
References: fate#323887

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>
Acked-by: Olaf Hering <ohering@suse.de>
---
 drivers/hv/hv_balloon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
--- 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;