Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2123913rwb; Mon, 7 Nov 2022 09:24:08 -0800 (PST) X-Google-Smtp-Source: AMsMyM6VjmJJwjeZVTGvPK4lQxx0ALlLR/QjQq9ez7+BAYi/zo4h+vFiRFKHyLktAcriuDzo56kn X-Received: by 2002:a17:907:62a7:b0:789:48ea:ddb0 with SMTP id nd39-20020a17090762a700b0078948eaddb0mr47062617ejc.575.1667841848255; Mon, 07 Nov 2022 09:24:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667841848; cv=none; d=google.com; s=arc-20160816; b=lbGHyiXOhhufh14Ww/dzhsq/1qA9WXx26QnUKPo5PiwI/ZUHVfN3O7koHY7NlV/k4e 5RNXGlj6uX7+Nd5qYMbSKkqAbDxkaiRO67JcUbIyriIPD1iT/Gy854C1t8nZEw7Vf85s Rl6tsfh9B+VF6dnmVFvYY+a4t8yV7RLUIWUOFkiUyP5iqaU27QevOETbpRM5rMhasmqq +CSjGX6p1CNNlUTGb9+LHCnhwYl/gNE3Zyh3C+cadXMzmmzPFR1HJr/6HlBauq3SuJMq auPBn1g/w6YTQTt9awlx4Dd+9e4hDGiPZaDNhiOFTnLrhpVk08lgqukfO/1fQLiK7dMl YrlA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BgdLKn51MHlz22SyEjHwV09QoO0gl+24rNf4NSfnXOM=; b=JZlbC1wGpkKrSaHed30jxH25Qw13qPlBSFwf3JlwM0u3I9/BrD6Jl91gefiN8aM8u5 imABPTqt508r3POyfSFuaFu6ufWO8jUdQhUYIEBXhFzZQ7ln+1QxOkXJ/ycmynYKnPd8 s8AKDaSBgGB5ku82309QpoOPwO/ukh0G34FfLwQek26mMrjVNA3j7tZgrM6Q2Y3eAy0p sQk92/qiPKeOmYHXO6YyJtM1OwdI5a9ovpxYxCkKwNvzeLcoQjpx6QShiYOIXh1K65IQ 4AbAG+uEkjYrHvsrcO0or947AlZ5DaTD5Y7fkIVH6IO0JTZG+c5dXw8cLS7c+3Z1QUy9 km2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=mlghPPiW; 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 cs10-20020a170906dc8a00b0078bb4d5db86si10255239ejc.77.2022.11.07.09.23.46; Mon, 07 Nov 2022 09:24:08 -0800 (PST) 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=mlghPPiW; 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 S232461AbiKGQZR (ORCPT + 92 others); Mon, 7 Nov 2022 11:25:17 -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> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 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.