public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolaus Rath <Nikolaus@rath.org>
To: Miklos Szeredi via fuse-devel <fuse-devel@lists.sourceforge.net>
Cc: Askar Safin <safinaskar@gmail.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	linux-pm@vger.kernel.org,
	Bernd Schubert <bernd.schubert@fastmail.fm>,
	linux-kernel@vger.kernel.org,
	Luis Chamberlain <mcgrof@kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [fuse-devel] [PATCH 0/6] vfs: provide automatic kernel freeze / resume
Date: Tue, 06 Jun 2023 20:37:29 +0100	[thread overview]
Message-ID: <871qiopekm.fsf@vostro.rath.org> (raw)
In-Reply-To: <CAJfpeguZX5pF8-UNsSfJmMhpgeUFT5XyG_rDzMD-4pB+MjkhZA@mail.gmail.com> (Miklos Szeredi via fuse-devel's message of "Tue, 6 Jun 2023 16:37:51 +0200")

On Jun 06 2023, Miklos Szeredi via fuse-devel <fuse-devel@lists.sourceforge.net> wrote:
> On Sun, 14 May 2023 at 00:04, Askar Safin <safinaskar@gmail.com> wrote:
>>
>> Will this patch fix a long-standing fuse vs suspend bug? (
>> https://bugzilla.kernel.org/show_bug.cgi?id=34932 )
>
> No.
>
> The solution to the fuse issue is to freeze processes that initiate
> fuse requests *before* freezing processes that serve fuse requests.
>
> The problem is finding out which is which.  This can be complicated by
> the fact that a process could be both serving requests *and*
> initiating them (even without knowing).
>
> The best idea so far is to let fuse servers set a process flag
> (PF_FREEZE_LATE) that is inherited across fork/clone.

Is that the same as what userspace calls PR_SET_IO_FLUSHER? From
prctl(2):

   PR_SET_IO_FLUSHER (since Linux 5.6)
          If a user process is involved in the block layer or filesystem I/O  path,  and
          can allocate memory while processing I/O requests it must set arg2 to 1.  This
          will put the process in the IO_FLUSHER state, which allows it  special  treat‐
          ment  to make progress when allocating memory. [..]

          The calling process must have the CAP_SYS_RESOURCE capability.[...]

          Examples  of  IO_FLUSHER  applications are FUSE daemons, SCSI device emulation
          daemons, and daemons that perform error handling like multipath path  recovery
          applications.
          

To me this sounds like it captures the relevant information (process is
involved in filesystem I/O) rather than just a preferred behavior (flush
late) and may thus be a better choice...

Best,
-Nikolaus

  parent reply	other threads:[~2023-06-06 19:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPnZJGDWUT0D7cT_kWa6W9u8MHwhG8ZbGpn=uY4zYRWJkzZzjA@mail.gmail.com>
2023-06-06 14:37 ` [PATCH 0/6] vfs: provide automatic kernel freeze / resume Miklos Szeredi
2023-06-06 15:47   ` Askar Safin
2023-06-06 19:37   ` Nikolaus Rath [this message]
2023-06-07  7:04     ` [fuse-devel] " Miklos Szeredi
2023-06-06 20:18   ` Bernd Schubert
2023-06-07  7:21     ` Miklos Szeredi
2023-06-07  8:11       ` Bernd Schubert
2023-06-07  9:29         ` Miklos Szeredi
2023-06-07 11:13   ` Askar Safin
2023-06-07 13:42     ` Miklos Szeredi
2023-06-09 12:49       ` Askar Safin

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=871qiopekm.fsf@vostro.rath.org \
    --to=nikolaus@rath.org \
    --cc=bernd.schubert@fastmail.fm \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=safinaskar@gmail.com \
    /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