Hi all, the qemu block interface leaks memory every time a read or write request is issued, this patch fixes it. This is also the bug that is causing stubdomains to crash under high disk IO. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- diff --git a/block.c b/block.c index 36f5eb9..6ce453c 100644 --- a/block.c +++ b/block.c @@ -1378,6 +1378,7 @@ static void bdrv_aio_rw_vector_cb(void *opaque, int ret) qemu_vfree(s->bounce); s->this_aiocb->cb(s->this_aiocb->opaque, ret); qemu_aio_release(s->this_aiocb); + qemu_free(s); } static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs, _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 12 Aug 2009, Stefano Stabellini wrote:> Hi all, > the qemu block interface leaks memory every time a read or write request > is issued, this patch fixes it. > This is also the bug that is causing stubdomains to crash under high > disk IO.I forgot to say that this patch should be backported to 3.4 too.> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > --- > > diff --git a/block.c b/block.c > index 36f5eb9..6ce453c 100644 > --- a/block.c > +++ b/block.c > @@ -1378,6 +1378,7 @@ static void bdrv_aio_rw_vector_cb(void *opaque, int ret) > qemu_vfree(s->bounce); > s->this_aiocb->cb(s->this_aiocb->opaque, ret); > qemu_aio_release(s->this_aiocb); > + qemu_free(s); > } > > static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs, > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Aug 12, 2009 at 12:09 PM, Stefano Stabellini<stefano.stabellini@eu.citrix.com> wrote:> Hi all, > the qemu block interface leaks memory every time a read or write request > is issued, this patch fixes it. > This is also the bug that is causing stubdomains to crash under high > disk IO.Thanks, I''ll retest stubdomains. Keith Coleman _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Is this just for stubdom, or is it a generic qemu problem? (Your patch just gives the filename, no path to it.)> -----Original Message----- > From: Stefano Stabellini [mailto:stefano.stabellini@eu.citrix.com] > Sent: Wednesday, August 12, 2009 10:12 AM > To: Stefano Stabellini > Cc: xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] [PATCH] fix qemu memory leak > > > On Wed, 12 Aug 2009, Stefano Stabellini wrote: > > Hi all, > > the qemu block interface leaks memory every time a read or > write request > > is issued, this patch fixes it. > > This is also the bug that is causing stubdomains to crash under high > > disk IO. > > I forgot to say that this patch should be backported to 3.4 too. > > > > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > > > --- > > > > diff --git a/block.c b/block.c > > index 36f5eb9..6ce453c 100644 > > --- a/block.c > > +++ b/block.c > > @@ -1378,6 +1378,7 @@ static void > bdrv_aio_rw_vector_cb(void *opaque, int ret) > > qemu_vfree(s->bounce); > > s->this_aiocb->cb(s->this_aiocb->opaque, ret); > > qemu_aio_release(s->this_aiocb); > > + qemu_free(s); > > } > > > > static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs, > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 12 Aug 2009, Dan Magenheimer wrote:> Is this just for stubdom, or is it a generic qemu problem? > (Your patch just gives the filename, no path to it.)It is a qemu bug, the path is the root directory of the qemu-xen repository. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
We are putting a heavy load on dom0 and some occasions we see cases where processes appear to stall (based on timestamp information in their log files). I have not been able to determine what causes these processes to starve for CPU cycles but I''m guessing some other higher priority process/service may be coming in periodically and disrupting our process. I''m wondering if there are any Linux tracing/probing tools that work in dom0 that would allow me to capture (with a timestamp) all process context switches. Thanks Roger _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ah, no wonder the two files named block.c in my xen-unstable tree didn''t match the patch! This seems like a very serious bug then. Any idea if its been around a long time or is a recent regression?> -----Original Message----- > From: Stefano Stabellini [mailto:stefano.stabellini@eu.citrix.com] > Sent: Wednesday, August 12, 2009 11:19 AM > To: Dan Magenheimer > Cc: Stefano Stabellini; xen-devel@lists.xensource.com > Subject: RE: [Xen-devel] [PATCH] fix qemu memory leak > > > On Wed, 12 Aug 2009, Dan Magenheimer wrote: > > Is this just for stubdom, or is it a generic qemu problem? > > (Your patch just gives the filename, no path to it.) > > It is a qemu bug, the path is the root directory of the > qemu-xen repository. > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 12 Aug 2009, Dan Magenheimer wrote:> Ah, no wonder the two files named block.c in my xen-unstable > tree didn''t match the patch! > > This seems like a very serious bug then. Any idea if its > been around a long time or is a recent regression? >It was introduced on qemu by: 3b69e4b9ad3483bafcc3adc948703dc78e84ed33 and made its way into qemu-xen at the end of January during the following merge. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
George Dunlap
2009-Aug-13 10:38 UTC
Re: [Xen-devel] Tools for tracing process switching in dom0
Is this in 2.6.18, or 2.6.27 (pv-ops)? I''m not familiar with Linux tracing, but I think whatever is available in either of those kernels should work in a similar way that it does on bare metal. If you want to see what Xen is doing, you can use xentrace. Real Soon Now (hopefully this week) I''ll be releasing xenalyze, which is a pretty powerful tool for extracting information from trace files. -George On Wed, Aug 12, 2009 at 6:36 PM, Roger Cruz<rcruz@marathontechnologies.com> wrote:> > We are putting a heavy load on dom0 and some occasions we see cases > where processes appear to stall (based on timestamp information in their > log files). I have not been able to determine what causes these > processes to starve for CPU cycles but I''m guessing some other higher > priority process/service may be coming in periodically and disrupting > our process. > > I''m wondering if there are any Linux tracing/probing tools that work in > dom0 that would allow me to capture (with a timestamp) all process > context switches. > > Thanks > Roger > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Aug 12, 2009 at 12:33 PM, Keith Coleman<list.keith@scaltro.com> wrote:> On Wed, Aug 12, 2009 at 12:09 PM, Stefano > Stabellini<stefano.stabellini@eu.citrix.com> wrote: >> Hi all, >> the qemu block interface leaks memory every time a read or write request >> is issued, this patch fixes it. >> This is also the bug that is causing stubdomains to crash under high >> disk IO. > > Thanks, I''ll retest stubdomains. > > > Keith Coleman >The disk IO tests that previously crashed my stubdoms within minutes have been running successfully for several days with no signs of trouble. Keith Coleman _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel