[PATCH v6 1/4] drm: Use XArray instead of IDR for minors

Matthew Wilcox willy at infradead.org
Tue Aug 29 18:33:26 UTC 2023


On Tue, Aug 29, 2023 at 01:34:22PM -0400, James Zhu wrote:
> > > > @@ -1067,7 +1055,7 @@ static void drm_core_exit(void)
> > > >    	unregister_chrdev(DRM_MAJOR, "drm");
> > > >    	debugfs_remove(drm_debugfs_root);
> > > >    	drm_sysfs_destroy();
> > > > -	idr_destroy(&drm_minors_idr);
> > > [JZ] Should we call xa_destroy instead here?
> > We could, if we expect the xarray to potentially not be empty.
> >  From what I understand - all minors should be released at this point.
> [JZ] In practice,  adding destroy here will be better.

Why do you say that?


More information about the dri-devel mailing list