Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7229181rwd; Tue, 6 Jun 2023 08:00:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7pa2xtqYaRKDtKVqdJC36UT7b2YV4Z5xezGqIVcle8wWuk5RdvvGJxTijvd8F4zcz84Gk/ X-Received: by 2002:a67:e9da:0:b0:43b:3555:7b07 with SMTP id q26-20020a67e9da000000b0043b35557b07mr4941vso.3.1686063643709; Tue, 06 Jun 2023 08:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686063643; cv=none; d=google.com; s=arc-20160816; b=sc7BnK7jaxNNB02mKPDegP8NmN0GgmVxggzGr1EvPBbv1Z2XBaC6csmQ1KMebPI+Lo Xlc3DBMdCpsocHK0lwzdQkbLCTBsIfUR7MYv8+FHOoxr5QQ3OLJeXCbumGOIggUhbIKw Y/siWCQed+x1wa7cbKjqIyCJ/2GxfyGGxCKxmX8B3+izqj3/MGS4zVAmTTd99+N+rkEd UfFN7Xf28Es102YOKnT+xvpxs0JFyDkL8A+zjj8HHoKw9yDLgANq7rJgidRRvSC6JYW6 ft+P9rI5qTiW9uxd8hAuqiKkSBdRs2gXlimfDeXOk2WeNcPv1KacepQ/SvfO48AgBgwl JH2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=tIeHacKUXBl3wNCe/SoZ0G9j6l2l916cMNODLOIB+Cw=; b=W63CE4QNhRZAE9REO+xirOYlOytXfpDzretSMpzgzf/VjyvP3C1/6/Il4L3oKhg17E CCO1DxmU/4jeRRULh8pF4TsCWNLgaUxwYx7988AMmAPBtEMcxDhdiyns6PV+XwQ/nmRD xQKNxYt7ddjoXYhbrnfC5uyQ1q4tM5puoc0wN79TEZv1JxyySptj6FBhVLeQmyWz2c+P OSmeMEfXLKueqbCzh7/MhAcZ5YxAba1mTa8sRQ8ifSzPnoS+i2r0ytnaHuzlFpiMSOeG ZLzYbWSy4CDKLm6EI09kIokkfOdWxfmp5VVpkdqYTOvlQukvnQ+kDBd4YIfwGrMENPU1 UIQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=VEr5PWCv; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jz8-20020a0562140e6800b006239d6bb9a2si6267728qvb.512.2023.06.06.08.00.27; Tue, 06 Jun 2023 08:00:43 -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=@szeredi.hu header.s=google header.b=VEr5PWCv; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238218AbjFFOji (ORCPT + 99 others); Tue, 6 Jun 2023 10:39:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238122AbjFFOjH (ORCPT ); Tue, 6 Jun 2023 10:39:07 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 211B41712 for ; Tue, 6 Jun 2023 07:38:12 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-977cc662f62so454237366b.3 for ; Tue, 06 Jun 2023 07:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1686062283; x=1688654283; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tIeHacKUXBl3wNCe/SoZ0G9j6l2l916cMNODLOIB+Cw=; b=VEr5PWCvUfJNT7Cml/NWI0Dk3piC7E1AU4e38Aheb09axj0dVMhU4478RBtGT+GNn1 IIOVGmZfXCCPtd+2klnyfpIKutva+P9VUHf9mh7BTVlrLiWlrJ7VJPrudRSE7EkNBWOw LYbfpTHbN71p5D25slwTGKKMDMNQs0PNUS2I0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686062283; x=1688654283; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tIeHacKUXBl3wNCe/SoZ0G9j6l2l916cMNODLOIB+Cw=; b=CI5XMZqCTUMC6N57ViQW7Kf0GNDv5W2nVBjUazS9IziRGLAl1KwLnjXkWRhK/wbinZ pVoutd/3tks2MRSmfkNEVTgFBCwYWeFsQlN0sQQUnZGRbTmZenSvyv7k59yZr2xSCUN8 m7yog4lojewjjvqt9yHAyLb3PChynsJ4YcB1vYqxlFFiBB3Q4g0+z6AAjyqUp22Ci369 i/ETJIg6OtMtNfuhCvU8BtxZ7v4n1F4QTDkEhvpjCESWQOyoJfSFzNyPz/f99VAh2l+3 15jRqkQycijrTL9/D5Njfj/dEHOYWBttnacM2P4i1uRyiIxY+qmKGR62YW7v/R9HREsv nFwQ== X-Gm-Message-State: AC+VfDzIX90Gpv9NC3PRcINiPVwqL58P1cxzbfz3Cav96ToxP9SqLMY/ 1V6iG4g4xK/GDnBkes8mYEgVJAUYi9kFn06pR65g3TYQbbGlF/+8 X-Received: by 2002:a17:906:7316:b0:973:e79c:3da8 with SMTP id di22-20020a170906731600b00973e79c3da8mr2653192ejc.17.1686062282939; Tue, 06 Jun 2023 07:38:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Miklos Szeredi Date: Tue, 6 Jun 2023 16:37:51 +0200 Message-ID: Subject: Re: [PATCH 0/6] vfs: provide automatic kernel freeze / resume To: Askar Safin Cc: Luis Chamberlain , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Bernd Schubert , linux-pm@vger.kernel.org, fuse-devel Content-Type: multipart/mixed; boundary="00000000000071ca5d05fd76f736" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 --00000000000071ca5d05fd76f736 Content-Type: text/plain; charset="UTF-8" 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=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. For example the sshfs server would do the following before starting request processing or starting ssh: echo 1 > /proc/self/freeze_late This would make the sshfs and ssh processes be frozen after processes that call into the sshfs mount. After normal (non-server) processes are frozen, server processes should not be getting new requests and can be frozen. Issues remaining: - if requests are stuck (e.g. network is down) then the requester process can't be frozen and suspend will still fail. - if server process is generating filesystem activity (new fuse requests) spontaneously, then there's nothing to differentiate between server processes and we are back to the original problem Solution to both these are probably non-kernel: impacted servers need to receive notification from systemd when suspend is starting and act accordingly. Attaching work-in-progress patch. This needs to be improved to freeze server processes in a separate phase from kernel threads, but it should be able to demonstrate the idea. Thanks, Miklos --00000000000071ca5d05fd76f736 Content-Type: application/x-patch; name="0001_freezer_configure_user_space_process_frozen_along_with_kernel_threads.patch" Content-Disposition: attachment; filename="0001_freezer_configure_user_space_process_frozen_along_with_kernel_threads.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_likdcauo0 RnJvbTogTGkgRmVpIDxmZWkubGlAaW50ZWwuY29tPgpTdWJqZWN0OiBmcmVlemVyOiBjb25maWd1 cmUgdXNlciBzcGFjZSBwcm9jZXNzIGZyb3plbiBhbG9uZyB3aXRoIGtlcm5lbCB0aHJlYWRzCkRh dGU6IFdlZCwgMjAgRmViIDIwMTMgMTA6MTU6MjUgKzA4MDAKClRoZXJlIGlzIHdlbGwga25vd24g aXNzdWUgdGhhdCBmcmVlemluZyB3aWxsIGZhaWwgaW4gY2FzZSB0aGF0IGZ1c2UKZGFlbW9uIGlz IGZyb3plbiBmaXJzdGx5IHdpdGggc29tZSByZXF1ZXN0cyBub3QgaGFuZGxlZCwgYXMgdGhlIGZ1 c2UKdXNhZ2UgdGFzayBpcyB3YWl0aW5nIGZvciB0aGUgcmVzcG9uc2UgZnJvbSBmdXNlIGRhZW1v biBhbmQgY2FuJ3QgYmUKZnJvemVuLiBUbyBzb2x2ZSB0aGUgaXNzdWUgYXMgYWJvdmUsIG1ha2Ug ZnVzZSBkYWVtb24gZnJvemVuIGFmdGVyCmFsbCB1c2VyIHNwYWNlIHByb2Nlc3NlcyBmcm96ZW4g YW5kIGR1cmluZyB0aGUga2VybmVsIHRocmVhZHMgZnJvemVuCnBoYXNlLgoKQWZ0ZXIgZGlzY3Vz c2lvbiwgYXQgcHJlc2VudCBpdCdzIGdlbmVyYWxseSBhZ3JlZWQgdGhhdDoKMSkgSXQncyBvbmx5 IHRoZSBmdXNlIGRhZW1vbiBpd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