mbox series

[v6,0/4] drm: Use full allocated minor range for DRM

Message ID 20230724211428.3831636-1-michal.winiarski@intel.com (mailing list archive)
Headers show
Series drm: Use full allocated minor range for DRM | expand

Message

Michał Winiarski July 24, 2023, 9:14 p.m. UTC
64 DRM device nodes is not enough for everyone.
Upgrade it to ~512K (which definitely is more than enough).

To allow testing userspace support for >64 devices, add additional DRM
modparam (force_extended_minors) which causes DRM to skip allocating minors
in 0-192 range.
Additionally - convert minors to use XArray instead of IDR to simplify the
locking.

v1 -> v2:
Don't touch DRM_MINOR_CONTROL and its range (Simon Ser)

v2 -> v3:
Don't use legacy scheme for >=192 minor range (Dave Airlie)
Add modparam for testing (Dave Airlie)
Add lockdep annotation for IDR (Daniel Vetter)

v3 -> v4:
Convert from IDR to XArray (Matthew Wilcox)

v4 -> v5:
Fixup IDR to XArray conversion (Matthew Wilcox)

v5 -> v6:
Also convert Accel to XArray
Rename skip_legacy_minors to force_extended_minors

Michał Winiarski (4):
  drm: Use XArray instead of IDR for minors
  accel: Use XArray instead of IDR for minors
  drm: Expand max DRM device number to full MINORBITS
  drm: Introduce force_extended_minors modparam

 drivers/accel/drm_accel.c      | 110 +++------------------------------
 drivers/gpu/drm/drm_drv.c      | 105 ++++++++++++++++---------------
 drivers/gpu/drm/drm_file.c     |   2 +-
 drivers/gpu/drm/drm_internal.h |   4 --
 include/drm/drm_accel.h        |  18 +-----
 include/drm/drm_file.h         |   5 ++
 6 files changed, 69 insertions(+), 175 deletions(-)

Comments

James Zhu Aug. 30, 2023, 4:31 p.m. UTC | #1
PATCH 1 and 3 are

Tested-by:JamesZhu<James.Zhu@amd.com>

Best Regards!

James Zhu

