From: Jan Kara <jack@suse.cz>
To: Gu Zheng <guzheng1@huawei.com>
Cc: eparis@redhat.com, viro@zeniv.linux.org.uk,
Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
"miaoxie@huawei.com" <miaoxie@huawei.com>
Subject: Re: Fwd: trinity test fanotify cause hungtasks on kernel 4.13
Date: Fri, 28 Jul 2017 09:45:09 +0200 [thread overview]
Message-ID: <20170728074509.GA29433@quack2.suse.cz> (raw)
In-Reply-To: <597AB4ED.9090306@huawei.com>
On Fri 28-07-17 11:52:13, Gu Zheng wrote:
>
> hi,ALL:
> when we used the trinity test the fanotify interfaces, it cause many hungtasks.
> CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
> the shell is simple:
> 1 #!/bin/bash
> 2
> 3 while true
> 4 do
> 5 ./trinity -c fanotify_init -l off -C 2 -X > /dev/null 2>&1 &
> 6 sleep 1
> 7 ./trinity -c fanotify_mark -l off -C 2 -X > /dev/null 2>&1 &
> 8 sleep 10
> 9 done
> we found the trinity enter the D state fastly.
> we check the pids'stack
<snip>
> all progresses are waiting for the response in fanotify_handle_event->fanotify_get_response,
> becauseof non-response or killed monitor,so the waitqueue is in blocked state,
> then the others will be stucked which use the fanotify_get_response.
Yes, this all works as expected.
> if we use wait_event_timeout , the responed time can not be guaranteed.
>
> do you have any ideas?
So if your target is sensible trinity testing of fanotify, what you could
do is that you would gather all descriptors where fanotify_init()
succeeded, watch them and reply to all fanotify events. Alternatively you
could just close these descriptors - that would tear down fanotify instance
and all events will be auto-accepted.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
prev parent reply other threads:[~2017-07-28 7:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5979B8A5.205@huawei.com>
2017-07-28 3:52 ` Fwd: trinity test fanotify cause hungtasks on kernel 4.13 Gu Zheng
2017-07-28 7:45 ` Jan Kara [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=20170728074509.GA29433@quack2.suse.cz \
--to=jack@suse.cz \
--cc=eparis@redhat.com \
--cc=guzheng1@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miaoxie@huawei.com \
--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).