Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751686AbdHFUOY (ORCPT ); Sun, 6 Aug 2017 16:14:24 -0400 Received: from a2nlsmtp01-04.prod.iad2.secureserver.net ([198.71.225.38]:36322 "EHLO a2nlsmtp01-04.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751404AbdHFUN7 (ORCPT ); Sun, 6 Aug 2017 16:13:59 -0400 x-originating-ip: 107.180.71.197 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 , "K. Y. Srinivasan" Subject: [PATCH 4/5] Drivers: hv: balloon: Initialize last_post_time on startup Date: Sun, 6 Aug 2017 13:12:55 -0700 Message-Id: <1502050376-23662-4-git-send-email-kys@exchange.microsoft.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1502050348-23624-1-git-send-email-kys@exchange.microsoft.com> References: <1502050348-23624-1-git-send-email-kys@exchange.microsoft.com> Reply-To: kys@microsoft.com X-CMAE-Envelope: MS4wfMwhZF3mKxbtb915J7LRd+REnVoPK1IyTaJKHO1LTqk4P/RBdMwkhZ7Th+7c0QSRUwj5IYZBv+yhgvKs5iEULPt5PE2wUfF/GpwxAarEhhVfqpJtoM5h UzCYAQg7cZqaaklaK8ZuBxIdOmi7ZL3356Btek9uTSsEOy8VU86iZLlvqnQJIWQNhoCGH0w2AqEsdwXwNJ6zvxkrqdcDI/oxGjqfNyVRn4yVf2IclsgWP86M HvvmWNftvG65VU8seAsSCka1WEQC13RWPZa+lyAvRGRWKvvqb0GIwp3C9VAd5eLxXAr5TW+t1UM4LXQvX5bkYjsC4ZcQzMdKmsx3UqaUGc9gU/tphrONiZc5 s54gsoHHKFNVAhOuCIQjsT/C8vlvipgMEM47977CvFqR+aRkYkqRH7v+RTWcmhb5NOXg8CynlFUqpYOleVwnge45tmODuAD5RXPFE9kMjEE+f2AwHhlHIVwX Smg4ZRIw5ELAXT+K/aFIR7F3rVj5K4R2pJUf/ySplIwgm4reZwDvIOJlG9H3YbwDSuEBPUwSCRv+6GTeeMDHhBJ2Q5pyNn//GLdJj/6Ye+IELwcwHpSRnCg9 Nuk= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 803 Lines: 32 From: Alex Ng 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 Signed-off-by: K. Y. Srinivasan --- 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