From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=117.135.210.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796292646; b=P46h2M19GoKZ4ztmeBuagP2sY20mgVraIbPg/SsDtLWldse1ExmtR0Xz2/EYU84HUzKW WDlWqESFDFbb+iYFsvBP2xqpAoUL0H2McJOXlN/le+oYpNqOuk2acJ82XIbAx3m8y3BsU YFHgE2AixKmb1X7LoJdIxz7B+GxDPNOZkrZUcT9a8Det3LvhoY7EA8g2LpvJHn7azI86e xMfYrHD0fFcw8Jf1beVXcfWBOJep0dthH7fZodKYPvPuyNSJ1JCK+LQZAUBXKzeIfOdmv PyiZgtgDn7NUb5D8tfqI1uRkaXY/8R8GEb3UPB8yYBXKcXBOZ/2KZc+rVHvaeQswNDA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796292646; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-CM-TRANSID: X-Coremail-Antispam:X-Originating-IP:X-CM-SenderInfo; bh=08KmAXkYWr6M5Yb2W2ZlRhxi99ebJg+ddzImZIWBvNQ=; b=w/GO7DYOBCx+J2k/xHUKZoEms7j76c6QEXflGmTS6GA1Uxk6+CH/UL0EyfZbzv90UzEy Mai28/yi4u+ZzsDnQLBKr1n5VCZFXTjkRuYow1cvChVfHvTd3BLR9MHJe+uhhkRucxcMi IEzZjx/FrJ8K6PoALVEVGofJ6owJxbXTg34takxmtnhSCMX6YZqgnyEXt7D+xgt/LY3yL hUkqpTLlhGK3MVf65VGxFDANmupCTTxF1jpQ+Xcm4hhiQwmFgVcMZ3LR7MGt8RSzyDYrn 6Vm5MXVIdFlerH01Q7HUCI2BcFGzd1Tm44EJmfqAhnQLGK2bAujTAK5zMC/P/xau2qg== 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=hQrEuc6Z; arc=none smtp.remote-ip=117.135.210.4 Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.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 B86C2606A322 for ; Thu, 3 Dec 2026 10:10:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B86C2606A322 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=hQrEuc6Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Message-ID:Date:MIME-Version:Subject:To:From: Content-Type; bh=08KmAXkYWr6M5Yb2W2ZlRhxi99ebJg+ddzImZIWBvNQ=; b=hQrEuc6ZJvgH84j5uzbcauto82cCOLNJKQSgQF7+15Joev8D2z5RG3Zbk3tAd9 7HpOifkA9FSRCFqC07xc96aZx3KoGLJyShv4pu5QIW6q9/LfDiWnNLrb1L7Lvoh+ pC2X9TD5IHkxT7nQk0RjreY7DnuOxvHl18zvIkDiPxVGg= Received: from [IPV6:2409:8900:1ac1:a242:fb90:6458:4b25:9f5a] (unknown []) by gzsmtp2 (Coremail) with SMTP id PSgvCgDnrzEQQBFr6eNeJA--.41606S2; Thu, 03 Dec 2026 18:10:25 +0800 (CST) Message-ID: <809b4533-6213-4dc0-a330-dedd39df0f89@163.com> Date: Thu, 3 Dec 2026 18:10:24 +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 To: Namjae Jeon Cc: hyc.lee@gmail.com, ntfs@lists.linux.dev, linux-kernel@vger.kernel.org, Baolin Liu References: <20261203040352.1161120-1-liubaolin12138@163.com> <91816f40-acd5-463f-9b01-de0ea4db871e@163.com> Content-Language: en-US From: liubaolin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID:PSgvCgDnrzEQQBFr6eNeJA--.41606S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxKFWrAryrGF48tryDXF18Krg_yoW3ArWkpr ZxKFnxKr18JryrA39Fyw1j93y0v3yfJa1UX3Z0gr1IqFnYyF1rtFWkK3W09FWkCr9Yg3Wj vw4UG347WFyYyFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UI1vfUUUUU= X-CM-SenderInfo: xolxutxrol0iasrtmqqrwthudrp/xtbC6RMz-WsRQBMRmQAA3V 在 2026/12/3 13:30, Namjae Jeon 写道: > On Thu, Dec 3, 2026 at 1:23 PM liubaolin wrote: >> >> >> >> 在 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/ > Okay, could you please check Sashiko's review comments ? > > https://sashiko.dev/#/patchset/20261203040352.1161120-1-liubaolin12138%40163.com Hi Namjae, Sure, I'll go through Sashiko's comments, address any issues I find, and send v2 as soon as I can. Thanks, Baolin. > >> >> 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. > Thanks for the work and test:) >> >> I also plan to work with some colleagues and friends to investigate >> the existing failures and the reasons for the skipped tests. > Sounds good. >> When you have a chance, I'd appreciate your review and any suggestions. > Okay, I will check it. > > Thanks! >> >> Thanks, >> Baolin. >>