linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: Jan Kara <jack@suse.cz>, Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fs: Do not check if there is a fsnotify watcher on pseudo inodes
Date: Fri, 12 Jun 2020 12:52:28 +0300	[thread overview]
Message-ID: <CAOQ4uxikbJ19npQFWzGm6xnqXm0W8pV3NOWE0ZxS9p_G2A39Aw@mail.gmail.com> (raw)
In-Reply-To: <20200612092603.GB3183@techsingularity.net>

On Fri, Jun 12, 2020 at 12:26 PM Mel Gorman <mgorman@techsingularity.net> wrote:
>
> The kernel uses internal mounts for a number of purposes including pipes.
> On every vfs_write regardless of filesystem, fsnotify_modify() is called
> to notify of any changes which incurs a small amount of overhead in fsnotify
> even when there are no watchers.
>
> A patch is pending that reduces, but does not eliminte, the overhead
> of fsnotify but for the internal mounts, even the small overhead is
> unnecessary. The user API is based on the pathname and a dirfd and proc
> is the only visible path for inodes on an internal mount. Proc does not
> have the same pathname as the internal entry so even if fatrace is used
> on /proc, no events trigger for the /proc/X/fd/ files.
>

This looks like a good direction and I was going to suggest that as well.
However, I am confused by the use of terminology "internal mount".
The patch does not do anything dealing with "internal mount".
If alloc_file_pseudo() is only called for filesystems mounted as
internal mounts,
please include this analysis in commit message.
In any case, not every file of internal mount is allocated with
alloc_file_pseudo(),
right? So maybe it would be better to list all users of alloc_file_pseudo()
and say that they all should be opted out of fsnotify, without mentioning
"internal mount"?

Thanks,
Amir.

  reply	other threads:[~2020-06-12  9:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12  9:26 [PATCH] fs: Do not check if there is a fsnotify watcher on pseudo inodes Mel Gorman
2020-06-12  9:52 ` Amir Goldstein [this message]
2020-06-12 13:18   ` Mel Gorman
2020-06-12 14:52     ` Amir Goldstein
2020-06-12 20:34       ` Amir Goldstein
2020-06-15  8:12         ` Jan Kara
2020-06-15 11:07           ` Amir Goldstein
2020-06-15 12:02         ` Mel Gorman

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=CAOQ4uxikbJ19npQFWzGm6xnqXm0W8pV3NOWE0ZxS9p_G2A39Aw@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --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).