On 2023-07-24 17:14, Michał Winiarski wrote:
> 64 DRM device nodes is not enough for everyone.
> Upgrade it to ~512K (which definitely is more than enough).
>
> To allow testing userspace support for >64 devices, add additional DRM
> modparam (force_extended_minors) which causes DRM to skip allocating minors
> in 0-192 range.
> Additionally - convert minors to use XArray instead of IDR to simplify the
> locking.
>
> v1 -> v2:
> Don't touch DRM_MINOR_CONTROL and its range (Simon Ser)
>
> v2 -> v3:
> Don't use legacy scheme for >=192 minor range (Dave Airlie)
> Add modparam for testing (Dave Airlie)
> Add lockdep annotation for IDR (Daniel Vetter)
>
> v3 -> v4:
> Convert from IDR to XArray (Matthew Wilcox)
>
> v4 -> v5:
> Fixup IDR to XArray conversion (Matthew Wilcox)
>
> v5 -> v6:
> Also convert Accel to XArray
> Rename skip_legacy_minors to force_extended_minors
>
> Michał Winiarski (4):
>    drm: Use XArray instead of IDR for minors
>    accel: Use XArray instead of IDR for minors
>    drm: Expand max DRM device number to full MINORBITS
>    drm: Introduce force_extended_minors modparam
>
>   drivers/accel/drm_accel.c      | 110 +++------------------------------
>   drivers/gpu/drm/drm_drv.c      | 105 ++++++++++++++++---------------
>   drivers/gpu/drm/drm_file.c     |   2 +-
>   drivers/gpu/drm/drm_internal.h |   4 --
>   include/drm/drm_accel.h        |  18 +-----
>   include/drm/drm_file.h         |   5 ++
>   6 files changed, 69 insertions(+), 175 deletions(-)
>
Eric Pilmore May 3, 2024, 1:22 a.m. UTC | #2
> On Jul 24, 2023, at 2:14 PM, Michał Winiarski <michal.winiarski@intel.com> wrote:
> 
> 64 DRM device nodes is not enough for everyone.
> Upgrade it to ~512K (which definitely is more than enough).
> 
> To allow testing userspace support for >64 devices, add additional DRM
> modparam (force_extended_minors) which causes DRM to skip allocating minors
> in 0-192 range.
> Additionally - convert minors to use XArray instead of IDR to simplify the
> locking.
> 
> v1 -> v2:
> Don't touch DRM_MINOR_CONTROL and its range (Simon Ser)
> 
> v2 -> v3:
> Don't use legacy scheme for >=192 minor range (Dave Airlie)
> Add modparam for testing (Dave Airlie)
> Add lockdep annotation for IDR (Daniel Vetter)
> 
> v3 -> v4:
> Convert from IDR to XArray (Matthew Wilcox)
> 
> v4 -> v5:
> Fixup IDR to XArray conversion (Matthew Wilcox)
> 
> v5 -> v6:
> Also convert Accel to XArray
> Rename skip_legacy_minors to force_extended_minors
> 
> Michał Winiarski (4):
>  drm: Use XArray instead of IDR for minors
>  accel: Use XArray instead of IDR for minors
>  drm: Expand max DRM device number to full MINORBITS
>  drm: Introduce force_extended_minors modparam
> 
> drivers/accel/drm_accel.c      | 110 +++------------------------------
> drivers/gpu/drm/drm_drv.c      | 105 ++++++++++++++++---------------
> drivers/gpu/drm/drm_file.c     |   2 +-
> drivers/gpu/drm/drm_internal.h |   4 --
> include/drm/drm_accel.h        |  18 +-----
> include/drm/drm_file.h         |   5 ++
> 6 files changed, 69 insertions(+), 175 deletions(-)
> 
> -- 
> 2.41.0
> 


Hi Michal,

What is the status on this patch? Did it ever get accepted upstream?
If so, what release? I don’t see the changes in the latest Linux kernel.
I am working on a system that involves a large number of GPUs, where
each GPU consumes a number of DRM devices. As such, I’m easily
exceeding the current limit of 64 in the (6.6) kernel. To workaround this issue,
I have temporarily picked up this patch which is doing the trick, but now
I’m wondering if this patch has seen the light of day in the Linux kernel.

Thanks for any info!

Regards,
Eric
Alex Deucher Aug. 12, 2024, 5:38 p.m. UTC | #3
Are there any objections to this series?  We have been running into
this limit as a problem for a while now on big servers.

Alex

On Mon, Jul 24, 2023 at 5:15 PM Michał Winiarski
<michal.winiarski@intel.com> wrote:
>
> 64 DRM device nodes is not enough for everyone.
> Upgrade it to ~512K (which definitely is more than enough).
>
> To allow testing userspace support for >64 devices, add additional DRM
> modparam (force_extended_minors) which causes DRM to skip allocating minors
> in 0-192 range.
> Additionally - convert minors to use XArray instead of IDR to simplify the
> locking.
>
> v1 -> v2:
> Don't touch DRM_MINOR_CONTROL and its range (Simon Ser)
>
> v2 -> v3:
> Don't use legacy scheme for >=192 minor range (Dave Airlie)
> Add modparam for testing (Dave Airlie)
> Add lockdep annotation for IDR (Daniel Vetter)
>
> v3 -> v4:
> Convert from IDR to XArray (Matthew Wilcox)
>
> v4 -> v5:
> Fixup IDR to XArray conversion (Matthew Wilcox)
>
> v5 -> v6:
> Also convert Accel to XArray
> Rename skip_legacy_minors to force_extended_minors
>
> Michał Winiarski (4):
>   drm: Use XArray instead of IDR for minors
>   accel: Use XArray instead of IDR for minors
>   drm: Expand max DRM device number to full MINORBITS
>   drm: Introduce force_extended_minors modparam
>
>  drivers/accel/drm_accel.c      | 110 +++------------------------------
>  drivers/gpu/drm/drm_drv.c      | 105 ++++++++++++++++---------------
>  drivers/gpu/drm/drm_file.c     |   2 +-
>  drivers/gpu/drm/drm_internal.h |   4 --
>  include/drm/drm_accel.h        |  18 +-----
>  include/drm/drm_file.h         |   5 ++
>  6 files changed, 69 insertions(+), 175 deletions(-)
>
> --
> 2.41.0
>
Michał Winiarski Aug. 14, 2024, 12:18 a.m. UTC | #4
On Mon, Aug 12, 2024 at 01:38:38PM GMT, Alex Deucher wrote:
> Are there any objections to this series?  We have been running into
> this limit as a problem for a while now on big servers.

