Skip to content

Commit

Permalink
Drivers: hv: balloon: Initialize last_post_time on startup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Ng authored and Greg Kroah-Hartman committed Aug 16, 2017
1 parent 7b6e54b commit c548f39
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hv/hv_balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1655,6 +1655,7 @@ static int balloon_probe(struct hv_device *dev,
}

dm_device.state = DM_INITIALIZED;
last_post_time = jiffies;

return 0;

Expand Down

0 comments on commit c548f39

Please sign in to comment.