From: Jan Kara <jack@suse.cz>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: The bug of iput() removal from flusher thread?
Date: Mon, 19 Nov 2012 15:51:40 +0100 [thread overview]
Message-ID: <20121119145140.GA20532@quack.suse.cz> (raw)
In-Reply-To: <873906vumh.fsf@devron.myhome.or.jp>
On Mon 19-11-12 17:56:22, OGAWA Hirofumi wrote:
> OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> writes:
>
> > Hi,
> >
> > In 169ebd90131b2ffca74bb2dbe7eeacd39fb83714 commit, writeback doesn't
> > __iget()/iput() anymore.
> >
> > This means nobody moves the inode to lru list. I.e.
> >
> > new_inode()
> > dirty_inode()
> > iput_final()
> > /* keep inode without adding lru */
> > flush indoes
> > /* clean inode is not on lru */
> >
> > I noticed this situation in my FS though, I think the same bug is on all
> > FSes of linus tree too, after this commit.
> >
> > Am I missing the something?
>
> This seems to be reproducible by the following,
>
> #!/bin/sh
>
> for i in $(seq -w 1000); do
> for j in $(seq -w 1000); do
> for k in $(seq -w 1000); do
> mkdir -p $i/$j
> echo $i/$j/$k > $i/$j/$k
> echo 2 > /proc/sys/vm/drop_caches
> done
> done
> done
>
> Some inodes never be reclaimed, and ls -l frees those inodes (stat(2)
> does iget/iput).
So looking into the code I agree we won't put inode into the LRU when it
is dirty or under writeback and after writeback is done it won't happen
either. That's certainly a bug. But I have hard time reproducing your
results because on my kernels even dcache doesn't get shrunk thus inodes
are pinned in memory by it. Not sure what's going on yet but I'll
investigate. Thanks for report!
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2012-11-19 14:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-17 8:42 The bug of iput() removal from flusher thread? OGAWA Hirofumi
2012-11-19 8:56 ` OGAWA Hirofumi
2012-11-19 14:51 ` Jan Kara [this message]
2012-11-19 19:41 ` Jan Kara
2012-11-19 20:51 ` OGAWA Hirofumi
2012-11-19 21:24 ` Jan Kara
2012-11-19 21:53 ` OGAWA Hirofumi
2012-11-21 1:11 ` Jan Kara
2012-11-21 1:48 ` Jan Kara
2012-11-21 2:44 ` Dave Chinner
2012-11-21 17:08 ` Jan Kara
2012-11-21 8:05 ` Andrew Morton
2012-11-21 8:22 ` Dave Chinner
2012-11-20 22:37 ` Dave Chinner
2012-11-21 1:30 ` Jan Kara
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=20121119145140.GA20532@quack.suse.cz \
--to=jack@suse.cz \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).