From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751484AbdJEGXm (ORCPT ); Thu, 5 Oct 2017 02:23:42 -0400 Received: from home.keithp.com ([63.227.221.253]:43346 "EHLO elaine.keithp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751299AbdJEGXk (ORCPT ); Thu, 5 Oct 2017 02:23:40 -0400 From: "Keith Packard" To: Dave Airlie Cc: LKML , Dave Airlie , Daniel Vetter , dri-devel Subject: Re: [PATCH 6/6] drm: Add four ioctls for managing drm mode object leases [v3] In-Reply-To: References: <20170705222406.28124-1-keithp@keithp.com> <20170705222406.28124-7-keithp@keithp.com> Date: Wed, 04 Oct 2017 23:23:38 -0700 Message-ID: <87bmlm9kph.fsf@keithp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Dave Airlie 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 =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAlnVz+oACgkQ2yIaaQAA ABHP4BAAoS+vTbo7Q3R+6ArqN1D7RAj7PJngBBllH6gpEIpcpXIZMQ8KSRWkSjVV 5Gr01l0mubGusNhHJnGBK3zLMC0cDewkN4S0o7Ob56nTHljq0jbs6oE0Q9I4QvsT KQ2TVktbvrixpoDS9Z5SpESB5yVjbNoLNB46pDa4T5FBMP4hxu44RLPRFfBoVu/f RMHqz4Z9DGT/LMuIZIlEyRZco24/rI4FWz3EdXw5krW6fGvk0rptRmnNKTCL+T5T WA62Mpu7Ks5glDA3Q9Ig4GzgGYx4clw/81n+17FAEjcNMK05w5RAMKd4jAnHq7XF n+t6tQQDdudXh7metF/6RnxjQeTLnmZ1LXbOfGR7dcTlmp5yEcL93KfL1ob15vRJ MqAnp6FX//oUfvN2BmgSIn9tV+T8Vw+RLh/i3KzFUizIgLLNz/nYSNgrOXjlpqN4 YD6YcWUBPzlP7aC4ztN0HIDeeAVo6a/xcPcRr3ITwVgQSk2reGoXSAVfY/X7iMzv ahsijlThd9N66L3SNxtJLErrTMYQPL49Jm1mN/70O2VoStAk+7mS7C8eYR1yu6xN XACozwnkaAhoMBw2letTEXnHux3ATR+uKuCCQVnOpSojBKh8xJfBoD/nGIrjH3Hh MHjV0EuM+HVhh7ZXNPqITeuJ218VMZuP0/PPxyBivXO2+bfKfyM= =nV6S -----END PGP SIGNATURE----- --=-=-=--