From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 176F8C4332F for ; Mon, 7 Nov 2022 16:25:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232483AbiKGQZS (ORCPT ); Mon, 7 Nov 2022 11:25:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232441AbiKGQYu (ORCPT ); Mon, 7 Nov 2022 11:24:50 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4E522613E for ; Mon, 7 Nov 2022 08:21:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BgdLKn51MHlz22SyEjHwV09QoO0gl+24rNf4NSfnXOM=; b=mlghPPiWpPuGNtAjaxMjLpmTTc v2EFCRL1iFfOoE5yJrG39Am6ii4/G/jCiMqF7lQo/JZFdgNVKa6ODH85ABvTG8dRgquf5sPBjfTfQ r5t/D2c1I8Rioz3M+qX7xNzzTVqU7l/3YttgKyT7+kZ1yCO/oTXuSplgVOabYYNHtVWUrHpLEDleG yd5a2DjsYrJMwA1sbE60s4dMswTOaERUXYed5RJzWv3UMMDGq7CyU6+27JFHH9iXWUy4BmKOz71Sk xZoOST8/HjTOmp2gpPdQWcLsedFFzGBwZmFR3GRW8kXE2SsUSKvWeVgW+K95VEiXLxLtjV1ej6sTu ic5sB9sQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1os4sP-009Ut4-Uj; Mon, 07 Nov 2022 16:21:33 +0000 Date: Mon, 7 Nov 2022 16:21:33 +0000 From: Matthew Wilcox To: Jeffrey Hugo Cc: Oded Gabbay , David Airlie , Daniel Vetter , Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jason Gunthorpe , John Hubbard , Alex Deucher , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Yuji Ishikawa , Jiho Chu , Daniel Stone , Tvrtko Ursulin , Christoph Hellwig , Kevin Hilman , Jagan Teki , Jacek Lawrynowicz , Maciej Kwapulinski , Stanislaw Gruszka , Randy Dunlap Subject: Re: [RFC PATCH v3 0/3] new subsystem for compute accelerator devices Message-ID: References: <20221106210225.2065371-1-ogabbay@kernel.org> <6f756dec-b386-a822-5f52-c121c00525b4@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6f756dec-b386-a822-5f52-c121c00525b4@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 07, 2022 at 09:07:28AM -0700, Jeffrey Hugo wrote: > > Another important change is that I have reverted back to use IDR for minor > > handling instead of xarray. This is because I have found that xarray doesn't > > handle well the scenario where you allocate a NULL entry and then exchange it > > with a real pointer. It appears xarray still considers that entry a "zero" > > entry. This is unfortunate because DRM works that way (first allocates a NULL > > entry and then replaces the entry with a real pointer). > > > > I decided to revert to IDR because I don't want to hold up these patches, > > as many people are blocked until the support for accel is merged. The xarray > > issue should be fixed as a separate patch by either fixing the xarray code or > > changing how DRM + ACCEL do minor id handling. > > This sounds sane to me. However, this appears to be something that Matthew > Wilcox should be aware of (added for visibility). Perhaps he has a very > quick solution. If not, at-least he might have ideas on how to best address > in the future. Thanks for cc'ing me. I wasn't aware of this problem because I hadn't seen Oded's email yet. The "problem" is simply a mis-use of the API.