From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA04E3C3432 for ; Thu, 20 Aug 2026 09:24:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787217878; cv=none; b=nVSTzbUWBqKAip1zkFSepq05iNKG4TdWNEe7Vw0UCLGI2Zchdw+hPXcSUZ1Msyn7HeVcR0pIsgVtZc/kpuEG/QPJFfgNnkmI2K9g04Eoq1tQ/PEY8XEizhVAChXZAidkHUykV53gfNLoyyNpIaOc5aHIS6BM2BjewSCX1iuB2k4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787217878; c=relaxed/simple; bh=klXFhfncEfqfgBAeaxYMbdKqMYba0lqahrn8tgVU45c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DN2NO73zmIV3TbcniFpZAcVkZD9N0AvnotbSLC3jjM/lieMFMmAW2KO8BSvFSwGg42QnZzXOaRej54qYfn1TKRv0L6iwAtFlWA3xQhFxwvNdus/llHhBl2XqL5OfgPjYZt5Em5BraUxeqCapa+Ha0PejXzsq1g4qPrisTV+QpJE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=D3MBWFMc; arc=none smtp.client-ip=209.85.215.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="D3MBWFMc" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-c998fd549a8so1382946a12.2 for ; Thu, 20 Aug 2026 02:24:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1787217875; x=1787822675; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=JUgWPkpfVwetzI+lBlGmW+f/TRLvR7v5NBOCskWpSaI=; b=D3MBWFMcsxjSS8MdFcTK8Zs3l9i2M+N6VgJtCdC2RFzJYzhGfCVpOPjkrpBw/E/onc x3vCXyLR2RhNj4VaHoPCs1Ng91y4SWEMGHaXzLFG5R0mWaHqtTmPKfalHTdHpg9C5++5 uXrUpEdUCyTf5ohD2V+PiU809J3/ZvROoO4qg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787217875; x=1787822675; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JUgWPkpfVwetzI+lBlGmW+f/TRLvR7v5NBOCskWpSaI=; b=C3V4plzu2PBQ5OGUBhQc+W4SezK3ebYfwRzkkhRMZMiyufod9cIXgZ5qvctLlYTdNF wv9gmLgIsrJvanwf3KIHwIuHFW4SYxTNtWyaanhCfL+6OiIDUXB4m4gIzMoR72042Vkj rziDQ/a3zMdo18lxkGh5QFGmV7a7Qo7XbW379iVnv2Qd/VGsQG7NICADpnqIjoicbWZg BxNPqQgEhq/Kv9qzgB5GdQXWepV1ZonxRnLV6vtoNt2W9/8ctTmzFzQThjq4Fl2Fg6kU UTL1Qde02OEM/5Gr0Pc50qyZvPS2vGGyA5J1yRXyhRNYzeM+F9pPEaKRQLMTdq2/V0+l x8pw== X-Forwarded-Encrypted: i=1; AHgh+RotGO/rX9CWBt9g9xVKjReiElnqC3LKYjKATlrGHxoNHebLHArxbNY+UDt3SFwLntXm9fjfnnZBnuEhfvU=@vger.kernel.org X-Gm-Message-State: AFuF++lWX3BstjKo354fVisRaaSYx1EPwYxTFzYm8MbS5mApXwBQesiU kPjjhPZOEx6Fdryy2uEFhu7Vxrlsdekr6v/H7sKGvmjJTlJrcNIypC6C9n9fGWjPFA== X-Gm-Gg: AR+sD12rmapkcOxFeieg7LWIJG+HYGTpUG3d3M+rdXJCYzP/NYsB1oZufZfAIlhSPgt C7VY9Z4N/H+NmGtafdhMzHTLhg/AwAioWH8RwvDBpezRMHDAx5a80qKINzuVTMQd9HKvH49aN5f ARKlN2hyulEbxIUOGc3Rmpnv0zmB5V8Xkt5f2STzmb479jhHRpn1TDtzqs6iymOZYYCKL7nYD0C Nm02rOrXfStPaXUuhoZmujObiN8/IKQAiF6+J67vciEWn4oZ6umMT/YbrbitBavGYU8AEFVRIrd 7OwY7nDV+bRmYqnExVpQ9JZWOOfctJja1sZGvo0yYIZpLQMen8/pgibR5dtUylkZH+wuUq2NRFp +5NNtCD/bsgKr9tzjjniW5QvcMytoEpeNUu799qlLXvVUpfY9YOH+1EnU+HXG6yxTje3GJd49Iy EHnU2IzgYDIYcCpxZBa270znsogzjjMXCXHBZdN+vYKabNCnRlkfX/Juy4TLTcn0oMKr1BZpfxk MxagPVDoVBjDZCloa8n1hbT8j5J X-Received: by 2002:a17:90b:380e:b0:38f:5869:387b with SMTP id 98e67ed59e1d1-39581212176mr20716008a91.9.1787217874644; Thu, 20 Aug 2026 02:24:34 -0700 (PDT) Received: from google.com ([2a00:79e0:2031:6:7beb:7701:c87e:f611]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-395ada1deabsm610991a91.2.2026.08.20.02.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2026 02:24:33 -0700 (PDT) Date: Thu, 20 Aug 2026 18:24:29 +0900 From: Sergey Senozhatsky To: Peter Zijlstra Cc: Sergey Senozhatsky , Miklos Szeredi , fuse-devel@lists.linux.dev, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2] fuse: permit freezing while waiting for request answer Message-ID: References: <20260819023542.561653-1-senozhatsky@chromium.org> <20260820084933.GA4036497@noisy.programming.kicks-ass.net> <20260820091018.GA4120091@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260820091018.GA4120091@noisy.programming.kicks-ass.net> On (26/08/20 11:10), Peter Zijlstra wrote: > On Thu, Aug 20, 2026 at 06:07:18PM +0900, Sergey Senozhatsky wrote: > > On (26/08/20 10:49), Peter Zijlstra wrote: > > > Message-ID: <20260820084933.GA4036497@noisy.programming.kicks-ass.net> > > > > > > On Wed, Aug 19, 2026 at 12:03:32PM +0200, Miklos Szeredi wrote: > > > > Why is this unsafe exactly? Does that unsafeness apply to > > > > filesystems? If so why do we allow freezing while blocked on > > > > sb_start_write()? > > > > > > Getting frozen with lock A held, while another task is blocked on A in > > > an unfreezable state results in the system not being freezable. > > > > Right, but then the system says "suspend failed" (tasks refuse to freeze > > after 20sec) and just thaws everything back in? > > People don't like suspend failing. People like to close their lid, throw > laptop in bag, and expect laptop to not cook itself to death. Sure, that's exactly the problem I'm looking at. Throwing TASK_FREEZABLE addresses some of the cases. Failing laptop suspend because of uncontended VFS lock is not an uncommon scenario for us. Ideally, however, we need some sort of server/client aware suspend, maybe moving clients to cgroup C and server to cgroup S, and freezing those in strict order. Or teaching PM that some tasks cannot be frozen in random order during suspend (e.g. a special flag PM_FREEZE_ME_LAST). fuse is not the only subsystem that doesn't fit current random order suspend. Another troublemaker for us is notify, which basically has the same server/client architecture (where both sides are user-space processes).