qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net>
To: Juergen Keil <jk@tools.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] memory leak in user mode network stack
Date: Tue, 14 Sep 2004 08:40:27 +1200	[thread overview]
Message-ID: <1095108026.3155.0.camel@unixadmindazfc2.chh.co.nz> (raw)
In-Reply-To: <200409131646.i8DGk1WO020624@tiger2.tools.intra>

[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]

I can verify this behaviour; I have a bug filed on the savannah site.


D


On Tue, 2004-09-14 at 04:46, Juergen Keil wrote:

> Hi,
> 
> apparently there is a qemu memory leak when -user-net is used.  ftp'ing a
> ~500Mbyte file from the host os to the guest os increases memory usage for
> the "qemu -m 256" process from ~280mb to almost 2gb.
> 
> It seems the problem is in slirp/if.c, if_start().  If fetches queued mbuf's,
> sends them, but does not return the mbufs to the free mbuf pool.
> 
> 
> Shouldn't if_start() return mbufs to the free mbuf pool after transmitting
> the data, like this?
> 
> Index: if.c
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/slirp/if.c,v
> retrieving revision 1.1
> diff -u -B -c -8 -r1.1 if.c
> cvs diff: conflicting specifications of output style
> *** if.c        22 Apr 2004 00:10:47 -0000      1.1
> --- if.c        13 Sep 2004 16:29:32 -0000
> ***************
> *** 310,320 ****
> --- 310,322 ----
>                 if (--ifm->ifq_so->so_queued == 0)
>                    /* If there's no more queued, reset nqueued */
>                    ifm->ifq_so->so_nqueued = 0;
>         }
>   
>         /* Encapsulate the packet for sending */
>           if_encap(ifm->m_data, ifm->m_len);
>   
> +       m_free(ifm);
> + 
>         if (if_queued)
>            goto again;
>   }
> 
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel

-- 
Darryl Dixon <esrever_otua@pythonhacker.is-a-geek.net>

[-- Attachment #2: Type: text/html, Size: 2116 bytes --]

      reply	other threads:[~2004-09-13 20:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-13 16:46 [Qemu-devel] memory leak in user mode network stack Juergen Keil
2004-09-13 20:40 ` Darryl Dixon [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=1095108026.3155.0.camel@unixadmindazfc2.chh.co.nz \
    --to=esrever_otua@pythonhacker.is-a-geek.net \
    --cc=jk@tools.de \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).