public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] syscalls/inotify06: Raise inotify instance limit in /proc
Date: Fri, 7 May 2021 17:02:39 +0200	[thread overview]
Message-ID: <YJVWj39Fx/nVa31a@pevik> (raw)
In-Reply-To: <32425668-9713-c216-38b1-46b57fce2197@suse.cz>

Hi Martin, Jan,

> On 05. 05. 21 18:47, Jan Kara wrote:
> > On Wed 05-05-21 17:38:47, Martin Doucha wrote:
> >> inotify_init() sometimes fails with EMFILE because there are too many
> >> partially closed instances waiting for garbage collection. Bump the limit
> >> in /proc/sys/fs/inotify/max_user_instances for the duration of the test.

> >> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> >> ---

> >> I thought about only reading the procfile and calling yield() after every
> >> proc_limit/2 iterations to wait for garbage collection but I'm afraid that
> >> it might reduce the likelihood of triggering the bug. Since I currently have
> >> no system where I could reproduce the race, I've decided to play it safe and
> >> bump the /proc limit.

> > So waiting would be fine as well. One process simply creates & deletes
> > files in a loop until the other performs TEARDOWNS teardowns. It doesn't
> > really matter how fast teardowns happen for the race to trigger. But I have
> > no problem with this solution either.

> Let's go with the patch as is then. Like I said, when I don't have a
> system where the issue is reproducible, I prefer to play it safe.

Make sense, merged. Thank you both for fixing and review!

Kind regards,
Petr

  reply	other threads:[~2021-05-07 15:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 15:38 [LTP] [PATCH 1/2] syscalls/inotify06: Terminate child process on test error Martin Doucha
2021-05-05 15:38 ` [LTP] [PATCH 2/2] syscalls/inotify06: Raise inotify instance limit in /proc Martin Doucha
2021-05-05 16:47   ` Jan Kara
2021-05-06 15:27     ` Martin Doucha
2021-05-07 15:02       ` Petr Vorel [this message]
2021-05-05 16:48 ` [LTP] [PATCH 1/2] syscalls/inotify06: Terminate child process on test error Jan Kara
2021-05-06  6:56   ` Petr Vorel

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=YJVWj39Fx/nVa31a@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /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