OSDN Git Service

RDMA/umem: Move all the ODP related stuff out of ucontext and into per_mm
authorJason Gunthorpe <jgg@mellanox.com>
Sun, 16 Sep 2018 17:48:07 +0000 (20:48 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 21 Sep 2018 15:54:46 +0000 (11:54 -0400)
commitc9990ab39b6e911003bab10a6da96e98ab1503a3
tree9a58cb3f9c74089b3e022d5dc89d808f8bf9bb2c
parent597ecc5a095406a668e53ab330495ddb65327f77
RDMA/umem: Move all the ODP related stuff out of ucontext and into per_mm

This is the first step to make ODP use the owning_mm that is now part of
struct ib_umem.

Each ODP umem is linked to a single per_mm structure, which in turn, is
linked to a single mm, via the embedded mmu_notifier. This first patch
introduces the structure and reworks eveything to use it.

This also needs to introduce tgid into the ib_ucontext_per_mm, as
get_user_pages_remote() requires the originating task for statistics
tracking.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/umem_odp.c
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/hw/mlx5/odp.c
include/rdma/ib_umem_odp.h
include/rdma/ib_verbs.h