From: Oleg Drokin <green@namesys.com>
To: Patrick O'Rourke <porourke@egenera.com>
Cc: reiserfs-list@namesys.com
Subject: Re: rsync and memory leak on linux 2.2?
Date: Thu, 13 Feb 2003 22:15:21 +0300 [thread overview]
Message-ID: <20030213221521.A7329@namesys.com> (raw)
In-Reply-To: <1045156304.11405.149.camel@barnes>
Hello!
On Thu, Feb 13, 2003 at 12:11:44PM -0500, Patrick O'Rourke wrote:
> What happens is that we put both systems under a fixed work load and after
> many hours system B will start consuming lots of swap and suffer degraded
> performance. Through some kernel debugging we discovered that the 4K kmalloc
> slab is slowly growing to the point where there is enough memory pressure to
> start swapping. We observe that one of the heaviest users of the 4K slab is
> reiserfs_kmalloc(), and in particular, the calls issued from
> get_mem_for_virtual_node() and reiserfs_file_write(). As an experiment we
> ran the same work load, but this time disabled the rsync'ing of the log files
> and we no longer see the growth in the 4k slab.
> This leads us to believe that we have a memory leak somewhere in the reiserfs
> and was wondering if anyone else has seen this, and if so, if a patch exists.
> One question I have is that get_mem_for_virtual_node() will first attempt to
> allocate memory atomically, and if this fails, will re-try non atomically.
> In this case we return SCHEDULE_OCCURRED which results in fix_nodes()
> will also return to its caller. Is it possible for buffer allocated by
> get_mem_for_virtual_node() to be lost in this case? I did not see any
> path out of reiserfs_file_write() in which we could return w/o freeing
> the buffer. Perhaps this problem is triggered via memory pressure?
Thanks for the report. I will investigate it tomorrow, when it is day again
in Russia.
Meanwile there is easy way to find if there is some memory leaked through
reiserfs_kmalloc. If you enable CONFIG_REISERFS_CHECK kernel option,
then there is code in reiserfs_kmalloc, that cheks if we alloc, but not free
the memory.
It will print a warning once in a while.
But please note that CONFIG_REISERFS_CHECK will impose some (substantial?)
slowdown to reiserfs operations, so you might just unconditionally
enable the check for memleak in there if you cannot afford the slowdown.
Bye,
Oleg
next prev parent reply other threads:[~2003-02-13 19:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-13 17:11 rsync and memory leak on linux 2.2? Patrick O'Rourke
2003-02-13 19:15 ` Oleg Drokin [this message]
2003-02-14 6:38 ` Adrian Phillips
2003-02-14 10:01 ` Oleg Drokin
2003-02-14 10:09 ` Adrian Phillips
2003-02-19 21:24 ` Patrick O'Rourke
2003-02-19 22:18 ` Hans Reiser
2003-02-20 6:19 ` Oleg Drokin
2003-02-14 14:04 ` Patrick O'Rourke
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=20030213221521.A7329@namesys.com \
--to=green@namesys.com \
--cc=porourke@egenera.com \
--cc=reiserfs-list@namesys.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.