qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH 1/4] Add a scatter-gather list type and acce


From: Avi Kivity
Subject: Re: [Qemu-devel] Re: [PATCH 1/4] Add a scatter-gather list type and accessors
Date: Thu, 05 Feb 2009 09:25:23 +0200
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Paul Brook wrote:
I disagree about "Linux is fairly useless without overcommit". Certain common linux applications maybe, however...

qemu is one. The use of fork() to run scripts means qemu's memory commit can double, even though in practice this memory will not be used.

I've tried running with strict overcommit control once, the desktop crashed left and right even after adding ridiculous amounts of swap.

Other ways of allocating memory (stack growth, first access to anonymous
memory) are not covered.  They can fail (most ungracefully) without
strict overcommit control.

So I suggest to have qemu_malloc() and its friends abort on failure.

I'll support this. In theory it's sometimes possible to recover from Out Of Memory conditions. However in practice I don't think there's any real scope for this in qemu. If were allocating huge chunks of ram on the fly then something else is already badly wrong.

IMHO pushing the error up (down?) the callchain is unlikely to provide the user with significantly better information, we may as well bail out in qemu_malloc.

I'll post a patch.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.





reply via email to

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