From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: Joanne Koong <joannelkoong@gmail.com>,
Miklos Szeredi <miklos@szeredi.hu>
Cc: Shakeel Butt <shakeel.butt@linux.dev>,
linux-fsdevel@vger.kernel.org, josef@toxicpanda.com,
bernd.schubert@fastmail.fm, hannes@cmpxchg.org,
linux-mm@kvack.org, kernel-team@meta.com
Subject: Re: [PATCH v2 2/2] fuse: remove tmp folio for writebacks and internal rb tree
Date: Fri, 25 Oct 2024 09:38:24 +0800 [thread overview]
Message-ID: <3e4ff496-f2ed-42ef-9f1a-405f32aa1c8c@linux.alibaba.com> (raw)
In-Reply-To: <CAJnrk1YFPZ8=7s4m-CP02_416syO+zDLjNSBrYteUqm8ovoHSQ@mail.gmail.com>
On 10/25/24 12:54 AM, Joanne Koong wrote:
> On Mon, Oct 21, 2024 at 2:05 PM Joanne Koong <joannelkoong@gmail.com> wrote:
>>
>> On Mon, Oct 21, 2024 at 3:15 AM Miklos Szeredi <miklos@szeredi.hu> wrote:
>>>
>>> On Fri, 18 Oct 2024 at 07:31, Shakeel Butt <shakeel.butt@linux.dev> wrote:
>>>
>>>> I feel like this is too much restrictive and I am still not sure why
>>>> blocking on fuse folios served by non-privileges fuse server is worse
>>>> than blocking on folios served from the network.
>>>
>>> Might be. But historically fuse had this behavior and I'd be very
>>> reluctant to change that unconditionally.
>>>
>>> With a systemwide maximal timeout for fuse requests it might make
>>> sense to allow sync(2), etc. to wait for fuse writeback.
>>>
>>> Without a timeout allowing fuse servers to block sync(2) indefinitely
>>> seems rather risky.
>>
>> Could we skip waiting on writeback in sync(2) if it's a fuse folio?
>> That seems in line with the sync(2) documentation Jingbo referenced
>> earlier where it states "The writing, although scheduled, is not
>> necessarily complete upon return from sync()."
>> https://pubs.opengroup.org/onlinepubs/9699919799/functions/sync.html
>>
>
> So I think the answer to this is "no" for Linux. What the Linux man
> page for sync(2) says:
>
> "According to the standard specification (e.g., POSIX.1-2001), sync()
> schedules the writes, but may return before the actual writing is
> done. However Linux waits for I/O completions, and thus sync() or
> syncfs() provide the same guarantees as fsync() called on every file
> in the system or filesystem respectively." [1]
Actually as for FUSE, IIUC the writeback is not guaranteed to be
completed when sync(2) returns since the temp page mechanism. When
sync(2) returns, PG_writeback is indeed cleared for all original pages
(in the address_space), while the real writeback work (initiated from
temp page) may be still in progress.
I think this is also what Miklos means in:
https://lore.kernel.org/all/CAJfpegsJKD4YT5R5qfXXE=hyqKvhpTRbD4m1wsYNbGB6k4rC2A@mail.gmail.com/
Though we need special handling for AS_NO_WRITEBACK_RECLAIM marked pages
in sync(2) codepath similar to what we have done for the direct reclaim
in patch 1.
>
> Regardless of the compaction / page migration issue then, this
> blocking sync(2) is a dealbreaker.
I really should have figureg out the compaction / page migration
mechanism and the potential impact to FUSE when we dropping the temp
page. Just too busy to take some time on this though.....
--
Thanks,
Jingbo
next prev parent reply other threads:[~2024-10-25 1:38 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 18:22 [PATCH v2 0/2] fuse: remove extra page copies in writeback Joanne Koong
2024-10-14 18:22 ` [PATCH v2 1/2] mm: skip reclaiming folios in writeback contexts that may trigger deadlock Joanne Koong
2024-10-14 18:38 ` Shakeel Butt
2024-10-14 21:04 ` Joanne Koong
2024-10-14 23:57 ` Shakeel Butt
2024-10-15 16:59 ` Joanne Koong
2024-10-14 18:22 ` [PATCH v2 2/2] fuse: remove tmp folio for writebacks and internal rb tree Joanne Koong
2024-10-15 10:01 ` Miklos Szeredi
2024-10-15 17:06 ` Joanne Koong
2024-10-15 19:17 ` Shakeel Butt
2024-10-16 9:44 ` Jingbo Xu
2024-10-16 9:57 ` Miklos Szeredi
2024-10-16 9:51 ` Miklos Szeredi
2024-10-16 17:52 ` Shakeel Butt
2024-10-16 18:37 ` Miklos Szeredi
2024-10-16 21:27 ` Shakeel Butt
2024-10-17 13:31 ` Miklos Szeredi
2024-10-18 5:31 ` Shakeel Butt
2024-10-21 10:15 ` Miklos Szeredi
2024-10-21 17:01 ` Shakeel Butt
2024-10-22 15:03 ` Miklos Szeredi
2024-10-21 21:05 ` Joanne Koong
2024-10-24 16:54 ` Joanne Koong
2024-10-25 1:38 ` Jingbo Xu [this message]
2024-10-25 15:32 ` Miklos Szeredi
2024-10-25 17:36 ` Joanne Koong
2024-10-25 18:02 ` Miklos Szeredi
2024-10-25 18:19 ` Joanne Koong
2024-10-28 2:02 ` Jingbo Xu
2024-10-25 18:47 ` Joanne Koong
2024-10-28 2:28 ` Jingbo Xu
2024-10-28 21:57 ` Joanne Koong
2024-10-25 22:40 ` Joanne Koong
2024-10-28 21:58 ` Joanne Koong
2024-10-30 9:32 ` Bernd Schubert
2024-10-30 16:04 ` Joanne Koong
2024-10-30 16:21 ` Bernd Schubert
2024-10-30 17:02 ` Joanne Koong
2024-10-30 17:27 ` Bernd Schubert
2024-10-30 17:35 ` Joanne Koong
2024-10-30 21:56 ` Shakeel Butt
2024-10-30 22:17 ` Bernd Schubert
2024-10-30 22:51 ` Joanne Koong
2024-10-31 0:30 ` Shakeel Butt
2024-10-31 19:06 ` Joanne Koong
2024-10-31 20:06 ` Shakeel Butt
2024-10-31 21:52 ` Joanne Koong
2024-10-31 22:38 ` Shakeel Butt
2024-11-06 23:37 ` Joanne Koong
2024-11-06 23:56 ` Shakeel Butt
2024-11-01 11:44 ` Jingbo Xu
2024-11-01 20:54 ` Joanne Koong
2024-11-04 8:09 ` Jingbo Xu
2024-10-29 22:04 ` Bernd Schubert
2024-10-16 9:56 ` Jingbo Xu
2024-10-16 10:00 ` Miklos Szeredi
2024-10-18 1:30 ` Joanne Koong
2024-10-18 5:57 ` Shakeel Butt
2024-10-18 19:57 ` Joanne Koong
2024-10-18 20:46 ` Shakeel Butt
2024-10-21 9:32 ` Miklos Szeredi
2024-10-18 9:24 ` Jingbo Xu
2024-10-18 20:29 ` Joanne Koong
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=3e4ff496-f2ed-42ef-9f1a-405f32aa1c8c@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=bernd.schubert@fastmail.fm \
--cc=hannes@cmpxchg.org \
--cc=joannelkoong@gmail.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@meta.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=miklos@szeredi.hu \
--cc=shakeel.butt@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.