From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: real mode emulation and memory consumption Date: Fri, 30 Nov 2007 09:20:26 +0200 Message-ID: <474FB9BA.7060108@qumranet.com> References: <1192024390.1905.8.camel@linux> <20071127013124.GB13274@tapir><1196150839.7490.2.camel@linux> <474C7CA1.1040604@qumranet.com> <5461330FA59EDB46BE9AB8AAF2C431AD05DCE0DC@scsmsx412.amr.corp.intel.com> <474D0BAB.3070808@qumranet.com> <5461330FA59EDB46BE9AB8AAF2C431AD05DCE70B@scsmsx412.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: "Kamble, Nitin A" Return-path: In-Reply-To: <5461330FA59EDB46BE9AB8AAF2C431AD05DCE70B-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Kamble, Nitin A wrote: >> Kamble, Nitin A wrote: >> >>> Hi Avi, >>> I am noticing that with SL 10.1 The QEMU process memory consumption >>> steadily increases, up the the guest memory size and then the guest >>> > dies > >>> with unhandled vmexit. If I change the guest memory size I can see >>> > the > >>> qemu process dies accordingly, after reaching the size of allotted >>> > guest > >>> memory. >>> Does this hint you to any issues? >>> >>> >>> >> Are you talking about RSS? That's normal behavior (except for the >> untimely death). kvm allocates memory on demand, like regular Linux >> processes. >> >> > > Yes, the RES column in the TOP. Why is it normal behavior? When the guest accesses a page for the first time, it is added to RSS. When Linux swaps it out, it is removed from RSS. > I see the > guest is looping in the boot-loader switching between real mode and > protected mode without make any progress, and at the same time the > residential memory consumption of the qemu process is steadily > increasing, and once it crosses the amount of physical memory configured > for the guest, the KVM driver gets the invalid vmexit. > Well, this part is not normal ;) however I have no insight as to why it is happening. > The interesting part is if I change the amount of physical memory to > the guest, the time when the guest dies changes accordingly, and looking > at the top output one can predict when it is going to crash. > Where is that memory getting consumed in the qemu process? Why is it > affecting the KVM driver? It's probably just a bug with a surprising side effect. Maybe it is a memory-clearing loop gone wild. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4