[PATCH 00/10] Allow dissociation after destroy for the ioctl methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

The previous series fixed this for the write methods, but the ioctl
methods had an additional problem where the ioctl parser relies on
datastructures stored in the driver's rodata.

This series solves this by revising how the parsing tree is stored in
memory. A new datastructure called 'uverbs_api' is introduced that builds
the rodata description into a proper kernel radix tree with an optimized
small value 'bkey' for attributes.

The new datastructure is designed to allow a driver to disassociate from
the runtime api description so that non-driver methods like destroy can
continue to work.

The major rework in datastructures and parsing of ioctl provides a nice
code simplification, source code size reduction and I measure
approximately a 6% reduction in ioctl syscall time overhead.

The downside is that this uses a bit more memory in the radix tree, but
that is likely negligible for RDMA.

This data structure design is intended to support future series that will
rework how the rodata description is stored to add more features, reduce
its size, and reduce the complexity required to build the rodata.

Jason Gunthorpe (10):
  IB/uverbs: Have the core code create the uverbs_root_spec
  IB/uverbs: Build the specs into a radix tree at runtime
  IB/uverbs: Use uverbs_api to manage the object type inside the uobject
  IB/uverbs: Provide implementation private memory for the
    uverbs_attr_bundle
  IB/uverbs: Remove the ib_uverbs_attr pointer from each attr
  IB/uverbs: Add a simple allocator to uverbs_attr_bundle
  IB/uvrbs: Use uverbs_alloc for allocations
  IB/uverbs: Use uverbs_api to unmarshal ioctl commands
  IB/uverbs: Remove struct uverbs_root_spec and all supporting code
  IB/uverbs: Do not check for device disassociation during ioctl

 drivers/infiniband/core/Makefile              |   5 +-
 drivers/infiniband/core/rdma_core.c           | 142 ++--
 drivers/infiniband/core/rdma_core.h           |  60 +-
 drivers/infiniband/core/uverbs.h              |   2 +-
 drivers/infiniband/core/uverbs_ioctl.c        | 674 ++++++++++--------
 drivers/infiniband/core/uverbs_ioctl_merge.c  | 664 -----------------
 drivers/infiniband/core/uverbs_main.c         |  40 +-
 drivers/infiniband/core/uverbs_std_types.c    |  33 -
 .../core/uverbs_std_types_counters.c          |  20 +-
 drivers/infiniband/core/uverbs_uapi.c         | 353 +++++++++
 drivers/infiniband/hw/mlx5/devx.c             |  83 +--
 drivers/infiniband/hw/mlx5/main.c             |  45 +-
 drivers/infiniband/hw/mlx5/mlx5_ib.h          |   1 +
 include/rdma/ib_verbs.h                       |   4 +-
 include/rdma/uverbs_ioctl.h                   | 301 ++++----
 include/rdma/uverbs_std_types.h               |  30 +-
 include/rdma/uverbs_types.h                   |   9 +-
 17 files changed, 1087 insertions(+), 1379 deletions(-)
 delete mode 100644 drivers/infiniband/core/uverbs_ioctl_merge.c
 create mode 100644 drivers/infiniband/core/uverbs_uapi.c

-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux