From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C6FD313529; Tue, 6 Jan 2026 14:34:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767710040; cv=none; b=DDJb5WsTW1aaCFGm3So8oUQQnzfhH7gow4OHpM4FQe6v0TqhnB+9O1WFA0u/geHVKxKLQvrL30EQhAJh5asFWcd5/eOwi6Pwl9zzoShrQJ+SxeeN155UWc/khTegV9nMuMRZ8c6UtzLmc5bcBojiTJV5QlAI0iefDh/nkEjUrJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767710040; c=relaxed/simple; bh=OD1TgDZeB7mYEnHxc/Q1fkeQ0gYBFCDnhMkeUpbXDxU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BRwfKo7cVAavTA09J/3AnYaT3hVsyAk3HtpK7PzAaNCBrJxoajZIEageL3rHhZMZk9YoPRslN6ek3GA08j3t3k/X37GZaydtapdVq2qNG/afYqmy3mq/o67asY268H7uV16cqsos5wKzqyALiB10k9XU7BoeU1Hikl6uW6bbzfw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qqpBBoRA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qqpBBoRA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 684BDC16AAE; Tue, 6 Jan 2026 14:33:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767710040; bh=OD1TgDZeB7mYEnHxc/Q1fkeQ0gYBFCDnhMkeUpbXDxU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=qqpBBoRAPpFtdbygI5te+6DMFR2ULPHp+mdHIgT7EXp5Ap0QmtmsaVE+8wVktWG7+ E3EpkARf0310WL7WpvBXnUKYlGaOD50KEK3ESWBcHpHb5blEZu+M32HYLhlg8DcoWL /OJiRimM3kzA87J3x5V6QH1Yx0nWn2el52RYxAOxFegRifD41A/thNtnLEQl+T6xwv uqr4uW0cugJ3igO3b/PuLaScCEl3co3p9oZp/bvOb+vMG03MkXPvwHWdmw8PJeY+t1 SHgcb40tthApNsYn4G+c4qT4Wco7grALBDJWgNgb8CbwNIDG99mIBBAYgkLL+Y+MaT ibJnSp0MVoqPQ== Message-ID: <238ef4ab-7ea3-442a-a344-a683dd64f818@kernel.org> Date: Tue, 6 Jan 2026 15:33:54 +0100 Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/1] fs/writeback: skip AS_NO_DATA_INTEGRITY mappings in wait_sb_inodes() To: Miklos Szeredi Cc: Jan Kara , Joanne Koong , akpm@linux-foundation.org, linux-mm@kvack.org, athul.krishna.kr@protonmail.com, j.neuschaefer@gmx.net, carnil@debian.org, linux-fsdevel@vger.kernel.org, stable@vger.kernel.org References: <20251215030043.1431306-1-joannelkoong@gmail.com> <20251215030043.1431306-2-joannelkoong@gmail.com> <616c2e51-ff69-4ef9-9637-41f3ff8691dd@kernel.org> From: "David Hildenbrand (Red Hat)" Content-Language: en-US Autocrypt: addr=david@kernel.org; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQ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iEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAmic2qsF CSZYCKEACgkQTd4Q9wD/g1oq0xAAsAnw/OmsERdtdwRfAMpC74/++2wh9RvVQ0x8xXvoGJwZ rk0Jmck1ABIM//5sWDo7eDHk1uEcc95pbP9XGU6ZgeiQeh06+0vRYILwDk8Q/y06TrTb1n4n 7FRwyskKU1UWnNW86lvWUJuGPABXjrkfL41RJttSJHF3M1C0u2BnM5VnDuPFQKzhRRktBMK4 GkWBvXlsHFhn8Ev0xvPE/G99RAg9ufNAxyq2lSzbUIwrY918KHlziBKwNyLoPn9kgHD3hRBa Yakz87WKUZd17ZnPMZiXriCWZxwPx7zs6cSAqcfcVucmdPiIlyG1K/HIk2LX63T6oO2Libzz 7/0i4+oIpvpK2X6zZ2cu0k2uNcEYm2xAb+xGmqwnPnHX/ac8lJEyzH3lh+pt2slI4VcPNnz+ vzYeBAS1S+VJc1pcJr3l7PRSQ4bv5sObZvezRdqEFB4tUIfSbDdEBCCvvEMBgoisDB8ceYxO cFAM8nBWrEmNU2vvIGJzjJ/NVYYIY0TgOc5bS9wh6jKHL2+chrfDW5neLJjY2x3snF8q7U9G EIbBfNHDlOV8SyhEjtX0DyKxQKioTYPOHcW9gdV5fhSz5tEv+ipqt4kIgWqBgzK8ePtDTqRM qZq457g1/SXSoSQi4jN+gsneqvlTJdzaEu1bJP0iv6ViVf15+qHuY5iojCz8fa0= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/6/26 14:13, Miklos Szeredi wrote: > On Tue, 6 Jan 2026 at 11:05, David Hildenbrand (Red Hat) > wrote: > >>> So I understand your patch fixes the regression with suspend blocking but I >>> don't have a high confidence we are not just starting a whack-a-mole game > > Joanne did a thorough analysis, so I still have hope. Missing a case > in such a complex thing is not unexpected. > >> Yes, I think so, and I think it is [1] not even only limited to >> writeback [2]. > > You are referring to DoS against compaction? In previous discussions it was raised that readahead runs into similar problems. I don't recall all the details, but I think that we might end up holding the folio lock forever while the fuse user space daemon is supposed to fill the page with data; anybody trying to lock the folio would similarly deadlock. Maybe only compaction/migration is affected by that, hard to tell. > > It is a much more benign issue, since compaction will just skip locked > pages, AFAIU (wasn't always so: > https://lore.kernel.org/all/1288817005.4235.11393.camel@nimitz/). > > Not saying it shouldn't be fixed, but it should be a separate discussion. Right. But as I pointed out in [4], there are other call paths where we might end up waiting for writeback unless I am missing something. So it has whack-a-mole smell to it. > >> To handle the bigger picture (I raised another problematic instance in >> [4]): I don't know how to handle that without properly fixing fuse. Fuse >> folks should really invest some time to solve this problem for good. > > Fixing it generically in fuse would necessarily involve bringing back > some sort of temp buffer. The performance penalty could be minimized, > but complexity is what really hurts. I'm not sure about temp buffers. During early discussions there were ideas about canceling writeback and instead marking the folio dirty again. I assume there is a non-trivial solution space left unexplored for now. > > Maybe doing whack-a-mole results in less mess overall :-/ > Maybe :) I'm fine with the patch as is as well. >> As a big temporary kernel hack, we could add a >> AS_ANY_WAITING_UTTERLY_BROKEN and simply refuse to wait for writeback >> directly inside folio_wait_writeback() -- not arbitrarily skipping it in >> callers -- and possibly other places (readahead, not sure). That would >> restore the old behavior. > > No it wouldn't, since the old code had surrogate methods for waiting > on outstanding writes, which were called on fsync, etc. Yeah, I raised some "except" below, I assume there are more. No that I would want to go down that path :) -- Cheers David