From: Wei Liu <wei.liu2@citrix.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH] xl: don't free additional memory on soft reset
Date: Mon, 1 Feb 2016 10:39:10 +0000 [thread overview]
Message-ID: <20160201103910.GP25660@citrix.com> (raw)
In-Reply-To: <1453978705-13504-1-git-send-email-vkuznets@redhat.com>
On Thu, Jan 28, 2016 at 11:58:25AM +0100, Vitaly Kuznetsov wrote:
> We don't need to free anything extra from Dom0 in order to perform soft
> reset. It can also fail soft reset if it happens that we don't have this
> memory (which we don't need) available.
>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> tools/libxl/xl_cmdimpl.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 25507c7..20704d2 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -2867,11 +2867,13 @@ start:
> if (rc < 0)
> goto error_out;
>
> - ret = freemem(domid, &d_config.b_info);
> - if (ret < 0) {
> - fprintf(stderr, "failed to free memory for the domain\n");
> - ret = ERROR_FAIL;
> - goto error_out;
> + if (domid_soft_reset == INVALID_DOMID) {
> + ret = freemem(domid, &d_config.b_info);
> + if (ret < 0) {
> + fprintf(stderr, "failed to free memory for the domain\n");
> + ret = ERROR_FAIL;
> + goto error_out;
> + }
> }
>
> libxl_asyncprogress_how autoconnect_console_how_buf;
> --
> 2.5.0
>
next prev parent reply other threads:[~2016-02-01 10:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 10:58 [PATCH] xl: don't free additional memory on soft reset Vitaly Kuznetsov
2016-02-01 10:39 ` Wei Liu [this message]
2016-02-03 11:48 ` Ian Campbell
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=20160201103910.GP25660@citrix.com \
--to=wei.liu2@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=vkuznets@redhat.com \
--cc=xen-devel@lists.xen.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).