Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp3342598rdb; Tue, 29 Aug 2023 12:15:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFl2I/vZXKFaZtPGARfkM7EWelHElrFBDhXlpYOT/DF/Kn58gvHSrfB/G3eov50gH3i3nZG X-Received: by 2002:aa7:c606:0:b0:527:251e:1be8 with SMTP id h6-20020aa7c606000000b00527251e1be8mr189100edq.13.1693336542460; Tue, 29 Aug 2023 12:15:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693336542; cv=none; d=google.com; s=arc-20160816; b=dmZgoFyz0ZLif6BuvmJIRNBLwG7AUlIwZ510CrMgjTVkpYIPXq/DFAaaaG6O/Jaxrb +Iuor4t/7N0IfBpspbgZlhrj9gxI467A92jiEPY/vLW6azBROIJo+O6REuZkzTCNNjPT E/XxLVCo0hFLW5iidelWZ81dr2r6aQf+WJwPWqXLwt4MFcnUJo4WNbp5cJwXamNAUS54 Z9lkkLMpuqsP6kGGZe2LDjJ7Fa1Fy0Wm5IhVtUa03Cx5+ALlMcxZjOscosSqc07/KqAv ns9r1u2lzilplmTUcO1151QkswjX210bIOm3t0gqEAI0tk4J5FrLOC7RiEaIliBB7kgj AavA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=A0/MJXP1OnWmTMBb5k+hfze8PHPxSXpimewIOMnBllI=; fh=T8CEXdYGyP6mAZ3crOf4V+88SMVgOEhXDqrW7BKrfqc=; b=sYJmV1upnrs6UxSPr1X5YWQuHsgkeKsFtj1YpGvzBEvT6P6aELwc+TxlWpwulWdKoj YCeifGWOULWS2FMymshjBW/00eOH++kp1x4OJs5ZLpWhB0Ztp+I164egyV9F6dpYEqtM KPEsTsvLThwqVw0wsIxSQXfFdm+fZE9cGWapp1zZrwoawJwmOGe/bGn4+X6kEq3HaILC kdl6Zrhkvpucl4C68EfuZ4sTLIExw3Uxjomaj+WNxCW9HqyBJ3dAqVLS188m3y3JCxkd KE/+8X4cyDSX8jLMO8vjiuTU3xJ1hroRxMl5gn/MJErVUfA1XTSKB5DYqM895OLdAq7i 2puA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=UsUba5JY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a3-20020aa7d903000000b0052349404b07si4563439edr.236.2023.08.29.12.15.07; Tue, 29 Aug 2023 12:15:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=UsUba5JY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238187AbjH2Shy (ORCPT + 99 others); Tue, 29 Aug 2023 14:37:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238191AbjH2Sh0 (ORCPT ); Tue, 29 Aug 2023 14:37:26 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEDBD1BE for ; Tue, 29 Aug 2023 11:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=A0/MJXP1OnWmTMBb5k+hfze8PHPxSXpimewIOMnBllI=; b=UsUba5JYR97HMZyAIQFbkj9HK6 GPrchLEU2ydiMjesPkTwHluqA6VPM2tgGG379ew0JGOizACls4k7vvvF2PFQ/ZIQ/YuksG4NuYO+6 k/b5tktzkjZ/goRh80XF9zWb3DNKgDeVUIcJB3Z+qukO/oXoDqt0Ty2Vhd98m77QeM0mjYmWB/p0k N4yecpU1VY+bqoJ0KappXWrlUtnG5qBgUZu31aGz2itU3MIJLdrXTjXD9/jr9GsbZKXtrxmC9BpFL XebH2YN8kM7xTyIVr0RUI4luxFfWzRDkyZB5yecHb3J3e8WiimKi23k56Jamn4x7uRLgQJlOqaOxX WrNbGYiw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qb3aW-008861-3P; Tue, 29 Aug 2023 18:37:16 +0000 Date: Tue, 29 Aug 2023 19:37:16 +0100 From: Matthew Wilcox To: James Zhu Cc: =?utf-8?Q?Micha=C5=82?= Winiarski , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Simon Ser , Oded Gabbay , Christian =?iso-8859-1?Q?K=F6nig?= , James Zhu , Pekka Paalanen , Emil Velikov Subject: Re: [PATCH v6 1/4] drm: Use XArray instead of IDR for minors Message-ID: References: <20230724211428.3831636-1-michal.winiarski@intel.com> <20230724211428.3831636-2-michal.winiarski@intel.com> <10bb9689-9226-d47c-4cf1-7bf9d599456c@amd.com> <6qcxpntlr36itieyoyebsncwdv4vadr5ac7imgl4rdemoyedvp@a3m7l32pkcnf> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 29, 2023 at 02:35:34PM -0400, James Zhu wrote: > > On 2023-08-29 14:33, Matthew Wilcox wrote: > > 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? > [JZ] In case, the future, INIT adds something, need DESTROY to free > completely. That isn't going to happen.