Re: [PATCH] mm/huge_memory: transfer the pmd dirty bit to the folio on zap

Christoph Hellwig <[email protected]>
Newsgroups org.kernel.vger.stable,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
On Thu, Aug 20, 2026 at 02:13:37PM +0800, Lance Yang wrote:
> XFS installs the huge-fault, regular-fault, and page_mkwrite callbacks
> in the same vm_ops:
> 
> static const struct vm_operations_struct xfs_file_vm_ops = {
> 	.fault		= xfs_filemap_fault,
> 	.huge_fault	= xfs_filemap_huge_fault,
> 	...
> 	.page_mkwrite	= xfs_filemap_page_mkwrite,
> 	...
> };
> 
> On the fallback path, handle_pte_fault() leaves an empty PMD without a
> PTE and calls do_pte_missing():

Just a reminder that it would be extremely helpful if we could refactor
the vm_operations_struct so that file systems could register one single
fault handler to cover all these (plus .pfn_mkwrite) to remove all
the annoying boilerplate code in the file system and the confusing
fallback logic in the VM.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.