From: Theodore Ts'o <tytso@mit.edu>
To: Namjae Jeon <namjae.jeon@samsung.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: memory leak: data=journal and {collapse,insert,zero}_range
Date: Wed, 21 Oct 2015 10:52:14 -0400 [thread overview]
Message-ID: <20151021145214.GC2165@thunk.org> (raw)
In-Reply-To: <011f01d10be5$099d38d0$1cd7aa70$@samsung.com>
On Wed, Oct 21, 2015 at 06:44:10PM +0900, Namjae Jeon wrote:
> > Interestingly we're not seeing these memory leaks on the truncate
> > path, so I suspect the issue is in how collapse range is clearing
> > pages from the page cache, especially pages that were freshly written
> > to the journal by the commit but which hadn't yet been writtten to
> > disk and then marked as complete so we can allow the relevant
> > transaction to be checkpointed. (Although we're not leaking the
> > journal head structures, but only the buffer heads, so the story most
> > be a bit more complicated than that.)
>
> Okay, Thanks for sharing your view and points !!
>
> Currently I can reproduce memory leak issue without collase/insert/zero range.
> conditions like the following.(collase/insert/zero range are disable with -I -C -z option and add -y option instead of -W)
> 1. small size parition(1GB)
> 2. run fsx with these options "./fsx -N 30000 -o 128000 -l 500000 -r 4096 -t 512 -w 512 -Z -R -y -I -C -z testfile"
> And same result with generic/091 is showing (buffer_head leak)
>
> So I am starting to find root-cause base on your points.
> I will share the result or the patch.
Thanks, that's very interesting data point. So this makes it appear
that the problem *is* probably with how we deal with checkpointing
buffers after the pages get discarded using either a truncate or a
collapse_range, since the 'y' option causes a lot fsync's, and hence
commits, some of which are happening after a truncate command.
Thanks for a taking a look at this. I really appreciate it.
Cheers,
- Ted
next prev parent reply other threads:[~2015-10-21 14:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 16:02 memory leak: data=journal and {collapse,insert,zero}_range Theodore Ts'o
2015-10-20 12:06 ` Namjae Jeon
2015-10-20 15:54 ` Theodore Ts'o
2015-10-21 9:44 ` Namjae Jeon
2015-10-21 14:52 ` Theodore Ts'o [this message]
2015-11-09 5:21 ` Namjae Jeon
2015-11-10 14:49 ` Jan Kara
2015-11-17 4:47 ` Namjae Jeon
2015-11-18 21:36 ` Jan Kara
2015-11-19 9:42 ` Jan Kara
2015-11-20 4:34 ` Namjae Jeon
2015-11-23 13:53 ` Jan Kara
2015-11-24 4:21 ` Namjae Jeon
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=20151021145214.GC2165@thunk.org \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=namjae.jeon@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox