From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32AEEC7EE43 for ; Tue, 6 Jun 2023 19:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239173AbjFFThj (ORCPT ); Tue, 6 Jun 2023 15:37:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239072AbjFFThi (ORCPT ); Tue, 6 Jun 2023 15:37:38 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4826F10FB; Tue, 6 Jun 2023 12:37:36 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 097CB5C00D2; Tue, 6 Jun 2023 15:37:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 06 Jun 2023 15:37:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rath.org; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1686080253; x=1686166653; bh=NTnXhnoqb0BYacM6NQK+0UgwTN4rdTNC2WS g2wWyOQw=; b=KDIpHOMO3ve/dRhLkpSiLam6SZCCPR8zvN+r5nqpK5JWykfWjw8 zgz+gTbTElyRHDsJLTllZf3Gp8wOniUlGeZc5QYi4EjqTDtxB9utSq8f7Z/hcOaY UJ5WQvRdtCYeXQVQREGnGiiH2y/XJRacUqii72ahOrXeYGKU4H+1BM7YZJUd6JZ/ SKsy8+T3Wunmbtb0nmPqD3z+AXSRoX3jtrV3LUBAAjBsY/BwCYy6qSxlAncyMMjU BN2vKrzh6eny1u17h8nObe/jgEqMKg+rCnP2FR+8qxq/vGQ4t8B4ZYaKlKTcRsnc oVJPjW/mzigfvTZUfASYsfAIuIUx8DNa08g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1686080253; x=1686166653; bh=NTnXhnoqb0BYacM6NQK+0UgwTN4rdTNC2WS g2wWyOQw=; b=Pb7xpZTKp0qAtM9JJOAb8bDSiEVJaAvb2rmLl1qNaLPSROmUQzQ XXGI2+4BuMf+9d9WVbBa23h74PBRLGGfWMoE5AMTluWIlJuCCTiWjWy+pP8OvEEj hapxarEYOo+8B8fqeviRm+B42MMT9YTjiH5a5HtvHVS7XPElA6gFPSuTGtF7fQYy L9Pm5jqbT9QLRrLfhUMB8JPsM3LsBGFeFau44gsolpFuksJKAWhrsiPexz+jcSqW 9bQaiwXUsYTpQHvf+nfypW3z8y7Cxrmd5wfW9+9MGH4Gci55Deeg6lOCAyInjssG Uzbu3Iq/OeR86rCP/UZRUIYBDL97JsFVjyw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedtuddgudegudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufhfffgjkfgfgggtgfesthhqtddttderjeenucfhrhhomheppfhi khholhgruhhsucftrghthhcuoefpihhkohhlrghushesrhgrthhhrdhorhhgqeenucggtf frrghtthgvrhhnpeetheettdduieelvdfhteeglefhudffteejieetjeelhfetuedvvddu fffggeeuudenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomheppfhikhholhgruhhssehrrghthhdr ohhrgh X-ME-Proxy: Feedback-ID: i53a843ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 6 Jun 2023 15:37:32 -0400 (EDT) Received: from vostro.rath.org (vostro [192.168.12.4]) by ebox.rath.org (Postfix) with ESMTPS id A43A09D9; Tue, 6 Jun 2023 19:37:30 +0000 (UTC) Received: by vostro.rath.org (Postfix, from userid 1000) id B37FAD0251; Tue, 6 Jun 2023 21:37:29 +0200 (CEST) From: Nikolaus Rath To: Miklos Szeredi via fuse-devel Cc: Askar Safin , Miklos Szeredi , linux-pm@vger.kernel.org, Bernd Schubert , linux-kernel@vger.kernel.org, Luis Chamberlain , linux-fsdevel@vger.kernel.org Subject: Re: [fuse-devel] [PATCH 0/6] vfs: provide automatic kernel freeze / resume References: Mail-Copies-To: never Mail-Followup-To: Miklos Szeredi via fuse-devel , Askar Safin , Miklos Szeredi , linux-pm@vger.kernel.org, Bernd Schubert , linux-kernel@vger.kernel.org, Luis Chamberlain , linux-fsdevel@vger.kernel.org Date: Tue, 06 Jun 2023 20:37:29 +0100 In-Reply-To: (Miklos Szeredi via fuse-devel's message of "Tue, 6 Jun 2023 16:37:51 +0200") Message-ID: <871qiopekm.fsf@vostro.rath.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Jun 06 2023, Miklos Szeredi via fuse-devel wrote: > On Sun, 14 May 2023 at 00:04, Askar Safin wrote: >> >> Will this patch fix a long-standing fuse vs suspend bug? ( >> https://bugzilla.kernel.org/show_bug.cgi?id=3D34932 ) > > 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 arg= 2 to 1. This will put the process in the IO_FLUSHER state, which allows it sp= ecial treat=E2=80=90 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 dev= ice emulation daemons, and daemons that perform error handling like multipath p= ath recovery applications. =20=20=20=20=20=20=20=20=20=20 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