Re: [PATCH] mm/huge_memory: transfer the pmd dirty bit to the folio on zap
From: Christoph Hellwig
Date: Tue Aug 25 2026 - 01:57:17 EST
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.