I don't think there were any objections, just a general lack of
interest - so there are no R-b / Acks.
If you're interested to have a go at it - I can resend it.
It should still apply on latest drm-tip.

-Michał

> 
> Alex
> 
> On Mon, Jul 24, 2023 at 5:15 PM Michał Winiarski
> <michal.winiarski@intel.com> wrote:
> >
> > 64 DRM device nodes is not enough for everyone.
> > Upgrade it to ~512K (which definitely is more than enough).
> >
> > To allow testing userspace support for >64 devices, add additional DRM
> > modparam (force_extended_minors) which causes DRM to skip allocating minors
> > in 0-192 range.
> > Additionally - convert minors to use XArray instead of IDR to simplify the
> > locking.
> >
> > v1 -> v2:
> > Don't touch DRM_MINOR_CONTROL and its range (Simon Ser)
> >
> > v2 -> v3:
> > Don't use legacy scheme for >=192 minor range (Dave Airlie)
> > Add modparam for testing (Dave Airlie)
> > Add lockdep annotation for IDR (Daniel Vetter)
> >
> > v3 -> v4:
> > Convert from IDR to XArray (Matthew Wilcox)
> >
> > v4 -> v5:
> > Fixup IDR to XArray conversion (Matthew Wilcox)
> >
> > v5 -> v6:
> > Also convert Accel to XArray
> > Rename skip_legacy_minors to force_extended_minors
> >
> > Michał Winiarski (4):
> >   drm: Use XArray instead of IDR for minors
> >   accel: Use XArray instead of IDR for minors
> >   drm: Expand max DRM device number to full MINORBITS
> >   drm: Introduce force_extended_minors modparam
> >
> >  drivers/accel/drm_accel.c      | 110 +++------------------------------
> >  drivers/gpu/drm/drm_drv.c      | 105 ++++++++++++++++---------------
> >  drivers/gpu/drm/drm_file.c     |   2 +-
> >  drivers/gpu/drm/drm_internal.h |   4 --
> >  include/drm/drm_accel.h        |  18 +-----
> >  include/drm/drm_file.h         |   5 ++
> >  6 files changed, 69 insertions(+), 175 deletions(-)
> >
> > --
> > 2.41.0
> >
James Zhu Aug. 14, 2024, 4:16 a.m. UTC | #5
Hi Michal

I did give Tested-by before. If you need Acks, Here I can give

Acked-by:JamesZhu<James.Zhu@amd.com>fortheseries

Best Regards!

James

