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 539DDC6FA86 for ; Wed, 7 Sep 2022 15:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbiIGPuz (ORCPT ); Wed, 7 Sep 2022 11:50:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbiIGPug (ORCPT ); Wed, 7 Sep 2022 11:50:36 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82D803F1D2 for ; Wed, 7 Sep 2022 08:50:22 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 56F015C0166; Wed, 7 Sep 2022 11:50:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 07 Sep 2022 11:50:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rath.org; h=cc :cc:content-transfer-encoding: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=fm3; t=1662565821; x= 1662652221; bh=3i/QkCZmuHB1ScMUZZPWUUAJ2jsbjEER/GlelbIHRD0=; b=i oG3+gH/u6bKFoEaFtFuQ6S456pQr4rru2t/zzdyXwzy4Eou9lwJ+sclp0v4HS9om 5P7xEmjEaBG+ExsVwg0dlRHMKtAN3QVbsff9VG5ivkgC1vwprQ/vZ/ZjqS3k4y2n Yimqw/Q1YeXGiDx8Wv3P11aaV6s0mjYWBcwsma66cOmpV9Ffsxf6XfRxljVUPrBX FlrPubXyBAThUs50rlaIr3i/7xgvCogLssBfZLTyOo64YJnAlbduklFN54tcbxp0 hQ54+1V7PBT+WXM8LGJ9+3sAQL+FKh0B4PErWpMufLWbbw+PBVEOfueEzEQbIoiW paGZwaH3Nm2uoxHzLZSQQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm2; t=1662565821; x= 1662652221; bh=3i/QkCZmuHB1ScMUZZPWUUAJ2jsbjEER/GlelbIHRD0=; b=G Q3OjQU6PrURFXjFZ+jn3Q8EQgcRTqxBmBFTHsXzudIRXJLi0JPbERF7Kogmv12Iv sQD/ojnic3HQgdxyveh09Q900o4d35YTHrgZOM2WhBfA+ZkOqqLOoiDD+yL3+9v7 AnVCOT7quIgzTvNoBinEAreNC87qXJKbhN3AAYmABaZ1ospLT6HrqbnxdrURsS7Y 6gQvEcBqUJGgChw4Ztd/evIoUvvzALsMtXfu/+ud/aHQalNaPQh0c+n9DK1IFbKI xP7LUwwd86zuH0xdNMCqzTglKe5oqI2WwfkirlD0cb4kIeEzHAt8KG1ON8jNzzJJ VeY1t52SMFkrFicpcLJwg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedttddgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufhffjgfkfgggtgfgsehtqhdttddtreejnecuhfhrohhmpefpihhk ohhlrghushcutfgrthhhuceopfhikhholhgruhhssehrrghthhdrohhrgheqnecuggftrf grthhtvghrnhepudelffdujeeujeelgeejveeufeekiefgkedvffeihfekvedvtdevtdeh leefvdefnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghdpnhgrrhhkihhvvgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpefpihhk ohhlrghushesrhgrthhhrdhorhhg X-ME-Proxy: Feedback-ID: i53a843ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 7 Sep 2022 11:50:20 -0400 (EDT) Received: from vostro.rath.org (vostro [192.168.12.4]) by ebox.rath.org (Postfix) with ESMTPS id 8B236475; Wed, 7 Sep 2022 15:50:18 +0000 (UTC) Received: by vostro.rath.org (Postfix, from userid 1000) id B779ADC054; Wed, 7 Sep 2022 16:50:17 +0100 (BST) From: Nikolaus Rath To: Bernd Schubert Cc: nbd@other.debian.org, Linux FS Devel , miklos , Wouter Verhelst Subject: Re: Why do NBD requests prevent hibernation, and FUSE requests do not? References: <87k06qb5to.fsf@vostro.rath.org> Mail-Copies-To: never Mail-Followup-To: Bernd Schubert , nbd@other.debian.org, Linux FS Devel , miklos , Wouter Verhelst Date: Wed, 07 Sep 2022 16:50:17 +0100 In-Reply-To: (Bernd Schubert's message of "Wed, 31 Aug 2022 01:02:16 +0200") Message-ID: <87zgfbqj46.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-fsdevel@vger.kernel.org On Aug 31 2022, Bernd Schubert wrote: > On 8/30/22 08:31, Nikolaus Rath wrote: >> Hello, >> I am comparing the behavior of FUSE and NBD when attempting to hibernate >> the system. >> FUSE seems to be mostly compatible, I am able to suspend the system even >> when there is ongoing I/O on the fuse filesystem. >>=20 > > .... > >> As far as I can tell, the problem is that while an NBD request is >> pending, the atsk that waits for the result (in this case *rsync*) is >> refusing to freeze. This happens even when setting a 5 minute timeout >> for freezing (which is more than enough time for the NBD request to >> complete), so I suspect that the NBD server task (in this case nbdkit) >> has already been frozen and is thus unable to make progress. >> However, I do not understand why the same is not happening for FUSE >> (with FUSE requests being stuck because the FUSE daemon is already >> frozen). Was I just very lucky in my tests? Or are tasks waiting for >> FUSE request in a different kind of state? Or is NBD a red-herring here, >> and the real trouble is with ZFS? >> It would be great if someone could shed some light on what's going on. > > I guess it is a generic issue also affecting fuse, see this patch > > https://lore.kernel.org/lkml/20220511013057.245827-1-dlunev@chromium.org/ > > A bit down the thread you can find a reference to this ancient patch > > https://linux-kernel.vger.kernel.narkive.com/UeBWfN1V/patch-fuse-make-fus= e-daemon-frozen-along-with-kernel-threads Interesting, thank you for the link! So it seems that I just got lucky with FUSE. Does anyone know in which order the kernel freezes processes by default? Could I perhaps work around the problem by calling the FUSE/NBD daemon something like "zzzzz_mydaemon"? Best, -Nikolaus --=20 GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB