qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] Reallocate dma buffers in read/write path i


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 4/4] Reallocate dma buffers in read/write path if needed
Date: Mon, 06 Oct 2008 09:27:48 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Ryan Harper wrote:



There are two concerns with allowing the guest to alloc arbitrary amounts of memory. The first is that QEMU is not written in such a way to be robust in the face of out-of-memory conditions so if we run out of VA space, an important malloc could fail and we'd fall over.

That is an understandable concern and I don't want to make matters
worse, even if the instability already exists in the code as-is.  I think
I'd like to see this fail in practice before I'm really concerned.  For
64-bit builds, is the VA space an issue?


VA space is virtually (groan) unlimited on x86_64. But note that for every kilobyte of virtual address space you allocate, you consume half a byte in nonpagepable kernel memory.

The second concern is that if a guest can allocate arbitrary amounts of memory, it could generate a swap storm. Unfortunately, AFAIK, Linux is not yet to a point where it can deal with swap fairness. Hopefully this is a limitation that the IO controller folks are taking into account.

Sure, but as I mentioned, the amount of memory it can allocate can
surely be controlled by the host system per-process ulimit no?

So if the guest issues some large I/Os in parallel, we kill it?

--
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]