From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: devel@linuxdriverproject.org
Cc: linux-kernel@vger.kernel.org,
Haiyang Zhang <haiyangz@microsoft.com>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Alex Ng <alexng@microsoft.com>
Subject: [PATCH 3/4] Drivers: hv: balloon: get rid on ol_waitevent
Date: Fri, 5 Aug 2016 12:49:06 +0200 [thread overview]
Message-ID: <1470394147-21268-4-git-send-email-vkuznets@redhat.com> (raw)
In-Reply-To: <1470394147-21268-1-git-send-email-vkuznets@redhat.com>
With the recently introduced in-kernel memory onlining
(MEMORY_HOTPLUG_DEFAULT_ONLINE) these it no point in waiting for pages
to come online in the driver and in case the feature is disabled the 5
second wait won't help. Get rid of the waiting.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
drivers/hv/hv_balloon.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 064ef3d..c6252b9 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -535,11 +535,6 @@ struct hv_dynmem_device {
bool host_specified_ha_region;
/*
- * State to synchronize hot-add.
- */
- struct completion ol_waitevent;
- bool ha_waiting;
- /*
* This thread handles hot-add
* requests from the host as well as notifying
* the host with regards to memory pressure in
@@ -583,10 +578,6 @@ static int hv_memory_notifier(struct notifier_block *nb, unsigned long val,
if (val == MEM_ONLINE ||
mutex_is_locked(&dm_device.ha_region_mutex))
mutex_unlock(&dm_device.ha_region_mutex);
- if (dm_device.ha_waiting) {
- dm_device.ha_waiting = false;
- complete(&dm_device.ol_waitevent);
- }
break;
case MEM_OFFLINE:
@@ -644,9 +635,6 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size,
has->covered_end_pfn += processed_pfn;
- init_completion(&dm_device.ol_waitevent);
- dm_device.ha_waiting = true;
-
mutex_unlock(&dm_device.ha_region_mutex);
nid = memory_add_physaddr_to_nid(PFN_PHYS(start_pfn));
ret = add_memory(nid, PFN_PHYS((start_pfn)),
@@ -670,13 +658,6 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size,
break;
}
- /*
- * Wait for the memory block to be onlined.
- * Since the hot add has succeeded, it is ok to
- * proceed even if the pages in the hot added region
- * have not been "onlined" within the allowed time.
- */
- wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ);
mutex_lock(&dm_device.ha_region_mutex);
post_status(&dm_device);
}
--
2.7.4
next prev parent reply other threads:[~2016-08-05 10:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 10:49 [PATCH 0/4] Drivers: hv: balloon: fix WS2012 memory hotplug issues and do some cleanup Vitaly Kuznetsov
2016-08-05 10:49 ` [PATCH 1/4] Drivers: hv: balloon: keep track of where ha_region starts Vitaly Kuznetsov
2016-08-05 10:49 ` [PATCH 2/4] Drivers: hv: balloon: account for gaps in hot add regions Vitaly Kuznetsov
2016-08-06 0:07 ` Alex Ng (LIS)
2016-08-08 9:38 ` Vitaly Kuznetsov
2016-08-05 10:49 ` Vitaly Kuznetsov [this message]
2016-08-10 18:12 ` [PATCH 3/4] Drivers: hv: balloon: get rid on ol_waitevent Alex Ng (LIS)
2016-08-11 9:18 ` Vitaly Kuznetsov
2016-08-05 10:49 ` [PATCH 4/4] Drivers: hv: balloon: replace ha_region_mutex with spinlock Vitaly Kuznetsov
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=1470394147-21268-4-git-send-email-vkuznets@redhat.com \
--to=vkuznets@redhat.com \
--cc=alexng@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).