On 2024-08-13 20:18, Michał Winiarski wrote:
> On Mon, Aug 12, 2024 at 01:38:38PM GMT, Alex Deucher wrote:
>> Are there any objections to this series?  We have been running into
>> this limit as a problem for a while now on big servers.
> I don't think there were any objections, just a general lack of
> interest - so there are no R-b / Acks.
> If you're interested to have a go at it - I can resend it.
> It should still apply on latest drm-tip.
>
> -Michał
>
>> Alex
>>
>> On Mon, Jul 24, 2023 at 5:15 PM Michał Winiarski
>> <michal.winiarski@intel.com>  wrote:
>>> 64 DRM device nodes is not enough for everyone.
>>> Upgrade it to ~512K (which definitely is more than enough).
>>>
>>> To allow testing userspace support for >64 devices, add additional DRM
>>> modparam (force_extended_minors) which causes DRM to skip allocating minors
>>> in 0-192 range.
>>> Additionally - convert minors to use XArray instead of IDR to simplify the
>>> locking.
>>>
>>> v1 -> v2:
>>> Don't touch DRM_MINOR_CONTROL and its range (Simon Ser)
>>>
>>> v2 -> v3:
>>> Don't use legacy scheme for >=192 minor range (Dave Airlie)
>>> Add modparam for testing (Dave Airlie)
>>> Add lockdep annotation for IDR (Daniel Vetter)
>>>
>>> v3 -> v4:
>>> Convert from IDR to XArray (Matthew Wilcox)
>>>
>>> v4 -> v5:
>>> Fixup IDR to XArray conversion (Matthew Wilcox)
>>>
>>> v5 -> v6:
>>> Also convert Accel to XArray
>>> Rename skip_legacy_minors to force_extended_minors
>>>
>>> Michał Winiarski (4):
>>>    drm: Use XArray instead of IDR for minors
>>>    accel: Use XArray instead of IDR for minors
>>>    drm: Expand max DRM device number to full MINORBITS
>>>    drm: Introduce force_extended_minors modparam
>>>
>>>   drivers/accel/drm_accel.c      | 110 +++------------------------------
>>>   drivers/gpu/drm/drm_drv.c      | 105 ++++++++++++++++---------------
>>>   drivers/gpu/drm/drm_file.c     |   2 +-
>>>   drivers/gpu/drm/drm_internal.h |   4 --
>>>   include/drm/drm_accel.h        |  18 +-----
>>>   include/drm/drm_file.h         |   5 ++
>>>   6 files changed, 69 insertions(+), 175 deletions(-)
>>>
>>> --
>>> 2.41.0
>>>
James Zhu Aug. 14, 2024, 4:20 a.m. UTC | #6
Hi Michal

I did give Tested-by before. If you need Acks, Here  I can give
Acked-by: James Zhu <James.Zhu@amd.com> for the series

Best Regards!

James

