[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API |
Date: |
Fri, 20 Jul 2012 12:38:30 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Jul 19, 2012 at 01:37:11PM +0200, Paolo Bonzini wrote:
> Il 18/07/2012 17:35, Daniel P. Berrange ha scritto:
> > Oh, and will this library depend on glib
>
> Yes, in all likelihood.
>
> , and will it have the
> > abort-on-oom behaviour QEMU has ? From a libvirt POV, we won't
> > use any library that aborts-on-oom.
>
> Out of curiosity, how do you test OOM?
There's two aspects to it. First we forbid use of malloc/free/realloc
in favour of an alternative set of APIs designed such that we can get
compile time errors when people don't check the result for NULL.
http://berrange.com/posts/2008/05/23/better-living-through-api-design-low-level-memory-allocation/
This has been very successful in ensuring code checks for OOM correctly.
Second there is a mode in our test suites where you can run under
simulated OOM - it runs once to count the total set of mallocs in the
test, and then re-run it 'n' times failing each malloc in turn and
verifying that we correctly report the OOM error condition.
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] [RFC] introduce a dynamic library to expose qemu block API, (continued)
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Andreas Färber, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Kevin Wolf, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Daniel P. Berrange, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Paolo Bonzini, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Daniel P. Berrange, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Kevin Wolf, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Daniel P. Berrange, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Paolo Bonzini, 2012/07/19
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API,
Daniel P. Berrange <=
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Paolo Bonzini, 2012/07/20
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Blue Swirl, 2012/07/23
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Wenchao Xia, 2012/07/25
Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Daniel P. Berrange, 2012/07/09
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Wenchao Xia, 2012/07/10
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Paolo Bonzini, 2012/07/10
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Stefan Hajnoczi, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Daniel P. Berrange, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Stefan Hajnoczi, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Wenchao Xia, 2012/07/16