[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PULL 07/23] util: Improve os_mem_prealloc error message

From: Michael Tokarev
Subject: [Qemu-trivial] [PULL 07/23] util: Improve os_mem_prealloc error message
Date: Sun, 2 Nov 2014 14:57:19 +0300

From: Michal Privoznik <address@hidden>

Currently, when the preallocating guest memory process fails, a not
so helpful error message is printed out:

    # virsh start migt10
    error: Failed to start domain migt10
    error: internal error: process exited while connecting to monitor:
    os_mem_prealloc: failed to preallocate pages

>From the error message it's not clear at the first glance where the
problem lies. However, changing the error message might give users a

Signed-off-by: Michal Privoznik <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
 util/oslib-posix.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 016a047..8c9d80e 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -390,7 +390,8 @@ void os_mem_prealloc(int fd, char *area, size_t memory)
     pthread_sigmask(SIG_UNBLOCK, &set, &oldset);
     if (sigsetjmp(sigjump, 1)) {
-        fprintf(stderr, "os_mem_prealloc: failed to preallocate pages\n");
+        fprintf(stderr, "os_mem_prealloc: Insufficient free host memory "
+                        "pages available to allocate guest RAM\n");
     } else {
         int i;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]