linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Jan Kara <jack@suse.cz>
Cc: Amir Goldstein <amir73il@gmail.com>,
	viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	shepjeng@gmail.com, kernel@cccheng.net,
	Chung-Chiang Cheng <cccheng@synology.com>,
	Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH] splice: report related fsnotify events
Date: Tue, 4 Apr 2023 10:29:40 -0600	[thread overview]
Message-ID: <fa83cc9a-2303-d32c-1ded-82683df95c2f@kernel.dk> (raw)
In-Reply-To: <20230404092109.evsvdcv6p2e5bvtf@quack3>

On 4/4/23 3:21?AM, Jan Kara wrote:
> On Mon 03-04-23 11:23:25, Jens Axboe wrote:
>> On 4/3/23 11:15?AM, Amir Goldstein wrote:
>>>> On 4/3/23 11:00?AM, Amir Goldstein wrote:
>>>> io_uring does do it for non-polled IO, I don't think there's much point
>>>> in adding it to IOPOLL however. Not really seeing any use cases where
>>>> that would make sense.
>>>>
>>>
>>> Users subscribe to fsnotify because they want to be notified of changes/
>>> access to a file.
>>> Why do you think that polled IO should be exempt?
>>
>> Because it's a drastically different use case. If you're doing high
>> performance polled IO, then you'd never rely on something as slow as
>> fsnotify to tell you of any changes that happened to a device or file.
>> That would be counter productive.
> 
> Well, I guess Amir wanted to say that the application using fsnotify
> is not necessarily the one doing high performance polled IO. You could
> have e.g. data mirroring application A tracking files that need
> mirroring to another host using fsnotify and if some application B
> uses high performance polled IO to modify a file, application A could
> miss the modified file.

Sure, but what I'm trying to say is that if you're using polled IO,
you're doing a custom setup anyway and the likelihood of needing
fsnotify is slim to none. It'd certainly be in your best interesting to
NOT rely on that, for performance reasons. And the latter is presumably
why you'd using polled IO to begin with.

> That being said if I look at exact details, currently I don't see a
> very realistic usecase that would have problems (people don't depend
> on FS_MODIFY or FS_ACCESS events too much, usually they just use
> FS_OPEN / FS_CLOSE), which is likely why nobody reported these issues
> yet :).

The only report I got on io_uring and fsnotify was someone writing a
buffered log with it, and noticing that tail doesn't work if you don't
have fsnotify access notifications. Open/close would not be enough
there.

I'd much rather make fsnotify opt-in for io_uring than have it on by
default, as it's quite the cycler consumer for IRQ based workloads right
now. And that's without even having any watches on the file...

-- 
Jens Axboe


  parent reply	other threads:[~2023-04-04 16:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22  6:25 [PATCH] splice: report related fsnotify events Chung-Chiang Cheng
2023-03-22  7:08 ` Amir Goldstein
2023-04-03 17:00   ` Amir Goldstein
2023-04-03 17:03     ` Jens Axboe
2023-04-03 17:15       ` Amir Goldstein
2023-04-03 17:23         ` Jens Axboe
2023-04-04  9:21           ` Jan Kara
2023-04-04 13:45             ` Amir Goldstein
2023-04-04 16:30               ` Jens Axboe
2023-04-04 16:29             ` Jens Axboe [this message]
2023-04-03 12:31 ` Christian Brauner

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=fa83cc9a-2303-d32c-1ded-82683df95c2f@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=cccheng@synology.com \
    --cc=jack@suse.cz \
    --cc=kernel@cccheng.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=shepjeng@gmail.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).