qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends


From: malc
Subject: Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends
Date: Sun, 6 Dec 2009 20:47:33 +0300 (MSK)

On Sun, 6 Dec 2009, Avi Kivity wrote:

> On 12/06/2009 06:58 PM, Ian Molton wrote:
> > Avi Kivity wrote:
> >    
> > > On 12/06/2009 01:25 AM, Ian Molton wrote:
> > >      
> > > > Avi Kivity wrote:
> > > > 
> > > > 
> > > >        
> > > > > It's not that it doesn't have a way to report failure, it's that it
> > > > > doesn't fail.  Do you prefer functions that fail and report it to
> > > > > functions that don't fail?
> > > > > 
> > > > >          
> > > > You have a way of allocating memory that will _never_ fail?
> > > >        
> > > Sort of.
> > >      
> > 'sort of' never ?
> > 
> >    
> > > Did you look at the code?
> > >      
> > Yes. Its hardly infallible.
> >    
> 
> It will never fail on Linux.  On other hosts it prevents a broken oom handler
> from taking the guest down a death spiral.

It fails here all the time i'm sorry to say, i have overcommit disabled
(mostly because kpdf when doing a text search tends to overwhelm the VM
subsystem and Linux happily picks X11 as it's OOM kill target)

> 
> > > What about existing usage?  Will you audit all the existing calls?
> > >      
> > mark qemu_malloc as deprecated. don't include new patches that use it.
> > Plenty of time to fix the broken uses...
> >    
> 
> Send patches.  I don't think it's realistic to handle OOM in qemu (handling
> n=0 is easy, but a lot of work for no real gain).
>

-- 
mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]