Thread (59 messages) 59 messages, 8 authors, 2025-06-12

Re: [PATCH 06/12] mm/gup: Remove pXX_devmap usage from get_user_pages()

From: Dan Williams <hidden>
Date: 2025-06-05 02:06:42
Also in: dri-devel, linux-arm-kernel, linux-cxl, linux-ext4, linux-fsdevel, linux-mm, linux-riscv, linux-xfs, lkml, loongarch, nvdimm

Alistair Popple wrote:
GUP uses pXX_devmap() calls to see if it needs to a get a reference on
the associated pgmap data structure to ensure the pages won't go
away. However it's a driver responsibility to ensure that if pages are
mapped (ie. discoverable by GUP) that they are not offlined or removed
from the memmap so there is no need to hold a reference on the pgmap
data structure to ensure this.

Furthermore mappings with PFN_DEV are no longer created, hence this
effectively dead code anyway so can be removed.

Signed-off-by: Alistair Popple <apopple@nvidia.com>
---
 include/linux/huge_mm.h |   3 +-
 mm/gup.c                | 162 +----------------------------------------
 mm/huge_memory.c        |  40 +----------
 3 files changed, 5 insertions(+), 200 deletions(-)
Hooray! Goodbye dev_pagemap mess in gup.c.

Reviewed-by: Dan Williams <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help