lkml.org 
[lkml]   [2013]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/2] Drivers: hv: balloon: Fix a bug in the hot-add code
    Date
    As we hot-add 128 MB chunks of memory, we wait to ensure that the memory
    is onlined before attempting to hot-add the next chunk. If the udev rule for
    memory hot-add is not executed within the allowed time, we would rollback the
    state and abort further hot-add. Since the hot-add has succeeded and the only
    failure is that the memory is not onlined within the allowed time, we should not
    be rolling back the state. Fix this bug.

    Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
    Cc: Stable <stable@vger.kernel.org>
    ---
    drivers/hv/hv_balloon.c | 10 ++--------
    1 files changed, 2 insertions(+), 8 deletions(-)

    diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
    index 4c605c7..bfc7be2 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,
    struct hv_hotadd_state *has)
    {
    int ret = 0;
    - int i, nid, t;
    + int i, nid;
    unsigned long start_pfn;
    unsigned long processed_pfn;
    unsigned long total_pfn = pfn_count;
    @@ -608,13 +608,7 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size,
    /*
    * Wait for the memory block to be onlined.
    */
    - t = wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ);
    - if (t == 0) {
    - pr_info("hot_add memory timedout\n");
    - has->ha_end_pfn -= HA_CHUNK;
    - has->covered_end_pfn -= processed_pfn;
    - break;
    - }
    + wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ);

    }

    --
    1.7.4.1


    \
     
     \ /
      Last update: 2013-07-12 16:21    [W:3.586 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site