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 ACD92C369A2 for ; Tue, 8 Apr 2025 17:06:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C71FF6B00BD; Tue, 8 Apr 2025 13:06:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFADB6B00BE; Tue, 8 Apr 2025 13:06:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A98006B00BF; Tue, 8 Apr 2025 13:06:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 8A7056B00BD for ; Tue, 8 Apr 2025 13:06:50 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 6A4B8AEC33 for ; Tue, 8 Apr 2025 17:06:50 +0000 (UTC) X-FDA: 83311506180.23.4D45797 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf13.hostedemail.com (Postfix) with ESMTP id C053320003 for ; Tue, 8 Apr 2025 17:06:48 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RwD72MB+; spf=pass (imf13.hostedemail.com: domain of mcgrof@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=mcgrof@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1744132008; 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=dCKaxPoyrx7/49ZCYXGsmNbi46WTUxcQp+z6BE6IfZw=; b=fW+HoK56x7097xwRlGADxb4LgWbzYQ/N2wOBTUmONnk7JizogBqK+ZY1diL1um6/sc3oAz jH2ca8a9jbslvtMsrDJOCPAD19tOgaSjhyitWjhLl6YHMg0uPzUQfc4oYw66K/0EL7faic bewDwLREwofaXBNNuqoOCVhDIoEwaCU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1744132008; a=rsa-sha256; cv=none; b=ZY8qIvqsmf86WTwuT/+w8XYsfbulyHI4vKFotRQPPrNN/PyRfVVIG9v/NTaQX1GkC0egMs y3tUtWahvMgZ1ZzT2kv1rD4KQn69cuVNCj7Kbo+JuOYwf6/tCDpwMwBFfDMu6GbzlGZ7nR TqEY5R+mNpoJ98J//adPKSTyC6XIqrM= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RwD72MB+; spf=pass (imf13.hostedemail.com: domain of mcgrof@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=mcgrof@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 80D145C3994; Tue, 8 Apr 2025 17:04:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A75D0C4CEE5; Tue, 8 Apr 2025 17:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744132007; bh=/3eBMgubv0Yka0P/WzdDOXB50+TOIWFo5UCsRYv5O6Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RwD72MB+BLnSoW4IRomJp7Ix0Bjzj4kV+VhvB0wuUGsxqlzuVsRsQsocnqYiQUwdt +31xpEKLmAjD/rDiUgNxpng4/1mhIqwM0gmMZgoBDuQdFhb3OILdr9wPBtIcwi6WGd KQuiv/YxK6+xoFs1un5HzHmCG5i2X2L/p/USUzcH60z1/4nmmEDKI8gCy+9KbAtjen o83YtH3vHx4ew7p5JAkCmQ0sQvzLVGhyDm7PA6YEc9Xi0HPweYqtgNtcB3RMcVBjd9 cdIIlqMXA+tuhAkRqxDvAHIRZ95wXGWoDHFD66LrEThTktBuifVsVEb/82Oo8mKM4D GmfjnfjwmCVCQ== Date: Tue, 8 Apr 2025 10:06:44 -0700 From: Luis Chamberlain To: "Darrick J. Wong" , David Bueso Cc: Jan Kara , Kefeng Wang , David Bueso , Tso Ted , Ritesh Harjani , Johannes Weiner , Oliver Sang , Matthew Wilcox , David Hildenbrand , Alistair Popple , linux-mm@kvack.org, Christian Brauner , Hannes Reinecke , oe-lkp@lists.linux.dev, lkp@intel.com, John Garry , linux-block@vger.kernel.org, ltp@lists.linux.it, Pankaj Raghav , Daniel Gomez , Dave Chinner , gost.dev@samsung.com, linux-fsdevel Subject: Re: [linux-next:master] [block/bdev] 3c20917120: BUG:sleeping_function_called_from_invalid_context_at_mm/util.c Message-ID: References: <20250331074541.gK4N_A2Q@linutronix.de> <20250408164307.GK6266@frogsfrogsfrogs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250408164307.GK6266@frogsfrogsfrogs> X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: C053320003 X-Stat-Signature: e31ztrraiyinwzasko8e5shs89rt5gnx X-HE-Tag: 1744132008-270157 X-HE-Meta: U2FsdGVkX1+J6dFLeTjRx7Q7C5pRQR8w2sbikkOVkK7uWu3ZraUS2g6NYjZQAIwRhpYEZh+MgHV0LytLMbCsybEyBK6JmLannONDnjBeDfo0Robh5zLOX49DXy3RN95+kgfXfjint15zQEUpx/QfNNWUlu7zvZDrZelp+Z4rqKrE0RpE3wMF/EEgbBX5z4J9hpqoD+y7Rf6aLz6A/bip+u7QPqusUp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SD1e1eqr6h6rID1w62NJk= 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 Tue, Apr 08, 2025 at 09:43:07AM -0700, Darrick J. Wong wrote: > Hi Luis, > > I'm not sure if this is related, but I'm seeing the same "BUG: sleeping > function called from invalid context at mm/util.c:743" message when > running fstests on XFS. Nothing exciting with fstests here other than > the machine is arm64 with 64k basepages and 4k fsblock size: How exotic :D > MKFS_OPTIONS="-m metadir=1,autofsck=1,uquota,gquota,pquota" > > --D > > [18182.889554] run fstests generic/457 at 2025-04-07 23:06:25 Me and Davidlohr have some fixes brewed up now, before we post we just want to run one more test for metrics on success rate analysis for folio migration. Other than that, given the exotic nature of your system we'll Cc you on preliminary patches, in case you can test to see if it also fixes your issue. It should given your splat is on the buffer-head side of things! See _buffer_migrate_folio() reference on the splat. Fun puzzle for the community is figuring out *why* oh why did a large folio end up being used on buffer-heads for your use case *without* an LBS device (logical block size) being present, as I assume you didn't have one, ie say a nvme or virtio block device with logical block size > PAGE_SIZE. The area in question would trigger on folio migration *only* if you are migrating large buffer-head folios. We only create those if you have an LBS device and are leveragin the block device cache or a filesystem with buffer-heads with LBS (they don't exist yet other than the block device cache). Regardless, the patches we have brewed up should fix this, regardless of the puzzle described above. We'll cc you for testing before we post patches to address this. Luis