On 2024-08-13 20:18, Michał Winiarski wrote:
> On Mon, Aug 12, 2024 at 01:38:38PM GMT, Alex Deucher wrote:
>> Are there any objections to this series?  We have been running into
>> this limit as a problem for a while now on big servers.
> I don't think there were any objections, just a general lack of
> interest - so there are no R-b / Acks.
> If you're interested to have a go at it - I can resend it.
> It should still apply on latest drm-tip.
>
> -Michał
>
>> Alex
>>
>> On Mon, Jul 24, 2023 at 5:15 PM Michał Winiarski
>> <michal.winiarski@intel.com> wrote:
>>> 64 DRM device nodes is not enough for everyone.
>>> Upgrade it to ~512K (which definitely is more than enough).
>>>
>>> To allow testing userspace support for >64 devices, add additional DRM
>>> modparam (force_extended_minors) which causes DRM to skip allocating minors
>>> in 0-192 range.
>>> Additionally - convert minors to use XArray instead of IDR to simplify the
>>> locking.
>>>
>>> v1 -> v2:
>>> Don't touch DRM_MINOR_CONTROL and its range (Simon Ser)
>>>
>>> v2 -> v3:
>>> Don't use legacy scheme for >=192 minor range (Dave Airlie)
>>> Add modparam for testing (Dave Airlie)
>>> Add lockdep annotation for IDR (Daniel Vetter)
>>>
>>> v3 -> v4:
>>> Convert from IDR to XArray (Matthew Wilcox)
>>>
>>> v4 -> v5:
>>> Fixup IDR to XArray conversion (Matthew Wilcox)
>>>
>>> v5 -> v6:
>>> Also convert Accel to XArray
>>> Rename skip_legacy_minors to force_extended_minors
>>>
>>> Michał Winiarski (4):
>>>    drm: Use XArray instead of IDR for minors
>>>    accel: Use XArray instead of IDR for minors
>>>    drm: Expand max DRM device number to full MINORBITS
>>>    drm: Introduce force_extended_minors modparam
>>>
>>>   drivers/accel/drm_accel.c      | 110 +++------------------------------
>>>   drivers/gpu/drm/drm_drv.c      | 105 ++++++++++++++++---------------
>>>   drivers/gpu/drm/drm_file.c     |   2 +-
>>>   drivers/gpu/drm/drm_internal.h |   4 --
>>>   include/drm/drm_accel.h        |  18 +-----
>>>   include/drm/drm_file.h         |   5 ++
>>>   6 files changed, 69 insertions(+), 175 deletions(-)
>>>
>>> --
>>> 2.41.0
>>>
Alex Deucher Aug. 14, 2024, 7:29 p.m. UTC | #7
On Tue, Aug 13, 2024 at 8:19 PM Michał Winiarski
<michal.winiarski@intel.com> wrote:
>
> On Mon, Aug 12, 2024 at 01:38:38PM GMT, Alex Deucher wrote:
> > Are there any objections to this series?  We have been running into
> > this limit as a problem for a while now on big servers.
>
> I don't think there were any objections, just a general lack of
> interest - so there are no R-b / Acks.
> If you're interested to have a go at it - I can resend it.
> It should still apply on latest drm-tip.

Yeah that would be great!

Thanks,

Alex

>
> -Michał
>
> >
> > Alex
> >
> > On Mon, Jul 24, 2023 at 5:15 PM Michał Winiarski
> > <michal.winiarski@intel.com> wrote:
> > >
> > > 64 DRM device nodes is not enough for everyone.
> > > Upgrade it to ~512K (which definitely is more than enough).
> > >
> > > To allow testing userspace support for >64 devices, add additional DRM
> > > modparam (force_extended_minors) which causes DRM to skip allocating minors
> > > in 0-192 range.
> > > Additionally - convert minors to use XArray instead of IDR to simplify the
> > > locking.
> > >
> > > v1 -> v2:
> > > Don't touch DRM_MINOR_CONTROL and its range (Simon Ser)
> > >
> > > v2 -> v3:
> > > Don't use legacy scheme for >=192 minor range (Dave Airlie)
> > > Add modparam for testing (Dave Airlie)
> > > Add lockdep annotation for IDR (Daniel Vetter)
> > >
> > > v3 -> v4:
> > > Convert from IDR to XArray (Matthew Wilcox)
> > >
> > > v4 -> v5:
> > > Fixup IDR to XArray conversion (Matthew Wilcox)
> > >
> > > v5 -> v6:
> > > Also convert Accel to XArray
> > > Rename skip_legacy_minors to force_extended_minors
> > >
> > > Michał Winiarski (4):
> > >   drm: Use XArray instead of IDR for minors
> > >   accel: Use XArray instead of IDR for minors
> > >   drm: Expand max DRM device number to full MINORBITS
> > >   drm: Introduce force_extended_minors modparam
> > >
> > >  drivers/accel/drm_accel.c      | 110 +++------------------------------
> > >  drivers/gpu/drm/drm_drv.c      | 105 ++++++++++++++++---------------
> > >  drivers/gpu/drm/drm_file.c     |   2 +-
> > >  drivers/gpu/drm/drm_internal.h |   4 --
> > >  include/drm/drm_accel.h        |  18 +-----
> > >  include/drm/drm_file.h         |   5 ++
> > >  6 files changed, 69 insertions(+), 175 deletions(-)
> > >
> > > --
> > > 2.41.0
> > >