[PATCH 6/6] drm: Add four ioctls for managing drm mode object leases [v3]

Keith Packard keithp at keithp.com
Thu Oct 5 06:23:38 UTC 2017


Dave Airlie <airlied at gmail.com> writes:

> I think a comment in here is definitely warranted with what you expect
> from the idr interface here.

I've added a longer comment where this value is used; I tried replacing
the IDR with a sorted array and the result wasn't any easier to use or
understand. I'm pretty sure it would be more efficient, but as leases
contain only a few objects in the cases we're considering, it's hard to
get worked up about performance when the code is larger and mostly not
any easier to understand. Feel free to take a look at that:

        git://people.freedesktop.org/~keithp/linux drm-lease-array

> Because otherwise you could just memdup_user the array of ids, and
> pass that in without the idr stuff.

Yeah, that part was more efficient. The rest of the places using this
data were longer. I guess I could bail on sorting the array, but I fear
someone would come up with a place needing a huge lease list, and then
we'd find performance issues.

Thanks for your review; I've sent out a new series and pushed it to my
repo in the drm-lease-v4 branch

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171004/fc8378b3/attachment.sig>


More information about the dri-devel mailing list