All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Keith Packard" <keithp@keithp.com>
To: Dave Airlie <airlied@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Dave Airlie <airlied@redhat.com>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 6/6] drm: Add four ioctls for managing drm mode object leases [v3]
Date: Wed, 04 Oct 2017 23:23:38 -0700	[thread overview]
Message-ID: <87bmlm9kph.fsf@keithp.com> (raw)
In-Reply-To: <CAPM=9ty1ofbZsripB7YO05vhf8qUpad_kdvaD+O6UCvFre=XXg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

Dave Airlie <airlied@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: "Keith Packard" <keithp@keithp.com>
To: Dave Airlie <airlied@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6/6] drm: Add four ioctls for managing drm mode object leases [v3]
Date: Wed, 04 Oct 2017 23:23:38 -0700	[thread overview]
Message-ID: <87bmlm9kph.fsf@keithp.com> (raw)
In-Reply-To: <CAPM=9ty1ofbZsripB7YO05vhf8qUpad_kdvaD+O6UCvFre=XXg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1125 bytes --]

Dave Airlie <airlied@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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-10-05  6:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05 22:24 [PATCH 0/6] drm: Add mode object leases [v3] Keith Packard
2017-07-05 22:24 ` Keith Packard
2017-07-05 22:24 ` [PATCH 1/6] drm: Pass struct drm_file * to __drm_mode_object_find Keith Packard
2017-07-05 22:24   ` Keith Packard
2017-07-05 22:24 ` [PATCH 2/6] drm: Allow render nodes to query display objects Keith Packard
2017-07-05 22:24   ` Keith Packard
2017-07-05 22:24 ` [PATCH 3/6] drm: Add new LEASE debug level Keith Packard
2017-07-05 22:24   ` Keith Packard
2017-07-05 22:24 ` [PATCH 4/6] drm: Add drm_object lease infrastructure [v3] Keith Packard
2017-10-05  3:55   ` Dave Airlie
2017-10-05  3:55     ` Dave Airlie
2017-07-05 22:24 ` [PATCH 5/6] drm: Check mode object lease status in all master ioctl paths [v2] Keith Packard
2017-07-05 22:24   ` Keith Packard
2017-07-05 22:24 ` [PATCH 6/6] drm: Add four ioctls for managing drm mode object leases [v3] Keith Packard
2017-07-05 22:24   ` Keith Packard
2017-07-06  0:42   ` Dave Airlie
2017-07-06  0:42     ` Dave Airlie
2017-07-06  3:38     ` Keith Packard
2017-07-06  3:38       ` Keith Packard
2017-10-05  3:17   ` Dave Airlie
2017-10-05  3:24     ` Dave Airlie
2017-10-05  3:24       ` Dave Airlie
2017-10-05  3:37       ` Dave Airlie
2017-10-05  3:37         ` Dave Airlie
2017-10-05  6:23         ` Keith Packard [this message]
2017-10-05  6:23           ` Keith Packard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bmlm9kph.fsf@keithp.com \
    --to=keithp@keithp.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.