Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-06 Thread Tejun Heo
Hello, Daniel. On Fri, Sep 06, 2019 at 05:36:02PM +0200, Daniel Vetter wrote: > Block devices are a great example I think. How do you handle the > partitions on that? For drm we also have a main minor interface, and cgroup IO controllers only distribute hardware IO capacity and are blind to

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-06 Thread Daniel Vetter
On Fri, Sep 6, 2019 at 5:29 PM Tejun Heo wrote: > > Hello, > > On Wed, Sep 04, 2019 at 10:54:34AM +0200, Daniel Vetter wrote: > > Anyway, I don't think reusing the drm_minor registration makes sense, > > since we want to be on the drm_device, not on the minor. Which is a bit > > awkward for

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-06 Thread Tejun Heo
Hello, On Wed, Sep 04, 2019 at 10:54:34AM +0200, Daniel Vetter wrote: > Anyway, I don't think reusing the drm_minor registration makes sense, > since we want to be on the drm_device, not on the minor. Which is a bit > awkward for cgroups, which wants to identify devices using major.minor > pairs.

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-06 Thread Daniel Vetter
On Thu, Sep 05, 2019 at 05:26:08PM -0400, Kenny Ho wrote: > On Thu, Sep 5, 2019 at 4:32 PM Daniel Vetter wrote: > > > *snip* > > drm_dev_unregister gets called on hotunplug, so your cgroup-internal > > tracking won't get out of sync any more than the drm_minor list gets > > out of sync with

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-05 Thread Kenny Ho
On Thu, Sep 5, 2019 at 4:32 PM Daniel Vetter wrote: > *snip* > drm_dev_unregister gets called on hotunplug, so your cgroup-internal > tracking won't get out of sync any more than the drm_minor list gets > out of sync with drm_devices. The trouble with drm_minor is just that > cgroup doesn't track

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-05 Thread Daniel Vetter
On Thu, Sep 5, 2019 at 10:21 PM Kenny Ho wrote: > > On Thu, Sep 5, 2019 at 4:06 PM Daniel Vetter wrote: > > > > On Thu, Sep 5, 2019 at 8:28 PM Kenny Ho wrote: > > > > > > (resent in plain text mode) > > > > > > Hi Daniel, > > > > > > This is the previous patch relevant to this discussion: > > >

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-05 Thread Kenny Ho
On Thu, Sep 5, 2019 at 4:06 PM Daniel Vetter wrote: > > On Thu, Sep 5, 2019 at 8:28 PM Kenny Ho wrote: > > > > (resent in plain text mode) > > > > Hi Daniel, > > > > This is the previous patch relevant to this discussion: > > https://patchwork.freedesktop.org/patch/314343/ > > Ah yes, thanks for

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-05 Thread Daniel Vetter
On Thu, Sep 5, 2019 at 8:28 PM Kenny Ho wrote: > > (resent in plain text mode) > > Hi Daniel, > > This is the previous patch relevant to this discussion: > https://patchwork.freedesktop.org/patch/314343/ Ah yes, thanks for finding that. > So before I refactored the code to leverage drm_minor, I

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-05 Thread Kenny Ho
(resent in plain text mode) Hi Daniel, This is the previous patch relevant to this discussion: https://patchwork.freedesktop.org/patch/314343/ So before I refactored the code to leverage drm_minor, I kept my own list of "known" drm_device inside the controller and have explicit register and

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-05 Thread Kenny Ho
Hi Daniel, This is the previous patch relevant to this discussion: https://patchwork.freedesktop.org/patch/314343/ So before I refactored the code to leverage drm_minor, I kept my own list of "known" drm_device inside the controller and have explicit register and unregister function to init per

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-04 Thread Daniel Vetter
On Tue, Sep 03, 2019 at 04:43:45PM -0400, Kenny Ho wrote: > On Tue, Sep 3, 2019 at 4:12 PM Daniel Vetter wrote: > > On Tue, Sep 3, 2019 at 9:45 PM Kenny Ho wrote: > > > On Tue, Sep 3, 2019 at 3:57 AM Daniel Vetter wrote: > > > > Iterating over minors for cgroups sounds very, very wrong. Why do

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-03 Thread Kenny Ho
On Tue, Sep 3, 2019 at 4:12 PM Daniel Vetter wrote: > On Tue, Sep 3, 2019 at 9:45 PM Kenny Ho wrote: > > On Tue, Sep 3, 2019 at 3:57 AM Daniel Vetter wrote: > > > Iterating over minors for cgroups sounds very, very wrong. Why do we care > > > whether a buffer was allocated through kms dumb vs

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-03 Thread Daniel Vetter
On Tue, Sep 3, 2019 at 9:45 PM Kenny Ho wrote: > > On Tue, Sep 3, 2019 at 3:57 AM Daniel Vetter wrote: > > > > On Thu, Aug 29, 2019 at 02:05:18AM -0400, Kenny Ho wrote: > > > To allow other subsystems to iterate through all stored DRM minors and > > > act upon them. > > > > > > Also exposes

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-03 Thread Kenny Ho
On Tue, Sep 3, 2019 at 3:57 AM Daniel Vetter wrote: > > On Thu, Aug 29, 2019 at 02:05:18AM -0400, Kenny Ho wrote: > > To allow other subsystems to iterate through all stored DRM minors and > > act upon them. > > > > Also exposes drm_minor_acquire and drm_minor_release for other subsystem > > to

Re: [PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-09-03 Thread Daniel Vetter
On Thu, Aug 29, 2019 at 02:05:18AM -0400, Kenny Ho wrote: > To allow other subsystems to iterate through all stored DRM minors and > act upon them. > > Also exposes drm_minor_acquire and drm_minor_release for other subsystem > to handle drm_minor. DRM cgroup controller is the initial consumer of

[PATCH RFC v4 01/16] drm: Add drm_minor_for_each

2019-08-29 Thread Kenny Ho
To allow other subsystems to iterate through all stored DRM minors and act upon them. Also exposes drm_minor_acquire and drm_minor_release for other subsystem to handle drm_minor. DRM cgroup controller is the initial consumer of this new features. Change-Id: