[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: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable |
Date: |
Tue, 14 Feb 2012 12:42:58 +0000 |
User-agent: |
KMail/1.13.7 (Linux/3.1.0-1-amd64; KDE/4.6.5; x86_64; ; ) |
> > 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.
Paul
[1] And make sure the kernel isn't lying about how much ram we can have.
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, (continued)
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Daniel P. Berrange, 2012/02/10
- 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 <=
- Re: [Qemu-devel] [PATCH] oslib: make error handling more reasonable, Daniel P. Berrange, 2012/02/14
- 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