From: Peter Zijlstra <peterz@infradead.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
fuse-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2] fuse: permit freezing while waiting for request answer
Date: Fri, 21 Aug 2026 16:57:52 +0200 [thread overview]
Message-ID: <20260821145752.GG687043@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <CAJfpegvRw0Emd=2hsEeg3AvYaLgRBUbMdo-=eUMa3FRFfnetgA@mail.gmail.com>
On Fri, Aug 21, 2026 at 04:33:57PM +0200, Miklos Szeredi wrote:
> On Fri, 21 Aug 2026 at 10:30, Peter Zijlstra <peterz@infradead.org> wrote:
>
> > That would be adding conditionals to the mutex, something we all pay
> > for, always.
>
> It's just one bit (could be stashed into LSB of ->first_waiter),
> Condition is checked before going to sleep, i.e. adds one branch in
> the slow path. Don't think this could be measurable.
I suppose I'm not at all sure how it would differ from having
mutex_lock_freezable(), or how it would help in this situation.
> > One way would be for each file op to be wrapped like 'link-$op-unlink'
> > such that the client (the task doing the file op) gets linked to the
> > server (the task responsible for satisfying the request) before it can
> > block, and unlinked once its done.
>
> Okay, how do you know which task or tasks are responsible for
> satisfying the request? That's not a generally calculable
> information.
>
> sshfs is a simple example: the transport layer process is ssh, but it
> is in no way involved in fuse transactions, there's just a pipe
> between the two. How would the kernel know it has to link the ssh
> process when the pipe is written to?
>
> There are probably many such examples where this fails.
Well, it was 'your' (as in not me) suggestion to have a freeze priority,
which sorta implied you knew what tasks to apply it to :/
Anyway, I suppose that in this case the fuse server is responsible to
communicate this dependency to the kernel -- or the sshfs fuse server
should use libssh and embed the ssh client inside itself, instead of
using pipes, dunno.
next prev parent reply other threads:[~2026-08-21 15:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 2:35 [PATCH v2] fuse: permit freezing while waiting for request answer Sergey Senozhatsky
2026-08-19 10:03 ` Miklos Szeredi
2026-08-20 4:57 ` Sergey Senozhatsky
2026-08-20 8:49 ` Peter Zijlstra
2026-08-20 9:07 ` Sergey Senozhatsky
2026-08-20 9:10 ` Peter Zijlstra
2026-08-20 9:24 ` Sergey Senozhatsky
2026-08-20 9:34 ` Peter Zijlstra
2026-08-20 9:47 ` Sergey Senozhatsky
2026-08-20 10:41 ` Peter Zijlstra
2026-08-20 16:11 ` Miklos Szeredi
2026-08-21 8:30 ` Peter Zijlstra
2026-08-21 11:03 ` Peter Zijlstra
2026-08-21 14:33 ` Miklos Szeredi
2026-08-21 14:57 ` Peter Zijlstra [this message]
2026-08-21 16:21 ` Miklos Szeredi
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=20260821145752.GG687043@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=fuse-devel@lists.linux.dev \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=rafael@kernel.org \
--cc=senozhatsky@chromium.org \
/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.