On Thu, Aug 09, 2018 at 08:14:34PM -0600, Jason Gunthorpe wrote: > 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. > > v1: > - For loop bug fig from Leon > - Missing check in lookup_get_fd_uobject from Leon > - Use rcu_assign_pointer when setting handler for sparse, from Leon > - Dead code from Michael > - Various comment and commit message edits > > More testing has shown that the prior series introduced a bug related to > module unload of drivers when working with the mlx5 driver specific > objects. This series is needed to fix that bug, so I would like to apply it on > Friday. > > 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/uverbs: 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 applied to for-next Jason