Skip to content

get_user_pages() cleanup

Jan Kara ceph-devel dri-devel kvm linux-fbdev linux-fsdevel linux-ia64 linux-media linux-mm linux-nfs linux-rdma linux-scsi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest26 patches 36 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/26cris: Convert cryptocop to use get_user_pages_fast()arch/cris/arch-v32/drivers/cryptocop.c+10 -250 replies
2/26ia64: Use get_user_pages_fast() in err_inject.carch/ia64/kernel/err_inject.c+1 -20 replies
3/26dma: Use get_user_pages_fast() in dma_pin_iovec_pages()drivers/dma/iovlock.c+4 -110 replies
4/26drm: Convert via driver to use get_user_pages_fast()drivers/gpu/drm/via/via_dmablit.c+4 -80 replies
5/26omap3isp: Make isp_video_buffer_prepare_user() use get_user_pages_fast()drivers/media/platform/omap3isp/ispqueue.c+3 -72 replies
6/26vmw_vmci: Convert driver to use get_user_pages_fast()drivers/misc/vmw_vmci/vmci_host.c drivers/misc/vmw_vmci/vmci_queue_pair.c+7 -200 replies
7/26st: Convert sgl_map_user_pages() to use get_user_pages_fast()drivers/scsi/st.c+5 -130 replies
8/26ced1401: Convert driver to use get_user_pages_fast()drivers/staging/ced1401/ced_ioc.c+1 -40 replies
9/26crystalhd: Convert crystalhd_map_dio() to use get_user_pages_fast()drivers/staging/crystalhd/crystalhd_misc.c+1 -40 replies
10/26lustre: Convert ll_get_user_pages() to use get_user_pages_fast()drivers/staging/lustre/lustre/llite/rw26.c+2 -51 reply
11/26sep: Convert sep_lock_user_pages() to get_user_pages_fast()drivers/staging/sep/sep_main.c+2 -70 replies
12/26pvr2fb: Convert pvr2fb_write() to use get_user_pages_fast()drivers/video/pvr2fb.c+1 -50 replies
13/26fsl_hypervisor: Convert ioctl_memcpy() to use get_user_pages_fast()drivers/virt/fsl_hypervisor.c+2 -71 reply
14/26nfs: Convert direct IO to use get_user_pages_fast()fs/nfs/direct.c+4 -80 replies
15/26ceph: Convert ceph_get_direct_page_vector() to get_user_pages_fast()net/ceph/pagevec.c+2 -40 replies
16/26mm: Provide get_user_pages_unlocked()include/linux/mm.h+14 -03 replies
17/26kvm: Use get_user_pages_unlocked() in async_pf_execute()virt/kvm/async_pf.c+1 -31 reply
18/26mm: Convert process_vm_rw_pages() to use get_user_pages_unlocked()mm/process_vm_access.c+2 -65 replies
19/26ivtv: Convert driver to use get_user_pages_unlocked()drivers/media/pci/ivtv/ivtv-udma.c drivers/media/pci/ivtv/ivtv-yuv.c+8 -102 replies
20/26ib: Convert ib_umem_get() to get_user_pages_unlocked()drivers/infiniband/core/umem.c+17 -240 replies
21/26ib: Convert ipath_get_user_pages() to get_user_pages_unlocked()drivers/infiniband/hw/ipath/ipath_user_pages.c+27 -350 replies
22/26ib: Convert ipath_user_sdma_pin_pages() to use get_user_pages_unlocked()drivers/infiniband/hw/ipath/ipath_user_sdma.c+2 -50 replies
23/26ib: Convert qib_get_user_pages() to get_user_pages_unlocked()drivers/infiniband/hw/qib/qib_user_pages.c+26 -3614 replies
24/26ib: Convert qib_user_sdma_pin_pages() to use get_user_pages_unlocked()drivers/infiniband/hw/qib/qib_user_sdma.c+2 -50 replies
25/26ib: Convert mthca_map_user_db() to use get_user_pages_fast()drivers/infiniband/hw/mthca/mthca_memfree.c+1 -20 replies
26/26aio: Remove useless get_user_pages() callfs/aio.c+17 -310 replies

Reviews trailers per patch

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

PatchLaurent PinchartAndreas DilgerAndy Walls
1/26
2/26
3/26
4/26
5/26A-b
6/26
7/26
8/26
9/26
10/26A-b
11/26
12/26
13/26
14/26
15/26
16/26
17/26
18/26
19/26R-b A-b
20/26
21/26
22/26
23/26
24/26
25/26
26/26

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/26] get_user_pages() cleanup

Hello,

In my quest for changing locking around page faults to make things easier for
filesystems I found out get_user_pages() users could use a cleanup. The knowledge about necessary locking for get_user_pages() is in tons of places in drivers and quite a few of them actually get it wrong (don't have mmap_sem when calling get_user_pages() or hold mmap_sem when calling copy_from_user() in the surrounding code). Rather often this actually doesn't seem necessary. This patch series converts lots of places to use either get_user_pages_fast() or a new simple wrapper get_user_pages_unlocked() to remove the knowledge of mmap_sem from the drivers. I'm still looking into converting a few remaining drivers (most notably v4l2) which are more complex.

As I already wrote, in some cases I actually think drivers were buggy (and I note that in corresponding changelogs). I would really like to ask respective maintainers to have a look at the patches in their area. Also any other comments are welcome. Thanks.

Honza

PS: Sorry for the huge recipient list but I don't really know how to trim it

    down...
CC Alexander Viro <[email protected]>
CC Andreas Dilger <[email protected]>
CC Andy Walls <[email protected]>
CC Arnd Bergmann <[email protected]>
CC Benjamin LaHaise <[email protected]>
CC Dan Williams <[email protected]>
CC David Airlie <[email protected]>
CC Gleb Natapov <[email protected]>
CC Greg Kroah-Hartman <[email protected]>
CC Jarod Wilson <[email protected]>
CC Jayant Mangalampalli <[email protected]>
CC Jean-Christophe Plagniol-Villard <[email protected]>
CC Jesper Nilsson <[email protected]>
CC Kai Makisara <[email protected]>
CC Laurent Pinchart <[email protected]>
CC Manu Abraham <[email protected]>
CC Mark Allyn <[email protected]>
CC Mikael Starvik <[email protected]>
CC Mike Marciniszyn <[email protected]>
CC Naren Sankar <[email protected]>
CC Paolo Bonzini <[email protected]>
CC Peng Tao <[email protected]>
CC Roland Dreier <[email protected]>
CC Sage Weil <[email protected]>
CC Scott Davilla <[email protected]>
CC Timur Tabi <[email protected]>
CC Tomi Valkeinen <[email protected]>
CC Tony Luck <[email protected]>
CC Trond Myklebust <[email protected]>

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to [email protected]. For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"[email protected]">[email protected]</a>