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