From: Jason Wang <jasowang@redhat.com>
To: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com,
Stable <stable@vger.kernel.org>
Subject: Re: [PATCH V2 1/2] Drivers: hv: balloon: Fix a bug in the hot-add code
Date: Mon, 15 Jul 2013 13:05:08 +0800 [thread overview]
Message-ID: <51E38304.4090508@redhat.com> (raw)
In-Reply-To: <1373866692-9353-1-git-send-email-kys@microsoft.com>
On 07/15/2013 01:38 PM, K. Y. Srinivasan wrote:
> 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 | 13 +++++--------
> 1 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
> index 4c605c7..61b7351 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;
> @@ -607,14 +607,11 @@ 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.
> */
> - 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);
>
> }
>
Acked-by: Jason Wang <jasowang@redhat.com>
Thanks
next prev parent reply other threads:[~2013-07-15 5:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 5:37 [PATCH V2 0/2] Drivers: hv: balloon: Fix some issues in the balloon driver K. Y. Srinivasan
2013-07-15 5:38 ` [PATCH V2 1/2] Drivers: hv: balloon: Fix a bug in the hot-add code K. Y. Srinivasan
2013-07-15 5:05 ` Jason Wang [this message]
2013-07-15 5:38 ` [PATCH V2 2/2] Drivers: hv: balloon: Do not post pressure status if interrupted K. Y. Srinivasan
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=51E38304.4090508@redhat.com \
--to=jasowang@redhat.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.