qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] util: Improve os_mem_prealloc error message
@ 2014-10-16 13:13 Michal Privoznik
  2014-10-16 14:52 ` Eric Blake
  2014-10-23  6:41 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  0 siblings, 2 replies; 3+ messages in thread
From: Michal Privoznik @ 2014-10-16 13:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, kwolf

Currently, when the preallocating guest memory process fails, an 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 uses a
clue.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 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");
         exit(1);
     } else {
         int i;
-- 
2.0.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] util: Improve os_mem_prealloc error message
  2014-10-16 13:13 [Qemu-devel] [PATCH] util: Improve os_mem_prealloc error message Michal Privoznik
@ 2014-10-16 14:52 ` Eric Blake
  2014-10-23  6:41 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2014-10-16 14:52 UTC (permalink / raw)
  To: Michal Privoznik, qemu-devel; +Cc: qemu-trivial, kwolf

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

On 10/16/2014 07:13 AM, Michal Privoznik wrote:
> Currently, when the preallocating guest memory process fails, an not

s/an/a/

> 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 uses a

s/uses/users/

> clue.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  util/oslib-posix.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

> 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");
>          exit(1);
>      } else {
>          int i;
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] util: Improve os_mem_prealloc error message
  2014-10-16 13:13 [Qemu-devel] [PATCH] util: Improve os_mem_prealloc error message Michal Privoznik
  2014-10-16 14:52 ` Eric Blake
@ 2014-10-23  6:41 ` Michael Tokarev
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2014-10-23  6:41 UTC (permalink / raw)
  To: Michal Privoznik, qemu-devel; +Cc: qemu-trivial, kwolf

On 10/16/2014 05:13 PM, Michal Privoznik wrote:
> Currently, when the preallocating guest memory process fails, an not
> so helpful error message is printed out:
[..]

Applied to -trivial finally, with small commit message corrections
from Eric.  Thanks!

/mjt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-23  6:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-16 13:13 [Qemu-devel] [PATCH] util: Improve os_mem_prealloc error message Michal Privoznik
2014-10-16 14:52 ` Eric Blake
2014-10-23  6:41 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev

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).