Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1460480
| From | Vitaly Kuznetsov <vkuznets@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 RESEND 3/4] Drivers: hv: balloon: don't wait for ol_waitevent when memhp_auto_online is enabled |
| Date | 2016-08-11 14:50 +0200 |
| Message-ID | <s4XAS-3T5-13@gated-at.bofh.it> (permalink) |
| References | <s4XAS-3T5-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
With the recently introduced in-kernel memory onlining (MEMORY_HOTPLUG_DEFAULT_ONLINE) these is no point in waiting for pages to come online in the driver and we can get rid of the waiting. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> --- drivers/hv/hv_balloon.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 064ef3d..a8b8b9a 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -645,7 +645,7 @@ 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; + dm_device.ha_waiting = !memhp_auto_online; mutex_unlock(&dm_device.ha_region_mutex); nid = memory_add_physaddr_to_nid(PFN_PHYS(start_pfn)); @@ -671,12 +671,14 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size, } /* - * 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 the memory block to be onlined when memory onlining + * is done outside of kernel (memhp_auto_online). 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); + if (dm_device.ha_waiting) + wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ); mutex_lock(&dm_device.ha_region_mutex); post_status(&dm_device); } -- 2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 RESEND 0/4] Drivers: hv: balloon: fix WS2012 memory hotplug issues and do some cleanup Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-08-11 14:50 +0200
[PATCH v2 RESEND 3/4] Drivers: hv: balloon: don't wait for ol_waitevent when memhp_auto_online is enabled Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-08-11 14:50 +0200
[PATCH v2 RESEND 2/4] Drivers: hv: balloon: account for gaps in hot add regions Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-08-11 14:50 +0200
RE: [PATCH v2 RESEND 2/4] Drivers: hv: balloon: account for gaps in hot add regions "Alex Ng (LIS)" <alexng@microsoft.com> - 2016-08-16 00:40 +0200
Re: [PATCH v2 RESEND 2/4] Drivers: hv: balloon: account for gaps in hot add regions Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-08-16 10:50 +0200
RE: [PATCH v2 RESEND 2/4] Drivers: hv: balloon: account for gaps in hot add regions "Alex Ng (LIS)" <alexng@microsoft.com> - 2016-08-16 23:50 +0200
[PATCH v2 RESEND 4/4] Drivers: hv: balloon: replace ha_region_mutex with spinlock Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-08-11 14:50 +0200
[PATCH v2 RESEND 1/4] Drivers: hv: balloon: keep track of where ha_region starts Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-08-11 15:00 +0200
csiph-web