Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7570771rwd; Tue, 6 Jun 2023 12:49:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5/oXmYvTYZK1MMNisk9CPygTJScPFKVdDBam6ax65H122T5/KsdTL4VLaVbxgMMsc/vY9Q X-Received: by 2002:ac8:5acf:0:b0:3f8:66b7:94dd with SMTP id d15-20020ac85acf000000b003f866b794ddmr860641qtd.33.1686080955375; Tue, 06 Jun 2023 12:49:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686080955; cv=none; d=google.com; s=arc-20160816; b=ISoYECcL9wwEYKfGAgtVwdis6JDe2a5GCtn9f7MAK6jaeLJlh66n2sbbKbhuHoZdd5 +OKFLUKQnaVExBrzajSfujldCcopHp6V78rr+mB1BKQLbDl8UMV2Vav2bbJPd4mPcAl3 gIrWpZ6zgq2SJ92TZS5ZcGxDbOhL8xV3lhVXN8vDYDvjDz6N8M2UGUqM4ioVnVGWwPhm kfX7xHjbv4Z58MpEjqqgZClhF3bu2FcYLHFqwLYFVk4n43rhw2cgONlXCrFf07bC2m7V Bbu3QIxaUkr05FKXyk+O7CI7QQii3dlxFEzcemSLKj12ZnwZwB9Y4lg25klbQgYFrYMY rFww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:mail-followup-to :mail-copies-to:references:subject:cc:to:from:feedback-id :dkim-signature:dkim-signature; bh=NTnXhnoqb0BYacM6NQK+0UgwTN4rdTNC2WSg2wWyOQw=; b=WEFELgK5APol34+osDiO6F4M1YArK8b2MDV21depJ2X2MRRmUqHVDGPqOeMf6PBT5c 26ZE9J0r9E/QiZag4CBmHy0iMK972A8EbSFBGkoASuTzazEahufXYs690Pj3xqZ0Aarw RiyYMssK3701XztdfQa2L7RbZDXHqmIywfXhac7LQUQLnyYKOyl4ZA3Ez5Jv7f6YaZui hqQSWEakMZ+ZOzYncQP707EoqB09DOmT8QWFYGQc1Uj3Vq6q8nhZkDVp0nbUG/lwgivj RttAWeY2VbnSifhp7z6N5dUYt5h59ApR3b0Owzod5dUv6bB+3IEPIZi+J0erw5tkiRo2 qnPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rath.org header.s=fm2 header.b=KDIpHOMO; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Pb7xpZTK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020a05622a019300b003f6b1c7c0fcsi6577377qtw.475.2023.06.06.12.48.58; Tue, 06 Jun 2023 12:49:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rath.org header.s=fm2 header.b=KDIpHOMO; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Pb7xpZTK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232123AbjFFThk (ORCPT + 99 others); Tue, 6 Jun 2023 15:37:40 -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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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