[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable |
Date: |
Tue, 14 Feb 2012 12:46:31 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Feb 14, 2012 at 12:42:58PM +0000, Paul Brook wrote:
> > > abort can create core dumps or start a debugger which is
> > > useful for me and maybe other developers, too.
> >
> > I consider abort() on OOM somewhat eccentric. abort() is for
> > programming errors. Resource shortage is an environmental error that is
> > sometimes (but not always) caused by a programming error.
> >
> > I'd rather inconvenience programmers (by making it a little bit harder
> > to debug programming errors that cause OOM) than confuse users with
> > inappropriate scary "crashes".
>
> While I agree that abort() is not the most friendly failure method, I don't
> tthink it's worth trying to handle OOM gracefully. Once we hit OOM I'd say
> we're pretty much beyond hope. The best thing we can do is exist as quickly
> as possible. For the vast majority of systems there isn't any reason to
> believe things will somehow get better if we try again later.
>
> Initial guest RAM allocation is maybe a special case worth a polite error.
> OTOH if you're near the limit then there's a fair chance the -m allocation
> will succeed, but some later allocation will not.
>
> The only way to handle this rebustly is to pre-allocate all the memory we're
> ever going to need[1]. I don't see that happening.
FWIW, users can already opt-in to pre-allocation if running KVM enabled QEMU
-mem-path /dev/shm -mem-prealloc (or /dev/hugepages more usefully)
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, (continued)
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Zhi Yong Wu, 2012/02/10
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Stefan Weil, 2012/02/10
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Zhi Yong Wu, 2012/02/12
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Stefan Weil, 2012/02/13
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Stefan Hajnoczi, 2012/02/13
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Anthony Liguori, 2012/02/14
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Anthony Liguori, 2012/02/14
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Markus Armbruster, 2012/02/13
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Peter Maydell, 2012/02/13
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Paul Brook, 2012/02/14
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable,
Daniel P. Berrange <=
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Paul Brook, 2012/02/14
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Anthony Liguori, 2012/02/14
Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Eric Blake, 2012/02/10