Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp348460rwd; Wed, 7 Jun 2023 00:21:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ADjFGc8FXKW4U3MmKi/g0goIRHnfzUUhED+BZFKXQkBJDTIM/zi9dpQCtIBTQ0aa84gIz X-Received: by 2002:a17:902:f546:b0:1af:e10f:ba96 with SMTP id h6-20020a170902f54600b001afe10fba96mr6040236plf.1.1686122515205; Wed, 07 Jun 2023 00:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686122515; cv=none; d=google.com; s=arc-20160816; b=dmDxwFKFkAG600aDlt3oJRtjcQQiZQzRziFyPA6F5/l/X3GLmZcaTFAwuLt0NBpHxs LJdj+XLWHWO37lGmlV/MkxC6MCWLQHRqlDHwSJWbwJLlH4dZ3agjXPwE6P6DJIH7nmxi SidZdoiIuKBlVNm6KvoSphHvUBxbZIsMpAatFTATtyc/p1WxfscNv2PrJR4QvyBRYUii C3n/2hJ1aK7uU6KUKgLsABRi2/QPQ/N4/0SQXvsx9qyY/45CMChShJp3HtYdt++4Yfjr Ci8LJmdSI5trWELezlKG1oYCE4i4U8TOBotLmeeUim7ci8Qy8qd/1SbjQuVLDdoAuYN/ ejxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:to:subject:message-id :date:from:in-reply-to:references:mime-version:dkim-signature; bh=0p+TSFNVv5FXtju55va0ALmUKjM4M5e7S84HkiGtatA=; b=U3w4XAkQIiyyC9WBTLOeqeEhawNBo6O31L2ERJ3x2lFT71SZqJQJZFfGNUcdpmxwgn qQEbOPvy0uO7ZHd8VAfj/5kPvth73muIrIJYBZGlVYL1DQ8Uwg2thxutAuE9TujEC5QZ fZcNsyF7zZqABK7WK2z9s7uy1dd6/qQyl/Uo2/r+sbXVzeWo+h5FkNZZ7KlGsZU6Vcm9 8LYqu1+Gt0u/NkFXmz7JMcgBnMF2uq3N5MJw8cBbas2+XmcOz7ArfktxmOBMx/anB7oL +z/ms3bFbEznmD3NrULHOYzLOIdrXms/fLsT91+V+JRO/ULnxvIwTxOzsCfCp0UmXp5E 4RxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=qYgyVxs0; 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 p1-20020a170902e74100b001a99b9d767csi8646670plf.166.2023.06.07.00.21.41; Wed, 07 Jun 2023 00:21:55 -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=qYgyVxs0; 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 S238205AbjFGHFF (ORCPT + 99 others); Wed, 7 Jun 2023 03:05:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235562AbjFGHEu (ORCPT ); Wed, 7 Jun 2023 03:04:50 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E66D138 for ; Wed, 7 Jun 2023 00:04:47 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5151934a4e3so712142a12.1 for ; Wed, 07 Jun 2023 00:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1686121486; x=1688713486; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0p+TSFNVv5FXtju55va0ALmUKjM4M5e7S84HkiGtatA=; b=qYgyVxs0WMn1vKG+jxJ0y4mvKv3Thpo/ZhAqR7byxJEP5PqKStJJVS5ZMi2PW0ziFT TWI66pPrbWo31SXzDgMDJ73f7Pour9PbD95N3OOCPOqVNtbf6D49U6vAd5Sy4if6rCGj zzecH4IC0qpn242+M0y+Axo6gmqGLEwwif0No= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686121486; x=1688713486; h=content-transfer-encoding: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=0p+TSFNVv5FXtju55va0ALmUKjM4M5e7S84HkiGtatA=; b=jK+EpUhxFQamJDRyZQbuxw+0C5Y7M5DI6UljfFbDrgfkAFVzKv/Azpl9kefnASyluo IET0DMzRxKMEwXYrUIbM3Wz5t8viE6cz6D+qqT235OcvqgJOcn0fb2nXCRadBHKsh3rh ujcHoZID7dXGmEzLUnRUiZ2jCn/C2ffcZgP07+IZRzuy3hTWSrV2Y8UoX5o2AOTdFeDp KY7DSVkbXMcZwPtvSYlPFJqcr3NXIkx/XYvQE5iKXYO79gBGwoblTW5pGDo12Z622+ze cRE4VShB0BpooOc5idG8DZcJNghEKhJ2+yDI2RTyN3nzopify+CKCmVl689R/B1P7v/O KDJw== X-Gm-Message-State: AC+VfDzg7gCO22mFUaWByWSBm7AAqqTOC9/YVL8U+XtIe4J5vV04TnFM Pkf9vkv/1/SdYgAel8xPKilkU7ooKwBSsgOwHDx6IraZQ/Ho+Lds X-Received: by 2002:a17:906:5d0b:b0:974:4457:b6f with SMTP id g11-20020a1709065d0b00b0097444570b6fmr6450613ejt.23.1686121486050; Wed, 07 Jun 2023 00:04:46 -0700 (PDT) MIME-Version: 1.0 References: <871qiopekm.fsf@vostro.rath.org> In-Reply-To: <871qiopekm.fsf@vostro.rath.org> From: Miklos Szeredi Date: Wed, 7 Jun 2023 09:04:34 +0200 Message-ID: Subject: Re: [fuse-devel] [PATCH 0/6] vfs: provide automatic kernel freeze / resume 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Tue, 6 Jun 2023 at 21:37, Nikolaus Rath wrote: > > 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 a= rg2 to 1. This > will put the process in the IO_FLUSHER state, which allows it = special treat=E2=80=90 > ment to make progress when allocating memory. [..] > > The calling process must have the CAP_SYS_RESOURCE capability.[= ...] This is the issue. We want suspend to work without needing privileges. > > Examples of IO_FLUSHER applications are FUSE daemons, SCSI d= evice emulation > daemons, and daemons that perform error handling like multipath= path recovery > applications. This looks incorrect. FUSE shouldn't need this because it manages writeback in a way not to require such special treatment. It might make sense to use the prctl(2) API for this, but honestly I prefer pseudo fs interfaces for such knobs. Thanks, Miklos