All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH] xl create: endless loop
Date: Tue, 19 Oct 2010 10:31:31 +0200	[thread overview]
Message-ID: <201010191031.32340.Christoph.Egger@amd.com> (raw)
In-Reply-To: <201010181450.36050.Christoph.Egger@amd.com>

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

On Monday 18 October 2010 14:50:35 Christoph Egger wrote:
> Hi!
>
> I cannot start a guest with 'xl create' due to an endless loop in libxl.c,
> function libxl__get_free_memory_slack():
>
> There is this code snippet:
>
> retry:
>     free_mem_slack_s = libxl__xs_read(gc, XBT_NULL, free_mem_slack_path);
>     if (!free_mem_slack_s) {
>         rc = libxl__fill_dom0_memory_info(gc, &target_memkb);
>         if (rc < 0)
>             return rc;
>         goto retry;
>     } else {
>
>
> libxl__xs_read() returns 0 and libxl__fill_dom0_memory_info() also returns
> 0. So there's a loop of retries.

Attached patch fixes the endless loop.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_xl.diff --]
[-- Type: text/x-diff, Size: 454 bytes --]

diff -r 9d8d6b93114e tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Mon Oct 18 15:24:39 2010 +0200
+++ b/tools/libxl/libxl.c	Tue Oct 19 10:29:00 2010 +0200
@@ -2836,7 +2836,7 @@ retry:
     free_mem_slack_s = libxl__xs_read(gc, XBT_NULL, free_mem_slack_path);
     if (!free_mem_slack_s) {
         rc = libxl__fill_dom0_memory_info(gc, &target_memkb);
-        if (rc < 0)
+        if (rc <= 0)
             return rc;
         goto retry;
     } else {

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  reply	other threads:[~2010-10-19  8:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18 12:50 xl create: endless loop Christoph Egger
2010-10-19  8:31 ` Christoph Egger [this message]
2010-10-21 14:11   ` [PATCH] " Stefano Stabellini
2010-11-03 16:12     ` Christoph Egger
2010-11-04 15:40       ` Christoph Egger
2010-11-08  8:18         ` Zhang, Yang Z
2010-11-09 13:27           ` Christoph Egger
2010-11-09 18:08       ` Stefano Stabellini
2010-11-10 10:34         ` Christoph Egger
2010-11-10 11:52           ` Stefano Stabellini
2010-11-16 13:29             ` Zhang, Yang Z
2010-11-16 14:07               ` Stefano Stabellini
2010-11-16 14:29                 ` Zhang, Yang Z
2010-11-16 14:40                   ` Stefano Stabellini
2010-11-16 14:48                     ` Zhang, Yang Z
2010-11-16 15:57                       ` Stefano Stabellini
2010-11-17  2:50                         ` Daniel Stodden
2010-11-18 10:43                           ` Christoph Egger
2010-11-18 12:21                             ` Stefano Stabellini
2010-12-02 13:43             ` Christoph Egger
2010-12-14 19:04               ` [PATCH] xl create: endless loop [and 1 more messages] Ian Jackson

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=201010191031.32340.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.