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 059EAC30653 for ; Thu, 4 Jul 2024 11:23:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8A53A6B00B4; Thu, 4 Jul 2024 07:23:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 855CC6B00B6; Thu, 4 Jul 2024 07:23:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F6BB6B00B7; Thu, 4 Jul 2024 07:23:33 -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 50FBD6B00B4 for ; Thu, 4 Jul 2024 07:23:33 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id ECFFD1C1644 for ; Thu, 4 Jul 2024 11:23:32 +0000 (UTC) X-FDA: 82301834664.27.AE4CED6 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by imf27.hostedemail.com (Postfix) with ESMTP id E71014001C for ; Thu, 4 Jul 2024 11:23:30 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=pankajraghav.com header.s=MBO0001 header.b=XBiq1xE1; spf=pass (imf27.hostedemail.com: domain of kernel@pankajraghav.com designates 80.241.56.172 as permitted sender) smtp.mailfrom=kernel@pankajraghav.com; dmarc=pass (policy=quarantine) header.from=pankajraghav.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720092198; a=rsa-sha256; cv=none; b=JQ16aYqeUdl+jyswIi1zcZia0eCbqHx10ft1wQAU8BWByc5EofiUwqRqeYT8AP47GvphEP yVN5WGKBi5hQPAqiGAVoT9fPHTNllJZxN9v1q3QykeRdsgDNYtPjujupf6g7vlbzxXekDQ J3Zf6Aw4R0/HOYSdzYVd5wJ4cjsVOwI= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=pankajraghav.com header.s=MBO0001 header.b=XBiq1xE1; spf=pass (imf27.hostedemail.com: domain of kernel@pankajraghav.com designates 80.241.56.172 as permitted sender) smtp.mailfrom=kernel@pankajraghav.com; dmarc=pass (policy=quarantine) header.from=pankajraghav.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720092198; 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:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=3dxNOGhfNGAjYVHU9ar+wjZtc9amrH6gr9ZRGCzp9lc=; b=QtZF4I2mcO0j00rfFObPVxpqPjk9GSblRvD1A7Nq3/zumld5cLqu69AYAEb7Z3Ius1Twaj jlaB1Y5xlpgYI4vX+C/BZL3JNdZqgv9jVq5qTfw2KEmputz9hfzwPWdVPHmKBVMDvWvmbh lHDOP4fVxXgQWupDj4od0BKQWg/9iSY= Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4WFDmF3QGbz9sTk; Thu, 4 Jul 2024 13:23:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pankajraghav.com; s=MBO0001; t=1720092205; 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: content-transfer-encoding:content-transfer-encoding; bh=3dxNOGhfNGAjYVHU9ar+wjZtc9amrH6gr9ZRGCzp9lc=; b=XBiq1xE15euorUKdE9CA20Ht7ksK1twWwZnkS0R8/xLLIAAI1HeUz3Il4HHy0MnqZ/egg8 O/SvONo4HhSB7ruEy0eJMp8eY3uAMSBhP7v3EjNG4fx7lRrwgjeB95f6UmJ9Cy+H5nIbZe fveqfentOgLqxbofudhh2qFBbYaHj/iBvVydTNImsWM901vhyOMebXNZfp7PCdduSyztOz j1LVm0+XyshLrFwEIUvbgfjqYrIJUce0Aue4Z522W9kvcEM4HThzdwKxx/Ro4SqmMkv9lX 0uNSSA/yMUJ5jVVNAco9Xm0lJ1Rn0Af1pghyYB+UP4Rpjs7eyxBqU68EhckTQw== From: "Pankaj Raghav (Samsung)" To: david@fromorbit.com, willy@infradead.org, chandan.babu@oracle.com, djwong@kernel.org, brauner@kernel.org, akpm@linux-foundation.org Cc: yang@os.amperecomputing.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, john.g.garry@oracle.com, linux-fsdevel@vger.kernel.org, hare@suse.de, p.raghav@samsung.com, mcgrof@kernel.org, gost.dev@samsung.com, cl@os.amperecomputing.com, linux-xfs@vger.kernel.org, kernel@pankajraghav.com, hch@lst.de, Zi Yan Subject: [PATCH v9 00/10] enable bs > ps in XFS Date: Thu, 4 Jul 2024 11:23:10 +0000 Message-ID: <20240704112320.82104-1-kernel@pankajraghav.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: xo8zrc6675c1mjoh9hoim1sttk6ogspe X-Rspamd-Queue-Id: E71014001C X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1720092210-618522 X-HE-Meta: U2FsdGVkX1+KKhFbsydqgJFAfq4WObZqso73OHvUCO5M1toGotwEri2RY/sVOLBJ72ID7DOgQZHU+w4GXJtwa7KCqJvZxDi9S1tu6HORc8hzNZwLzPGHLrq5GPSfTBn4haURinHYYhr6V6DQNQtXMTFqdmdDxf78k8dZ5PEDKISfI9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6L4qskNp84zvuR6A0n0P1w5+DDr+IRN2/jOfK616HckqxEKYfPYZ6eW9YuABixLoMPay5O+/loL0wJgyTviM6ayBX7ReVJ5ZxVNlNutaM8SwUIwucZ2njln9cgQNR9Rk9VK1Hvs7s85LcXxdObcWU8AxgPxeeZ/PQCLZf8e2qsibfT7zoHnM7XfBUBvVxsIenlTknuXFFy4uHmsxrj4IfD5DrX9tmHvnYlxI7tCkN 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: From: Pankaj Raghav This is the ninth version of the series that enables block size > page size (Large Block Size) in XFS. The context and motivation can be seen in cover letter of the RFC v1 [0]. We also recorded a talk about this effort at LPC [1], if someone would like more context on this effort. A lot of emphasis has been put on testing using kdevops, starting with an XFS baseline [3]. The testing has been split into regression and progression. Regression testing: In regression testing, we ran the whole test suite to check for regressions on existing profiles due to the page cache changes. I also ran split_huge_page_test selftest on XFS filesystem to check for huge page splits in min order chunks is done correctly. No regressions were found with these patches added on top. Progression testing: For progression testing, we tested for 8k, 16k, 32k and 64k block sizes. To compare it with existing support, an ARM VM with 64k base page system (without our patches) was used as a reference to check for actual failures due to LBS support in a 4k base page size system. There are some tests that assumes block size < page size that needs to be fixed. We have a tree with fixes for xfstests [4], most of the changes have been posted already, and only a few minor changes need to be posted. Already part of these changes has been upstreamed to fstests, and new tests have also been written and are out for review, namely for mmap zeroing-around corner cases, compaction and fsstress races on mm, and stress testing folio truncation on file mapped folios. No new failures were found with the LBS support. We've done some preliminary performance tests with fio on XFS on 4k block size against pmem and NVMe with buffered IO and Direct IO on vanilla Vs + these patches applied, and detected no regressions. We also wrote an eBPF tool called blkalgn [5] to see if IO sent to the device is aligned and at least filesystem block size in length. For those who want this in a git tree we have this up on a kdevops large-block-minorder-for-next-v9 tag [6]. [0] https://lore.kernel.org/lkml/20230915183848.1018717-1-kernel@pankajraghav.com/ [1] https://www.youtube.com/watch?v=ar72r5Xf7x4 [2] https://lkml.kernel.org/r/20240501153120.4094530-1-willy@infradead.org [3] https://github.com/linux-kdevops/kdevops/blob/master/docs/xfs-bugs.md 489 non-critical issues and 55 critical issues. We've determined and reported that the 55 critical issues have all fall into 5 common XFS asserts or hung tasks and 2 memory management asserts. [4] https://github.com/linux-kdevops/fstests/tree/lbs-fixes [5] https://github.com/iovisor/bcc/pull/4813 [6] https://github.com/linux-kdevops/linux/ [7] https://lore.kernel.org/linux-kernel/Zl20pc-YlIWCSy6Z@casper.infradead.org/#t Changes since v8: - make iomap_dio_zero return error code and some variable name changes. - Call THP_SPLIT_PAGE_FAILED only if folio_is_pmd_mappable() - Collected RVB from willy, Darrick and Dave. Dave Chinner (1): xfs: use kvmalloc for xattr buffers Luis Chamberlain (1): mm: split a folio in minimum folio order chunks Matthew Wilcox (Oracle) (1): fs: Allow fine-grained control of folio sizes Pankaj Raghav (7): filemap: allocate mapping_min_order folios in the page cache readahead: allocate folios with mapping_min_order in readahead filemap: cap PTE range to be created to allowed zero fill in folio_map_range() iomap: fix iomap_dio_zero() for fs bs > system page size xfs: expose block size in stat xfs: make the calculation generic in xfs_sb_validate_fsb_count() xfs: enable block size larger than page size support fs/iomap/buffered-io.c | 4 +- fs/iomap/direct-io.c | 45 ++++++++++++-- fs/xfs/libxfs/xfs_attr_leaf.c | 15 ++--- fs/xfs/libxfs/xfs_ialloc.c | 5 ++ fs/xfs/libxfs/xfs_shared.h | 3 + fs/xfs/xfs_icache.c | 6 +- fs/xfs/xfs_iops.c | 2 +- fs/xfs/xfs_mount.c | 8 ++- fs/xfs/xfs_super.c | 18 +++--- include/linux/huge_mm.h | 14 +++-- include/linux/pagemap.h | 107 +++++++++++++++++++++++++++++----- mm/filemap.c | 36 +++++++----- mm/huge_memory.c | 55 +++++++++++++++-- mm/readahead.c | 83 +++++++++++++++++++------- 14 files changed, 317 insertions(+), 84 deletions(-) base-commit: 74564adfd3521d9e322cfc345fdc132df80f3c79 -- 2.44.1