Re: [PATCH v6 14/26] rmap: Add support for PUD sized mappings to rmap

Dan Williams
2025-01-14T01:24:05Z

Alistair Popple wrote:
> The rmap doesn't currently support adding a PUD mapping of a
> folio. This patch adds support for entire PUD mappings of folios,
> primarily to allow for more standard refcounting of device DAX
> folios. Currently DAX is the only user of this and it doesn't require
> support for partially mapped PUD-sized folios so we don't support for
> that for now.
>
> Signed-off-by: Alistair Popple <apopple@nvidia.com>
> Acked-by: David Hildenbrand <david@redhat.com>
>
> ---
>
> Changes for v6:
>
> - Minor comment formatting fix
> - Add an additional check for CONFIG_TRANSPARENT_HUGEPAGE to fix a
> build breakage when CONFIG_PGTABLE_HAS_HUGE_LEAVES is not defined.
>
> Changes for v5:
>
> - Fixed accounting as suggested by David.
>
> Changes for v4:
>
> - New for v4, split out rmap changes as suggested by David.
> ---
> include/linux/rmap.h | 15 ++++++++++-
> mm/rmap.c | 67 ++++++++++++++++++++++++++++++++++++++++++---
> 2 files changed, 78 insertions(+), 4 deletions(-)

Looks mechanically correct to me.

Reviewed-by: Dan Williams <dan.j.williams@intel.com>