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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F635C4167B for ; Mon, 30 Oct 2023 11:37:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A6B516B01A1; Mon, 30 Oct 2023 07:37:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A1AE76B01A2; Mon, 30 Oct 2023 07:37:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 909C16B01A3; Mon, 30 Oct 2023 07:37:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 8180D6B01A1 for ; Mon, 30 Oct 2023 07:37:35 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 50D57A07C2 for ; Mon, 30 Oct 2023 11:37:35 +0000 (UTC) X-FDA: 81401927670.19.CD2633E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf15.hostedemail.com (Postfix) with ESMTP id 7B99EA000E for ; Mon, 30 Oct 2023 11:37:33 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=C6bfhX0Z; spf=pass (imf15.hostedemail.com: domain of mpatocka@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=mpatocka@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698665853; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=z5XvzHGoYibU00zP11b4K8Q9RWlvIImJ+SASs4zDQHE=; b=KP5QavL4nzjPl8kIEo3ENLxw1QPZkOSMhmhihawFlQnLo60vyVUYoZoep2dGQjO+TYx/p+ nwCFMu3bhk7sUkEoaRO2r6aQEAUtlsspv2TGIn3E2doUcUO8QimgigHmkwyYbSP0b8lYjl qvuP5LOz5bHVrT9q80jpzTAxn7z54aM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698665853; a=rsa-sha256; cv=none; b=vnH5bsm9DxyvDzJQbvacFVNelE10kb7QNclIBKClmxDjmss8xRpX2JinlJafJZ8rdz8khf UPemTXuuXzCIsxlH1J/nyXaVIexBfKroLIlFdyxu2hd4x7vKFiYtMvzZonxuOCFnvtH/k5 KrRECiSqqjAtf6/L2BueXdQQO3nUHQA= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=C6bfhX0Z; spf=pass (imf15.hostedemail.com: domain of mpatocka@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=mpatocka@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698665852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=z5XvzHGoYibU00zP11b4K8Q9RWlvIImJ+SASs4zDQHE=; b=C6bfhX0Zww7/IywU7EGXJkMtlT0mHH8cK8IQ/BnFb9Qz42+9Hmh2mL0Tb0/0pUI6AkKuVp NcvfBbFcUb8rH7Yona+KiGIEUe/jJmdyCIMClQp+GGdVax0eki5N8U9hspd0ZKiYIUL1iE BzBaTK2wkYfdlYOGzrkUYEZJNEIoPVs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-357-QVylyo7IMXGgDQ4-NF2k5g-1; Mon, 30 Oct 2023 07:37:17 -0400 X-MC-Unique: QVylyo7IMXGgDQ4-NF2k5g-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BAED58870A1; Mon, 30 Oct 2023 11:37:16 +0000 (UTC) Received: from file1-rdu.file-001.prod.rdu2.dc.redhat.com (unknown [10.11.5.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ABF27492BE9; Mon, 30 Oct 2023 11:37:16 +0000 (UTC) Received: by file1-rdu.file-001.prod.rdu2.dc.redhat.com (Postfix, from userid 12668) id 97BFD30C72AB; Mon, 30 Oct 2023 11:37:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by file1-rdu.file-001.prod.rdu2.dc.redhat.com (Postfix) with ESMTP id 949AA3D99F; Mon, 30 Oct 2023 12:37:16 +0100 (CET) Date: Mon, 30 Oct 2023 12:37:16 +0100 (CET) From: Mikulas Patocka To: Vlastimil Babka cc: =?ISO-8859-15?Q?Marek_Marczykowski-G=F3recki?= , Andrew Morton , Matthew Wilcox , Michal Hocko , stable@vger.kernel.org, regressions@lists.linux.dev, Alasdair Kergon , Mike Snitzer , dm-devel@lists.linux.dev, linux-mm@kvack.org, Jan Kara Subject: Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5 In-Reply-To: <1a47fa28-3968-51df-5b0b-a19c675cc289@suse.cz> Message-ID: <1efb1dfc-785a-bf5f-390-b1d372e81c18@redhat.com> References: <89320668-67a2-2a41-e577-a2f561e3dfdd@suse.cz> <818a23f2-c242-1c51-232d-d479c3bcbb6@redhat.com> <18a38935-3031-1f35-bc36-40406e2e6fd2@suse.cz> <3514c87f-c87f-f91f-ca90-1616428f6317@redhat.com> <1a47fa28-3968-51df-5b0b-a19c675cc289@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Rspamd-Queue-Id: 7B99EA000E X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: fw31awctzy9rmbcrpwkauorwmh8ezfs1 X-HE-Tag: 1698665853-786970 X-HE-Meta: U2FsdGVkX1/4EY1M4qL5CTQaAK3XPRKDhM37o8D5Oj6dHIFBIIQIvNhKFN8n4UObMiEMSzzarkSuadSsR9UzQXaHV51KoXuQORdFw+WdHTfTgPiEzWkWs9jYBRsuKOE/SpcQNJq8qSViWdhwE2anlpZZk/PwJDhfV4k/X/o54GpGMBjpLr647DiqZBJXjKSRh4FaegaaxZQMs0WDyAgc3eRZYTOqlceJSKoVa7ub2hLsvvsE3M1h4rb9dqXD6Tdmd4CIxjjp7xxnxxP4F+m0kdTxRl6uonrNmIBiNJzL7spllYzrI7ML4NfgJPIQz9WU63Ee+wvcTA5fKrVZ28vvNKp/tRZ9kUgs1/icla5mCCNMjjVUZRMMtFGTasm7bnU6dDTxA/jwm7gmJcSJrE0DUT3vyr2w6th67eSaUuaf4DOxzfjMPpayD7JiMFMLW1/F6pamOE50PMtb/qJDUh1Wm2VLAZ1eg9iLnfZKouYxKx2/fYX4aOS2i4dvcCbAYwC0iZKKMlrUN8qA0qfQ9JihxahSWPHcJm1i/6k175ddmvMyNGzYBqJHB8YoeDfgRB2SKJPNmPFsGj6/W3Ey/NatMEJXngicx0uIlxaXmcGOHXn+xwlCSMlHPQGevablb5oXgnGa6pQt/goeWlTluNqGYoEI/v5l+Jyhkk+joxFwWkMEjQ5Dt3/gqhg0tiiwHW2Aco64jb8sq9hKgYTmQK0UYZJ+sjGygGzQq5yagVWcXXd2Zrs4M91s4pHlJEhUhJ8TZWzoXj8qtmLPLkAvS5ji4euAE8Q8K87XiOLqj7/bgdPqgJJyAzFrdXYfT+SvWyQkUYAezQnv96/xaDhIOd8KtHZUqbM88fExAYmsvrlozftVLqXT8n5EJ4B3u/SRF8DAneGTgFezs7U672NVQZce+roDL2QwoQ2LuBP2aZ4qe6rjmrsMMrV9Xzxn+d1vR5n7pKqzxx7WzxYeKfcWr/w LdeCKw2k skLbaSc0fT2/LMIoUR5ewPZk+WUoNtNo7LR5CC9V4/y6u1E6J0z4gjZnqy3CWIUViRhgA1Lzz1Z1PRAEeanCT1MfbNlAgDDdko24FmsLCArydiFZ5Oji8eE0GbaWtRTOpaW+izi3LR8YQ3Z5hUrkFm2Ous8swnEW4B+MnLSy+d8d40bcgDX5AwV/YkddKpqevYlIISrwiU6jqn90= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Mon, 30 Oct 2023, Vlastimil Babka wrote: > On 10/30/23 12:22, Mikulas Patocka wrote: > > > > > > On Mon, 30 Oct 2023, Vlastimil Babka wrote: > > > >> Ah, missed that. And the traces don't show that we would be waiting for > >> that. I'm starting to think the allocation itself is really not the issue > >> here. Also I don't think it deprives something else of large order pages, as > >> per the sysrq listing they still existed. > >> > >> What I rather suspect is what happens next to the allocated bio such that it > >> works well with order-0 or up to costly_order pages, but there's some > >> problem causing a deadlock if the bio contains larger pages than that? > > > > Yes. There are many "if (order > PAGE_ALLOC_COSTLY_ORDER)" branches in the > > memory allocation code and I suppose that one of them does something bad > > and triggers this bug. But I don't know which one. > > It's not what I meant. All the interesting branches for costly order in page > allocator/compaction only apply with __GFP_DIRECT_RECLAIM, so we can't be > hitting those here. > The traces I've seen suggest the allocation of the bio suceeded, and > problems arised only after it was submitted. > > I wouldn't even be surprised if the threshold for hitting the bug was not > exactly order > PAGE_ALLOC_COSTLY_ORDER but order > PAGE_ALLOC_COSTLY_ORDER > + 1 or + 2 (has that been tested?) or rather that there's no exact > threshold, but probability increases with order. It has been tested - Marek tested it with intial order == 4 and he hit the bug. With 3 and less he didn't. Mikulas