mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kys@exchange.microsoft.com
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com,
	vkuznets@redhat.com, jasowang@redhat.com,
	leann.ogasawara@canonical.com, marcelo.cerri@canonical.com,
	sthemmin@microsoft.com
Cc: Alex Ng <alexng@messages.microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 4/5] Drivers: hv: balloon: Initialize last_post_time on startup
Date: Sun,  6 Aug 2017 13:12:55 -0700	[thread overview]
Message-ID: <1502050376-23662-4-git-send-email-kys@exchange.microsoft.com> (raw)
In-Reply-To: <1502050348-23624-1-git-send-email-kys@exchange.microsoft.com>

From: Alex Ng <alexng@messages.microsoft.com>

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>
---
 drivers/hv/hv_balloon.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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

  parent reply	other threads:[~2017-08-06 20:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-06 20:12 [PATCH 0/5] Drivers: hv: Miscellaneous fixes kys
2017-08-06 20:12 ` [PATCH 1/5] Tools: hv: vss: Skip freezing filesystems backed by loop kys
2017-08-06 20:12 ` [PATCH 2/5] Drivers: hv: balloon: Correctly update onlined page count kys
2017-08-06 20:12 ` [PATCH 3/5] Drivers: hv: balloon: Show the max dynamic memory assigned kys
2017-08-06 20:12 ` kys [this message]
2017-08-06 20:12 ` [PATCH 5/5] Drivers: hv: kvp: Use MAX_ADAPTER_ID_SIZE for translating adapter id kys

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=1502050376-23662-4-git-send-email-kys@exchange.microsoft.com \
    --to=kys@exchange.microsoft.com \
    --cc=alexng@messages.microsoft.com \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=leann.ogasawara@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.cerri@canonical.com \
    --cc=olaf@aepfle.de \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.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

Powered by JetHome