From: liubaolin <liubaolin12138@163.com>
To: linkinjeon@kernel.org, hyc.lee@gmail.com
Cc: ntfs@lists.linux.dev, linux-kernel@vger.kernel.org,
Baolin Liu <liubaolin@kylinos.cn>
Subject: Re: [PATCH v1 00/13] ntfs: add large folio support for ordinary files
Date: Thu, 3 Dec 2026 12:23:06 +0800 [thread overview]
Message-ID: <91816f40-acd5-463f-9b01-de0ea4db871e@163.com> (raw)
In-Reply-To: <20261203040352.1161120-1-liubaolin12138@163.com>
在 2026/12/3 12:03, Baolin Liu 写道:
> From: Baolin Liu <liubaolin@kylinos.cn>
>
> This series enables large page-cache folios for ordinary, unnamed NTFS
> regular-file data streams through iomap. It applies to ntfs-next at
> f674e4b6c315 ("ntfs: serialize export parent reconstruction"), fetched on
> 26 November 2026, with no additional prerequisite patches.
>
> Large folios require CONFIG_TRANSPARENT_HUGEPAGE; order-0 fallback remains
> available. The policy excludes metadata, SYSTEM-marked files, directories,
> named/internal streams, MST-protected data, encrypted files and files
> already using native or WOF compression when initialized. It covers new
> files, O_TMPFILE files and resident files that grow nonresident.
>
> Empty files can change native compression while retaining their original
> folio policy. Prepare compressed reads and writes for this case, including
> folios spanning compression units. Retained VMAs can still read; writes
> through retained shared writable VMAs fault with SIGBUS. New mmap requests
> for compressed files remain unsupported.
>
> Patches 1-8 fix writeback, cache-coherency, locking and space-accounting
> issues found during validation without large folios. Patch 8 keeps 2% of
> the volume, capped at 4096 clusters, for MFT, MFT bitmap and attribute-list
> growth. This reduces f_bavail and data capacity, including for root, and
> is separate from MFT zone placement. Patches 9-12 handle compression
> switching, folio I/O and EOF within a base page. Patch 13 enables large
> folios and documents the scope.
>
> Performance measurements compare an order-0 kernel based on 8a27d1f43f1b
> with a large-folio-enabled build of the same base. The setup was x86-64
> KVM (2 vCPUs, 3 GiB RAM), NVMe-backed raw images on host ext4, 512-byte
> NTFS clusters and 1 GiB files. fio 3.41 used one buffered psync worker,
> 1 MiB sequential I/O and 4 KiB random reads. Tracing was disabled during
> timing.
>
> The mixed workload used four VM boots in control/folio/folio/control
> order, with five rounds per boot. Values are medians within each boot,
> then medians across boots:
>
> Metric Order-0 Large folios Change
> Warm sequential read (MiB/s) 16012 18616 +16.3%
> Warm random read (MiB/s) 5098 6265 +22.9%
> Write + fsync (MiB/s) 2449 2691 +9.9%
> mmap page-touch, 50 passes (s) 1.689 1.460 -13.6%
> Cold sequential read (MiB/s) 3489 3382 -3.1%
> Cold-read task CPU (s/GiB) 0.1295 0.0655 -49.4%
> Write task CPU (s/GiB) 0.1550 0.0655 -57.7%
>
> CPU figures are fio task user+system time per GiB, excluding host QEMU
> CPU. A follow-up cold-read-only comparison reused the same read-only
> image across eight boots (ABBA + BAAB, five rounds per boot). Throughput
> was 3568 versus 3619 MiB/s (+1.4%, broadly unchanged), while task CPU
> fell from 0.1260 to 0.0655 s/GiB (-48.0%). All boots, including one slow
> control boot, are included. These measurements show lower task CPU cost
> and gains in cached reads and writes under this VM-backed storage setup;
> they do not establish a general cold-read throughput improvement.
>
> Offline consistency checks used ntfsck from ntfsprogs-plus. The x86
> guests invoked it as fsck.ntfs -n after unmounting the test volumes.
>
> Functional and regression tests used the same source trees as this
> series and its control:
>
> - W=1 fs/ntfs builds at every patch boundary with debug and minimal
> configurations; full x86-64 and ARM64 64 KiB-page kernel builds.
> - x86-64 KVM: 111 data comparisons and ten offline consistency checks
> passed.
> - ARM64 TCG with 64 KiB base pages: 136 checks, ten compressed EOF
> cases and three offline consistency checks passed; observed folio
> orders 1-6.
> - Six complete x86-64 KVM xfstests auto runs with identical kernel
> configurations and xfstests v2025.11.04-10-gdf376ed02:
>
> Cluster Control pass/fail/notrun Series pass/fail/notrun
> 512 B 306 / 45 / 212 308 / 43 / 212
> 4 KiB 309 / 45 / 209 309 / 45 / 209
> 64 KiB 307 / 45 / 211 307 / 45 / 211
>
> The control includes patches 1-8, so the auto comparison isolates patches
> 9-13. All 563 selected tests completed per run, retaining the appliance's
> 210 default exclusions and adding none. There were no new failures or
> notruns, and notrun reasons matched.
>
> Existing failures include consistency errors reported by ntfsck on the
> scratch filesystem. ARM64 testing did not cover 512 MiB PMD collapse and
> still reported the existing MFT extent-record diagnostic on 512-byte
> clusters. Some x86 guests reported root ext4/vda I/O errors after
> power-down.
>
> Baolin Liu (13):
> ntfs: limit writeback allocation to the dirty range
> ntfs: read compression units without the block device page cache
> ntfs: snapshot resident data for direct reads
> ntfs: allow vmalloc for large runlist backups
> ntfs: preserve delalloc reservations when allocating holes
> ntfs: serialize delalloc reservations with cluster allocation
> ntfs: respect space reservations when writing compressed data
> ntfs: keep space for MFT growth during delayed allocation
> ntfs: serialize compression changes with file access
> ntfs: complete compressed reads at folio granularity
> ntfs: stop compressed reads at EOF within a base page
> ntfs: preserve large folios during compressed writes
> ntfs: enable large folios for ordinary files
>
> Documentation/filesystems/ntfs.rst | 34 ++++
> fs/ntfs/attrib.c | 15 +-
> fs/ntfs/attrlist.c | 2 +-
> fs/ntfs/compress.c | 317 +++++++++++++++--------------
> fs/ntfs/ea.c | 7 +
> fs/ntfs/file.c | 26 ++-
> fs/ntfs/inode.c | 10 +
> fs/ntfs/iomap.c | 43 +++-
> fs/ntfs/lcnalloc.c | 18 +-
> fs/ntfs/lcnalloc.h | 13 +-
> fs/ntfs/mft.c | 7 +-
> fs/ntfs/ntfs_codec.h | 2 +-
> fs/ntfs/super.c | 18 +-
> fs/ntfs/volume.h | 2 +
> 14 files changed, 317 insertions(+), 197 deletions(-)
>
>
> base-commit: f674e4b6c315ebe742d08af80659386992d58ce9
Hi Namjae and Hyunchul,
I've posted a 13-patch series adding large folio support for ordinary
NTFS files. It covers buffered I/O and mmap for unnamed, uncompressed
data streams, while keeping order-0 fallback:
https://lore.kernel.org/all/20261203040352.1161120-1-liubaolin12138@163.com/
In my x86-64 KVM tests with NVMe-backed storage and 512-byte
clusters, warm sequential reads improved by 16.3% and warm random reads
by 22.9%. Buffered writes including fsync improved by 9.9%. fio task CPU
time per GiB also fell by about 48% for cold reads and 57.7% for writes.
I also ran kvm-xfstests auto with 512-byte, 4 KiB and 64 KiB
clusters. With the same baseline fixes in both kernels, we saw no new
failures or skips after adding large folio support. The cover letter has
the detailed results.
I also plan to work with some colleagues and friends to investigate
the existing failures and the reasons for the skipped tests.
When you have a chance, I'd appreciate your review and any suggestions.
Thanks,
Baolin.
next prev parent reply other threads:[~2026-12-03 4:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 4:03 Baolin Liu
2026-12-03 4:03 ` [PATCH v1 01/13] ntfs: limit writeback allocation to the dirty range Baolin Liu
2026-12-03 4:03 ` [PATCH v1 02/13] ntfs: read compression units without the block device page cache Baolin Liu
2026-12-03 4:03 ` [PATCH v1 03/13] ntfs: snapshot resident data for direct reads Baolin Liu
2026-12-03 4:03 ` [PATCH v1 04/13] ntfs: allow vmalloc for large runlist backups Baolin Liu
2026-12-03 4:03 ` [PATCH v1 05/13] ntfs: preserve delalloc reservations when allocating holes Baolin Liu
2026-12-03 4:03 ` [PATCH v1 06/13] ntfs: serialize delalloc reservations with cluster allocation Baolin Liu
2026-12-03 4:03 ` [PATCH v1 07/13] ntfs: respect space reservations when writing compressed data Baolin Liu
2026-12-03 4:03 ` [PATCH v1 08/13] ntfs: keep space for MFT growth during delayed allocation Baolin Liu
2026-12-03 4:03 ` [PATCH v1 09/13] ntfs: serialize compression changes with file access Baolin Liu
2026-12-03 4:03 ` [PATCH v1 10/13] ntfs: complete compressed reads at folio granularity Baolin Liu
2026-12-03 4:03 ` [PATCH v1 11/13] ntfs: stop compressed reads at EOF within a base page Baolin Liu
2026-12-03 4:03 ` [PATCH v1 12/13] ntfs: preserve large folios during compressed writes Baolin Liu
2026-12-03 4:03 ` [PATCH v1 13/13] ntfs: enable large folios for ordinary files Baolin Liu
2026-12-03 4:23 ` liubaolin [this message]
2026-12-03 5:30 ` [PATCH v1 00/13] ntfs: add large folio support " Namjae Jeon
2026-12-03 10:10 ` liubaolin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91816f40-acd5-463f-9b01-de0ea4db871e@163.com \
--to=liubaolin12138@163.com \
--cc=hyc.lee@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liubaolin@kylinos.cn \
--cc=ntfs@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®