diff options
Diffstat (limited to 'drivers/hv/hv_balloon.c')
-rw-r--r-- | drivers/hv/hv_balloon.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 4c605c70ebf9..deb5c25305af 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c | |||
@@ -562,7 +562,7 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size, | |||
562 | struct hv_hotadd_state *has) | 562 | struct hv_hotadd_state *has) |
563 | { | 563 | { |
564 | int ret = 0; | 564 | int ret = 0; |
565 | int i, nid, t; | 565 | int i, nid; |
566 | unsigned long start_pfn; | 566 | unsigned long start_pfn; |
567 | unsigned long processed_pfn; | 567 | unsigned long processed_pfn; |
568 | unsigned long total_pfn = pfn_count; | 568 | unsigned long total_pfn = pfn_count; |
@@ -607,14 +607,11 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size, | |||
607 | 607 | ||
608 | /* | 608 | /* |
609 | * Wait for the memory block to be onlined. | 609 | * Wait for the memory block to be onlined. |
610 | * Since the hot add has succeeded, it is ok to | ||
611 | * proceed even if the pages in the hot added region | ||
612 | * have not been "onlined" within the allowed time. | ||
610 | */ | 613 | */ |
611 | t = wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ); | 614 | wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ); |
612 | if (t == 0) { | ||
613 | pr_info("hot_add memory timedout\n"); | ||
614 | has->ha_end_pfn -= HA_CHUNK; | ||
615 | has->covered_end_pfn -= processed_pfn; | ||
616 | break; | ||
617 | } | ||
618 | 615 | ||
619 | } | 616 | } |
620 | 617 | ||
@@ -978,6 +975,14 @@ static void post_status(struct hv_dynmem_device *dm) | |||
978 | dm->num_pages_ballooned + | 975 | dm->num_pages_ballooned + |
979 | compute_balloon_floor(); | 976 | compute_balloon_floor(); |
980 | 977 | ||
978 | /* | ||
979 | * If our transaction ID is no longer current, just don't | ||
980 | * send the status. This can happen if we were interrupted | ||
981 | * after we picked our transaction ID. | ||
982 | */ | ||
983 | if (status.hdr.trans_id != atomic_read(&trans_id)) | ||
984 | return; | ||
985 | |||
981 | vmbus_sendpacket(dm->dev->channel, &status, | 986 | vmbus_sendpacket(dm->dev->channel, &status, |
982 | sizeof(struct dm_status), | 987 | sizeof(struct dm_status), |
983 | (unsigned long)NULL, | 988 | (unsigned long)NULL, |