From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796271816; b=XKiXJMkgZwAS8az1e9DW8dFVtaRmI+Ur9/gMTPUTn+Q0PiVSO9FqBmYXb3EvqR5x+AsJ yBKOt2HQ3d7UDX9UT/Cl1d2VqHMrx3D5/mwk9brdLEGHXJ/zCwV+zMjIiYNW3QFF8ymIR vKTj8RfnXneAado/v4SuRf2xTMwoZFQtJGrwS6ZAU6KrtzvnU2DjvzRK7S5JohK2cK7hn 3T4vZcP42XV7inoYYy/0Z6ot+ciqu0mLwX4LiiS/N4Vdcf/KrAnbLTXfCnH7curpBglK5 E4Vu18+RFH2MZTGtpfoA1Pff7Rdi7s6pXKz62Gd6VqKOMfDStTcpt/oBwEvVaVRDnAA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796271816; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:From:To:Cc:References:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-CM-TRANSID: X-Coremail-Antispam:X-Originating-IP:X-CM-SenderInfo; bh=a4pNixJk13yixm6rMPYEEqn4yN7k4oUgj+M89ymazpc=; b=3XDI6XB6vkggo1X4riVtB1HPwh2ZvxbcC5BndMjZEF9LJ5g8PP5+45S+sPOVP6n5IUkj xburEpiAEMV/qh0VzrZOPdAhIDN2WkVp9jqRDs5mgzmL4wUF3t5JVn4qkKn1NHcQhW7/M 3GjFaAo05Ion9IsxQO0v041wI9XLv0OwAUDf1ofuD9Gq8QTLqiDNpuApzG1B9Q9BT5yNg onWgkrNmnicwLkf9uVMkAwiqN6kp7PYbb1DN56/3TvKzaZsiqZZNyG1Io4N+XVvQW35zm +PFzeZ1qr/ztu6MQ8DPNV5xfglUNr7P4VGYBzSZYucmcJSPDNlLyhScKZUvE+BKCa9g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Q6vhpvc7; arc=none smtp.remote-ip=220.197.31.4 Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DC12606A32C for ; Thu, 3 Dec 2026 04:23:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9DC12606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Q6vhpvc7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Message-ID:Date:MIME-Version:Subject:From:To: Content-Type; bh=a4pNixJk13yixm6rMPYEEqn4yN7k4oUgj+M89ymazpc=; b=Q6vhpvc7dxK2MIMCeomtK1yrV3/CxuBCEgGozUE8NXX3TviJdZQReUaKFKMosG oADH1CJ29NeuJOwa2gg92UR4ojV3IHIompnzyHy063rRD1vHfqMpP4/I0sqeXK6j 0HZHe/bNYpM08pmOUoGSnmYZjs9duFvTj73MlSK5K78wI= Received: from [IPV6:2409:8900:1fd9:2502:909d:3ac8:6e83:4036] (unknown []) by gzsmtp4 (Coremail) with SMTP id PygvCgDHaYiq7hBrUIuDJg--.42421S2; Thu, 03 Dec 2026 12:23:08 +0800 (CST) Message-ID: <91816f40-acd5-463f-9b01-de0ea4db871e@163.com> Date: Thu, 3 Dec 2026 12:23:06 +0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 00/13] ntfs: add large folio support for ordinary files From: liubaolin To: linkinjeon@kernel.org, hyc.lee@gmail.com Cc: ntfs@lists.linux.dev, linux-kernel@vger.kernel.org, Baolin Liu References: <20261203040352.1161120-1-liubaolin12138@163.com> Content-Language: en-US In-Reply-To: <20261203040352.1161120-1-liubaolin12138@163.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID:PygvCgDHaYiq7hBrUIuDJg--.42421S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxKFWrAw1kGry7KrykAF43ZFb_yoWxuF1fpr ZxCrn3Kr18JrW0y39Fkw1jgFW8Za93Ja1UX3Z0gr17t3Z5t3W5tFWkt3Wvvay8Cr9agw1q yw4UW3srWFy5ZaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07U2kskUUUUU= X-CM-SenderInfo: xolxutxrol0iasrtmqqrwthudrp/xtbC6Q3FkGsQ7q0i9wAA3c 在 2026/12/3 12:03, Baolin Liu 写道: > From: Baolin Liu > > 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.