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 28416C4345F for ; Fri, 26 Apr 2024 00:47:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 91F1F6B008C; Thu, 25 Apr 2024 20:47:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8CEAA6B0092; Thu, 25 Apr 2024 20:47:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7BDE76B0093; Thu, 25 Apr 2024 20:47:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 5ECED6B008C for ; Thu, 25 Apr 2024 20:47:37 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id F3251C12BD for ; Fri, 26 Apr 2024 00:47:36 +0000 (UTC) X-FDA: 82049844912.16.B5A5B15 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf06.hostedemail.com (Postfix) with ESMTP id 234B718001D for ; Fri, 26 Apr 2024 00:47:33 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=f0+vinsW; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=none (imf06.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714092455; h=from:from:sender: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=6jnE6LGAE0Ge7rAWbVl9vm4Cu+KrxLEesibskCl1htg=; b=bfef1D9t03AfSx3kgQ1SIYvSrt/VsJ8Sxcia5gjRyv6ERXNgZZF6HN6xn1EqxlGI7axDwS dh9pZBUds6GK4EoFmwrTfSQVsoHEHloyagMHEpol4/Pa/azvBG2DihR6tCNrmSIgimKlaW 7bt5NN7vTkA7l6uUK6MkeyMf1Ruh1YI= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=f0+vinsW; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=none (imf06.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714092455; a=rsa-sha256; cv=none; b=v7bLyQgjmfNBPN02hFFm+qGxgWm3PePaXzn0A4czfESbC+2CkXR9j6elHGD93JFKL0P2Dy jPQMKzDmyg5ZQIMKIUby87nUSkpaX2Jq9dZTjWvCnAtu/ZiYW+EfneRZE9zM46ZKLTXh05 2nB5e5clbO7eZq3Jdja+fWBHY7RrJoA= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=6jnE6LGAE0Ge7rAWbVl9vm4Cu+KrxLEesibskCl1htg=; b=f0+vinsWX0muKf6vaKgTKwJ3aM +DuqXXB3MLam69jGiOjU663h1e9sUMxRNxElfr+tDjGlokyrag0jL2mcN8ZbbcqjrwPxD1buayqVl UoYWexnagnozKyAzskjB+udRYZc3DZDJIiPRS0ntTrnlmyY/Z4RmmBme6dq2D5aL0NQ5GdaXg8YZw DjuORwkpqODS4GMKICRq7fXPJqps+xnze0ZE6HY8P+JzFOOXHwHxqiOFbC9xXpVisUc/zJqFnpqxE UCWk+aZXz+kfClceSFXdTtaQyKtUhgg5UGmZLP+vSa3L1Hxl+A5UO3r4j35dUrWjT/HxavIBNg0Ye tGVH1xCQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s09kN-0000000Ak4J-0KrB; Fri, 26 Apr 2024 00:47:28 +0000 Date: Thu, 25 Apr 2024 17:47:27 -0700 From: Luis Chamberlain To: Matthew Wilcox Cc: "Pankaj Raghav (Samsung)" , djwong@kernel.org, brauner@kernel.org, david@fromorbit.com, chandan.babu@oracle.com, akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, hare@suse.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, gost.dev@samsung.com, p.raghav@samsung.com Subject: Re: [PATCH v4 05/11] mm: do not split a folio if it has minimum folio order requirement Message-ID: References: <20240425113746.335530-1-kernel@pankajraghav.com> <20240425113746.335530-6-kernel@pankajraghav.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 234B718001D X-Stat-Signature: 1ixj5jrjegosaxu1umo3a7thmg5so8mp X-HE-Tag: 1714092453-553752 X-HE-Meta: U2FsdGVkX18maalDu1jl/4sVaZIWVMSKZuxOUL5xkO0SGO/caM+m4USxPNi/OJOdq3yxZOyqFiwuLBI12AYXzzawJs48pCv2CUc3J/EfOoIjorX/8mfXN5sQgOzbRedOvrOuANAa7WZAk1GNwnOnBENxXYOiagy8Ld8WG1ra0epkVXiLfmFridH8ZJqwUbeOj//KvBAL46Xph+FOPtpjOLSREWpThQ2bf0/cH9J9uzFtXTV2fRElWAJcrm3iwFcIooFgYqDvY+S74DF4Hy76ggtuQe6IN+kDZakRR7/k9CxU9MoWlebWQcB79BIJmdW1UL+y1+E72fgtslehJ61n19kJin78NH2MUbcUtp2gTbpjYNWZAJlJrjtUWcgwV+JGmPI5l5zU66wgUBxfzDkHDsU/JO0RVrg+LJ+EVbWXCR2TeqNsb4YDVVkx28PoxYnCLvZ5WbckfBjhImHgJ3u7foNgj8Es1/nRcj174ghq9bHR6SA+OIlMafi11blPH66BKlnNXdeBlxv2bWUszBic3n1BcAmkkAWgKUfIITymKaD64tMN9XdXM5f5HvM97SXpMsMm+CDEEeHiB2Bc9AXciY6ndnzChX0U+ZfY1m8miQ9IZlnvY5SqA3+s5GCfpFpbg8hY2OEyFbrcZbBDYDzHn7/4YEsuVgS1RUTQBNdG8gZKGPY4HphJr7Wffo4z2e/Vyn5m7YX0nUbxxqzu7FHTP5dcU8lUCu0H/gpdKsOXmJWWvdxAkENHrURbkd59BKQiHkibcFo93wC/hJOajRA6YKDFZLfS03ou00aMTnVv9Vv4lj3eWdrp7cpsRGuo/94pmXZbR1lI/GiFkASLNN0cwLy9YTt3ASEAYgTEb+CBeEf7J71r+SbqjCxXsQh4PeLF8jvvAwY3iAHB0L7XE59vlcjR+W/HiStL9fdggNpC/ZEDRQMoRVPU3SePiNB0vsQ861SvxsVlWuYMaLDsj8v BqFFSirY nye+y3C0EnHNGIOY3n52eVu/qvyGwdpTzn6om 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 Thu, Apr 25, 2024 at 09:10:16PM +0100, Matthew Wilcox wrote: > On Thu, Apr 25, 2024 at 01:37:40PM +0200, Pankaj Raghav (Samsung) wrote: > > From: Pankaj Raghav > > > > Splitting a larger folio with a base order is supported using > > split_huge_page_to_list_to_order() API. However, using that API for LBS > > is resulting in an NULL ptr dereference error in the writeback path [1]. > > > > Refuse to split a folio if it has minimum folio order requirement until > > we can start using split_huge_page_to_list_to_order() API. Splitting the > > folio can be added as a later optimization. > > > > [1] https://gist.github.com/mcgrof/d12f586ec6ebe32b2472b5d634c397df > > Obviously this has to be tracked down and fixed before this patchset can > be merged ... I think I have some ideas. Let me look a bit. How > would I go about reproducing this? Using kdevops this is easy: make defconfig-lbs-xfs-small -j $(nproc) make -j $(nproc) make fstests make linux make fstests-baseline TESTS=generic/447 COUNT=10 tail -f guestfs/*-xfs-reflink-16k-4ks/console.log or sudo virsh list sudo virsh console ${foo}-xfs-reflink-16k-4ks Where $foo is the value of CONFIG_KDEVOPS_HOSTS_PREFIX in .config for your kdevops run. Otherwise if you wanna run things manually the above uses an lbs branch called large-block-minorder on kdevops [0] based on v6.9-rc5 with: a) Fixes we know we need b) this patch series minus this patch c) A truncation enablement patch Note that the above also uses an fstests git tree with the fstests changes we also have posted as fixes and some new tests which have been posted [1]. You will then want to run: ./check -s xfs_reflink_16k_4ks -I 10 generic/447 The configuration for xfs_reflink_16k_4ks follows: cat /var/lib/xfstests/configs/min-xfs-reflink-16k-4ks.config [default] FSTYP=xfs TEST_DIR=/media/test SCRATCH_MNT=/media/scratch RESULT_BASE=$PWD/results/$HOST/$(uname -r) DUMP_CORRUPT_FS=1 CANON_DEVS=yes RECREATE_TEST_DEV=true SOAK_DURATION=9900 [xfs_reflink_16k_4ks] TEST_DEV=/dev/loop16 SCRATCH_DEV_POOL="/dev/loop5 /dev/loop6 /dev/loop7 /dev/loop8 /dev/loop9 /dev/loop10 /dev/loop11 /dev/loop12" MKFS_OPTIONS='-f -m reflink=1,rmapbt=1, -i sparse=1, -b size=16384, -s size=4k' USE_EXTERNAL=no LOGWRITES_DEV=/dev/loop15 I didn't have time to verify if the above commands for kdevops worked but... in theory its possible it may, because you know, May is right around the corner, and May... the force be with us. [0] https://github.com/linux-kdevops/linux/tree/large-block-minorder [1] https://github.com/linux-kdevops/fstests Luis