xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Joanna Rutkowska <joanna@invisiblethingslab.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Marek Marczykowski <marmarek@invisiblethingslab.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Handling of out of memory conditions (was: Re: Strange kernel BUG() on PV DomU boot)
Date: Fri, 22 Jun 2012 14:53:18 +0200	[thread overview]
Message-ID: <4FE46ABE.9010104@invisiblethingslab.com> (raw)
In-Reply-To: <4FE4835D020000780008B6B3@nat28.tlf.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 2455 bytes --]

On 06/22/12 14:38, Jan Beulich wrote:
>> Ok, it seems like this was an out-of-memeory condition indeed, because
>> > once I did:
>> > 
>> > xl mem-set 0 1800m
>> > 
>> > and then quickly started a VM, it booted fine...
> Had you looked at the error value in %rax, you would also
> have seen that it's -ENOMEM. I suppose the problem here is
> that a multi-page allocation was needed, yet only single
> pages were available.
> 

Ah, right, good point.

>> > Is there any proposal of how to handle out of memory conditions in Xen
>> > (like this one, as well as e.g. SWIOTLB problem) in a more user friendly
>> > way?
> In 4.2, I hope we managed to remove all runtime allocations
> larger than a page, so the particular situation here should arise
> anymore.
> 
> As to more user-friendly - what do you think of? An error is an
> error (and converting this to a meaningful, user visible message
> is the responsibility of the entity receiving the error). In the
> case at hand, printing an error message wouldn't meaningfully
> increase user-friendliness imo.
> 

How would you suggest to let the user (in an interactive desktop system,
such as Qubes) know why his or her VM doesn't start? Certainly, some
savvy user might just analyze the guest's dmesg log but that's really
not a user friendly solution. And yet the out of memory errors are
something that might happen quite often and are not really "exception"
or "errors" in the same sense as e.g. traditional BUG() conditions that
suggest something really bad happened. The problem here is that this bug
occurs after the domain has been built, and is now running, so xl start
is not a good place to return the error. Same with SWIOTLB out of memory
errors, that again just prevent the domain from starting. Any other
ideas how to handle such situations more gracefully?

>> > Any recommendations regarding the preferred minimum Xen free memory, as
>> > reported by xl info, that should be preserved in order to assure Xen
>> > runs smoothly?
> In pre-4.2 Xen, there's not much you can do when memory gets
> fragmented (otherwise you'd have to keep more than half the
> memory in the box in the hypervisor). With multi-page runtime
> allocations gone, you should be fine leaving just a minimal amount
> to the hypervisor.

Right, but 4.2 will not be released until weeks or months :/ And we
would like to release Qubes 1.0 within weeks...

joanna.


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

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2012-06-22 12:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 12:21 Strange kernel BUG() on PV DomU boot Joanna Rutkowska
2012-06-22 12:26 ` Joanna Rutkowska
2012-06-22 12:38   ` Jan Beulich
2012-06-22 12:53     ` Joanna Rutkowska [this message]
2012-06-22 13:02       ` Handling of out of memory conditions (was: Re: Strange kernel BUG() on PV DomU boot) Jan Beulich
2012-06-22 13:11         ` Handling of out of memory conditions Joanna Rutkowska
2012-06-22 13:21           ` Jan Beulich
2012-06-22 13:24             ` Joanna Rutkowska
2012-06-22 14:46       ` Handling of out of memory conditions (was: Re: Strange kernel BUG() on PV DomU boot) George Dunlap
2012-06-22 15:22         ` George Dunlap
2012-06-25 15:39       ` Konrad Rzeszutek Wilk

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=4FE46ABE.9010104@invisiblethingslab.com \
    --to=joanna@invisiblethingslab.com \
    --cc=JBeulich@suse.com \
    --cc=marmarek@invisiblethingslab.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).