public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Zdenek Kabelac" <zdenek.kabelac@gmail.com>
To: "Avi Kivity" <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: Qemu-kvm is leaking my memory ???
Date: Mon, 24 Mar 2008 22:42:17 +0100	[thread overview]
Message-ID: <c4e36d110803241442x210fb9ej799aa3098cd8a3d3@mail.gmail.com> (raw)
In-Reply-To: <47E7D45C.1000609@qumranet.com>

2008/3/24, Avi Kivity <avi@qumranet.com>:
> Avi Kivity wrote:
>  >>
>  >>
>  >> Tested - and actually seeing no difference in my case of memory leak.
>  >> Still it looks like over 30M per execution of qemu is lost.
>  >> (tested with fresh 2.6.25-rc6 with your patch)
>  >>
>  >>
>  >
>  > Can you double check? 2.6.25-rc6 definitely leaks without, and here it
>  > doesn't with the patch.
>  >
>
>
> btw, there's an additional patch I have queued up that might have an
>  effect.  please test the attached (which is my 2.6.25 queue).


Yep - I've made a quick short test - and it looks promising - so far I
can not see the leak
with your additional patch.

But I still have get my busy loop problem. Though now it's sometime
stack-back-traced on the  leaveq  - maybe this instruction might cause
some problems ??

Before this patch - I've always got the back-trace at the point of
copy_user_generic_string -
now its slightly different  -- and still applies when I run the second
dmsetup status - it unblocks the looped one)

Call Trace:
 [<ffffffff8803558d>] :dm_mod:dm_compat_ctl_ioctl+0xd/0x20
 [<ffffffff802bd352>] compat_sys_ioctl+0x182/0x3d0
 [<ffffffff80283d20>] vfs_write+0x130/0x170
 [<ffffffff80221192>] sysenter_do_call+0x1b/0x66


Call Trace:
 [<ffffffff88032100>] ? :dm_mod:table_status+0x0/0x90
 [<ffffffff80436809>] ? error_exit+0x0/0x51
 [<ffffffff88032100>] ? :dm_mod:table_status+0x0/0x90
 [<ffffffff8032d157>] ? copy_user_generic_string+0x17/0x40
 [<ffffffff880332d7>] ? :dm_mod:copy_params+0x87/0xb0
 [<ffffffff80237b11>] ? __capable+0x11/0x30
 [<ffffffff88033469>] ? :dm_mod:ctl_ioctl+0x169/0x260
 [<ffffffff80340712>] ? tty_ldisc_deref+0x62/0x80
 [<ffffffff8034320c>] ? tty_write+0x22c/0x260
 [<ffffffff8803358d>] ? :dm_mod:dm_compat_ctl_ioctl+0xd/0x20
 [<ffffffff802bd352>] ? compat_sys_ioctl+0x182/0x3d0
 [<ffffffff80283d20>] ? vfs_write+0x130/0x170
 [<ffffffff80221192>] ? sysenter_do_call+0x1b/0x66



Here is dissambled  dm_compat_ctl_ioctl:

0000000000001fa0 <dm_compat_ctl_ioctl>:
        return (long)ctl_ioctl(command, (struct dm_ioctl __user *)u);
}

#ifdef CONFIG_COMPAT
static long dm_compat_ctl_ioctl(struct file *file, uint command, ulong u)
{
    1fa0:       55                      push   %rbp
    1fa1:       89 f7                   mov    %esi,%edi
    1fa3:       48 89 e5                mov    %rsp,%rbp
        return r;
}

static long dm_ctl_ioctl(struct file *file, uint command, ulong u)
{
        return (long)ctl_ioctl(command, (struct dm_ioctl __user *)u);
    1fa6:       89 d6                   mov    %edx,%esi
    1fa8:       e8 73 fd ff ff          callq  1d20 <ctl_ioctl>

#ifdef CONFIG_COMPAT
static long dm_compat_ctl_ioctl(struct file *file, uint command, ulong u)
{
        return (long)dm_ctl_ioctl(file, command, (ulong) compat_ptr(u));
}
    1fad:       c9                      leaveq
        return r;
}

static long dm_ctl_ioctl(struct file *file, uint command, ulong u)
{
        return (long)ctl_ioctl(command, (struct dm_ioctl __user *)u);
    1fae:       48 98                   cltq

#ifdef CONFIG_COMPAT
static long dm_compat_ctl_ioctl(struct file *file, uint command, ulong u)
{
        return (long)dm_ctl_ioctl(file, command, (ulong) compat_ptr(u));
}
    1fb0:       c3                      retq

Zdenek

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

      reply	other threads:[~2008-03-24 21:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14 22:14 Qemu-kvm is leaking my memory ??? Zdenek Kabelac
2008-03-16 13:46 ` Avi Kivity
2008-03-19 15:05   ` Zdenek Kabelac
2008-03-19 15:56     ` Avi Kivity
2008-03-19 17:31       ` Zdenek Kabelac
2008-03-19 17:40         ` Avi Kivity
2008-03-23  9:26           ` Zdenek Kabelac
2008-03-23 10:22             ` Avi Kivity
2008-03-23 12:20               ` Avi Kivity
2008-03-23 23:06                 ` Zdenek Kabelac
2008-03-24 10:09                   ` Avi Kivity
2008-03-24 16:18                     ` Avi Kivity
2008-03-24 21:42                       ` Zdenek Kabelac [this message]

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=c4e36d110803241442x210fb9ej799aa3098cd8a3d3@mail.gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /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