Skip to content

mm/gup: add make_dirty arg to put_user_pages_dirty_lock()

[email protected] bpf dri-devel linux-mm linux-rdma lkml netdev 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 posting 2/241 patches 7 repliesIn review
  2. v6 Latest3 patches 2 repliesIn review
  3. v53 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v43 patches5 repliesSuperseded
v3 posting 1/23 patches0 repliesSuperseded
v23 patches1 replySuperseded

Changes in v6 from the cover letter

* Patch #1: Fixed a bug that I introduced in v4:
drivers/infiniband/sw/siw/siw_mem.c needs to refer to umem->page_chunk[i].plist, rather than umem->page_chunk[i].

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm/gup: add make_dirty arg to put_user_pages_dirty_lock()drivers/infiniband/core/umem.c drivers/infiniband/hw/hfi1/user_pages.c drivers/infiniband/hw/qib/qib_user_pages.c +4 more+61 -1062 replies
2/3drivers/gpu/drm/via: convert put_page() to put_user_page*()drivers/gpu/drm/via/via_dmablit.c+2 -80 replies
3/3net/xdp: convert put_page() to put_user_page*()net/xdp/xdp_umem.c+1 -80 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchChristoph HellwigBjörn Töpel
1/3R-b
2/3
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/3] mm/gup: add make_dirty arg to put_user_pages_dirty_lock()

From: John Hubbard <[email protected]>

Changes since v5:

* Patch #1: Fixed a bug that I introduced in v4:
drivers/infiniband/sw/siw/siw_mem.c needs to refer to umem->page_chunk[i].plist, rather than umem->page_chunk[i].

Changes since v4:

* Christophe Hellwig's review applied: deleted siw_free_plist() and __qib_release_user_pages(), now that put_user_pages_dirty_lock() does what those routines were doing.

* Applied Bjorn's ACK for net/xdp, and Christophe's Reviewed-by for patch #1.

Changes since v3:

* Fixed an unused variable warning in siw_mem.c

Changes since v2:

* Critical bug fix: remove a stray "break;" from the new routine.

Changes since v1:

* Instead of providing __put_user_pages(), add an argument to put_user_pages_dirty_lock(), and delete put_user_pages_dirty(). This is based on the following points:

1. Lots of call sites become simpler if a bool is passed into put_user_page*(), instead of making the call site choose which put_user_page*() variant to call.

2. Christoph Hellwig's observation that set_page_dirty_lock() is usually correct, and set_page_dirty() is usually a bug, or at least questionable, within a put_user_page*() calling chain.

* Added the Infiniband driver back to the patch series, because it is a caller of put_user_pages_dirty_lock().

Unchanged parts from the v1 cover letter (except for the diffstat):

Notes about the remaining patches to come:

There are about 50+ patches in my tree [2], and I'll be sending out the remaining ones in a few more groups:

* The block/bio related changes (Jerome mostly wrote those, but I've had to move stuff around extensively, and add a little code)

* mm/ changes

* other subsystem patches

* an RFC that shows the current state of the tracking patch set. That can only be applied after all call sites are converted, but it's good to get an early look at it.

This is part a tree-wide conversion, as described in commit fc1d8e7cca2d ("mm: introduce put_user_page*(), placeholder versions").

John Hubbard (3):
mm/gup: add make_dirty arg to put_user_pages_dirty_lock() drivers/gpu/drm/via: convert put_page() to put_user_page*() net/xdp: convert put_page() to put_user_page*()

 drivers/gpu/drm/via/via_dmablit.c          |  10 +-
 drivers/infiniband/core/umem.c             |   5 +-
 drivers/infiniband/hw/hfi1/user_pages.c    |   5 +-
 drivers/infiniband/hw/qib/qib_user_pages.c |  13 +--
 drivers/infiniband/hw/usnic/usnic_uiom.c   |   5 +-
 drivers/infiniband/sw/siw/siw_mem.c        |  19 +---
 include/linux/mm.h                         |   5 +-
 mm/gup.c                                   | 115 +++++++++------------
 net/xdp/xdp_umem.c                         |   9 +-
 9 files changed, 64 insertions(+), 122 deletions(-)
Signature · 1 line
2.22.0