From: Zirong Lang <zlang@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: fstests@vger.kernel.org, eguan@redhat.com
Subject: Re: [PATCH] generic/084: check inotify limit before tail many files
Date: Mon, 17 Aug 2015 09:55:28 -0400 (EDT) [thread overview]
Message-ID: <1701911421.9373716.1439819728197.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20150817050612.GB714@dastard>
----- 原始邮件 -----
> 发件人: "Dave Chinner" <david@fromorbit.com>
> 收件人: "Zirong Lang" <zlang@redhat.com>
> 抄送: fstests@vger.kernel.org, eguan@redhat.com
> 发送时间: 星期一, 2015年 8 月 17日 下午 1:06:12
> 主题: Re: [PATCH] generic/084: check inotify limit before tail many files
>
> On Sun, Aug 16, 2015 at 09:05:19PM -0400, Zirong Lang wrote:
> > Hi Dave,
> >
> > Thanks for your reply.
> >
> > ----- 原始邮件 -----
> > > 发件人: "Dave Chinner" <david@fromorbit.com>
> > > 收件人: "Zorro Lang" <zlang@redhat.com>
> > > 抄送: fstests@vger.kernel.org, eguan@redhat.com
> > > 发送时间: 星期一, 2015年 8 月 17日 上午 8:03:36
> > > 主题: Re: [PATCH] generic/084: check inotify limit before tail many files
> > >
> > > On Fri, Aug 14, 2015 at 12:16:32AM +0800, Zorro Lang wrote:
> > > > generic/084 try to run 'tail' command, tail will use
> > > > inotify, and there're some limit about inotify. I think
> > > > the most important is fs.inotify.max_user_instances, then
> > > > fs.inotify.max_user_watches is importand too.
> > > >
> > > > When I test on a machine with 154 cpu cores, this case
> > > > run failed, and hit many warning likes:
> > > >
> > > > tail: inotify cannot be used, reverting to polling: Too many
> > > > open files
> > > >
> > > > Because the fs.inotify.max_user_instances is 128, so if
> > > > we try to tail 154 files, it will be failed.
> > >
> > > We use 'tail' all over the place in xfstests, so why is only
> > > generic/084 affected?
> >
> > Because generic/084 use try to create $nr_cpu tail processes:
> > for i in `seq 1 $nr_cpu`; do
> > ...
> > tail -f $testfile &
> > ...
> > done
> >
> > And nr_cpu=`$here/src/feature -o`.
> >
> > Generally fs.inotify.max_user_instances is 128, when a machine
> > have more than(or nearly the same) this number, this test will
> > failed.
>
> This information should have been in the patch description - it's
> concurrently run tail commands that are the problem, not a single
> execution of tail...
>
> > Maybe other cases don't try to create so many tail processes, so
> > they passed.
>
> Exactly. The answer is obvious when you explain it fully :)
>
> So, we have other tests that use hundreds of open unlinked files and
> they don't have this problem. That means the issue is how
> generic/084 is creating the unlinked files, not an issue with
> inotify config.
>
> Go look at src/multi_open_unlink.c and tests/xfs/1[28]1, and then
> rewrite generic/084 to use multi_open_unlink to create and hold
> open unlinked files for a specified amount of time.
You're Great! This's a good idea to fix this problem. Thanks very much.
I have sent the V3 patch, and tested on an old kernel to sure
the bug still can be reproduced after I changed.
Thanks,
Zorro Lang
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
>
prev parent reply other threads:[~2015-08-17 13:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 16:16 [PATCH] generic/084: check inotify limit before tail many files Zorro Lang
2015-08-14 6:58 ` Eryu Guan
2015-08-17 0:03 ` Dave Chinner
2015-08-17 1:05 ` Zirong Lang
2015-08-17 5:06 ` Dave Chinner
2015-08-17 13:55 ` Zirong Lang [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=1701911421.9373716.1439819728197.JavaMail.zimbra@redhat.com \
--to=zlang@redhat.com \
--cc=david@fromorbit.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.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