public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "Kamble,
	Nitin A" <nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: real mode emulation and memory consumption
Date: Fri, 30 Nov 2007 09:20:26 +0200	[thread overview]
Message-ID: <474FB9BA.7060108@qumranet.com> (raw)
In-Reply-To: <5461330FA59EDB46BE9AB8AAF2C431AD05DCE70B-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.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

  parent reply	other threads:[~2007-11-30  7:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-10 13:53 OpenSolaris 09/2007 (Sun Solaris Express) magicboiz
2007-11-27  1:31 ` Carlo Marcelo Arenas Belon
2007-11-27  8:07   ` magicboiz
2007-11-27 20:22     ` Avi Kivity
     [not found]       ` <474C7CA1.1040604-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-27 23:14         ` Carlo Marcelo Arenas Belon
2007-11-28  1:04         ` real mode emulation and memory consumption Kamble, Nitin A
     [not found]           ` <5461330FA59EDB46BE9AB8AAF2C431AD05DCE0DC-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-11-28  6:33             ` Avi Kivity
     [not found]               ` <474D0BAB.3070808-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-28 18:54                 ` Kamble, Nitin A
     [not found]                   ` <5461330FA59EDB46BE9AB8AAF2C431AD05DCE70B-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-11-30  7:20                     ` Avi Kivity [this message]
2007-11-28  1:12       ` Kamble, Nitin A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=474FB9BA.7060108@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox