Dave Airlie <airlied@xxxxxxxxx> 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
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel