Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp210348rdg; Thu, 12 Oct 2023 03:33:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/mZ18JTTvg+CIR+bPkAvX0YRedKZFqlb2wk5PYmsMzRJyOu60Otw6MqNYSpUgXNvBJPx5 X-Received: by 2002:a05:6a00:988:b0:690:c887:8cd8 with SMTP id u8-20020a056a00098800b00690c8878cd8mr27474450pfg.32.1697106821209; Thu, 12 Oct 2023 03:33:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697106821; cv=none; d=google.com; s=arc-20160816; b=gufCk2ybA2Mp4CCKurYW13FjiwOxcaV5b3Y2ZSADF1mfLJn1JwD7p7BZcmF2SdTT9V QDkQ51M6ieg+rI2OZ6ZDQyptWbYJC7k6OjEmgy89pGGVQZvrK4cPEWRPhxrTU6xO+vej DKJpDWlvcucGx6nYGJJlncWyyKItWUcUVOQUG9o9KN1d29IJJLdnCdV8a8mHeuGiZi8h m06oGNt/7rAnQTLpdQVrfUvMHMUUxYYvbwnqtCUi68Xgt/gWKtZkiHqJE8IWTJKgLN5B whv3tfBWitdUDbzkA6ExZSWZfid07MsdSIT3iTmTYZqLrXw3QW8UtoZHC2c/fUTYhRut 88mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+trYhH6pdvjtTzpwC/GNcRs1Ixqq8ebN0gecPy8EoRE=; fh=3dckAuhNC9r+P3WxYX92DaH5ySMHLR57OHdbApDABoY=; b=yHM1xeHQR0JFIYPurgvk4E2vizHTA1q33avFy2h+UFxdonJ2VtVrEkLGa8T+pjuVUO D4Pz+PUjRo7QaGoJqmT8Nqrml19+JO8DMlD+HojwQPSnYE9shYfwpZx4TqkC7/+zAlSe NRJVBjwsmMr0xa8EovN/aq+oeEPM/rGFm2J+nJvvF+ibMjiCEJ7c4TzQq4m91KJwItA2 Ogcf/TZmPrwEKAKUHElBa+siZ/nbbGGUMDHSPA+8FUayLNTksoMj8QU2dnVWp+nN+AoS LRUTfb4DLNzxdZ1Zd5e+nlEj0IaWIzmYNvcV783gn3EOv7mzhXzro2rUM6TDpKRhPzlA hH9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=S5WNP29L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h9-20020a056a00230900b00690ce34a02bsi14389491pfh.224.2023.10.12.03.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 03:33:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=S5WNP29L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1AE27821ADA7; Thu, 12 Oct 2023 03:33:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377813AbjJLKdb (ORCPT + 99 others); Thu, 12 Oct 2023 06:33:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377651AbjJLKd3 (ORCPT ); Thu, 12 Oct 2023 06:33:29 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 791E1B7 for ; Thu, 12 Oct 2023 03:33:27 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9ba081173a3so132727366b.1 for ; Thu, 12 Oct 2023 03:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697106806; x=1697711606; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+trYhH6pdvjtTzpwC/GNcRs1Ixqq8ebN0gecPy8EoRE=; b=S5WNP29LFGtZvS+T7bFNweVOsMtA4mcF1waPNwO69s7r7oQWvuVA9Jx2Kd2FcqF+XS R9Clxu4rUt9m9YlhIqgYUTEijaFVXC26VK66hQaqfwQsJ/bIDqwYO9il21mt+tSmzJ3X LH1WiUK71p98w7uyZCowDQ1mnYoVmzTVO8xNA3UUclAbFbgLNgzOMmmofRqqhTEnl6c+ zQM//QWRMbW82ubCYXEMfaFR2NWfTiZXMzGeMkEdJ7FkSox6Oo+u3G1zGp1g5izf8QRO s4cubwYSBVZwJuCvq3dM1D1Q3Rg+47S9OulN5L4VVkRoiJBXDrzzL/fjuNO1xs7AfSxL YGmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697106806; x=1697711606; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+trYhH6pdvjtTzpwC/GNcRs1Ixqq8ebN0gecPy8EoRE=; b=hfLOVXmlMX1IUxoJDGrz0W7sMYi5MkNFo1wX8I6J5l1tbYurZ7Omqg0qUy9QHfkQN5 qjAkFKi8pid+H9094FXFfK3eVdNBVAP76YzGevdwaqmrplIg1nk5AiLkDckUnNv77sjO oGG7OlbDGRL5IVut32/cBl4BLPShvxFbpri9uTQPaGKRYzyeaPaHQcO91HTpJZh2LksU WZpj/zvlnS8fjdLe088/erB91LLTlJqXrTr1ShXHhMcHuKkcFhyUFiL+qABR+jx26rux C0Umj0DS1E8DRmb8VkJaWHP2TPEGkDmsTygQXeF2biFIBBuPw19e9t1/OGiKI2dJOwK2 mSvQ== X-Gm-Message-State: AOJu0YwppGGURUKP+jOfj0Ek4Ysf7sxlxs97hCqJoSIEYHZXUor/nboY dIq2Heqx/iVaZOebOPNjvph4APUFP2RZ96dyvyM= X-Received: by 2002:a17:906:8b:b0:9b2:bb02:a543 with SMTP id 11-20020a170906008b00b009b2bb02a543mr23857083ejc.74.1697106805715; Thu, 12 Oct 2023 03:33:25 -0700 (PDT) MIME-Version: 1.0 References: <20230820215320.4187-1-dakr@redhat.com> <20230820215320.4187-3-dakr@redhat.com> <0c50ff22-0f11-1e27-c32e-694ce2b1e6c5@shipmail.org> <88c45fe6-0942-707c-9ea7-8486c177fcd7@shipmail.org> <736b6b6d-9e04-a27d-7d60-0c45d696b304@shipmail.org> <8a8253ae-0b85-df90-b480-64eeebfafc6d@shipmail.org> <76963abd-77a1-4bbd-9537-7b230e648a90@amd.com> In-Reply-To: <76963abd-77a1-4bbd-9537-7b230e648a90@amd.com> From: Dave Airlie Date: Thu, 12 Oct 2023 20:33:13 +1000 Message-ID: Subject: Re: [PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation To: =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: =?UTF-8?Q?Thomas_Hellstr=C3=B6m_=28Intel=29?= , Danilo Krummrich , daniel@ffwll.ch, matthew.brost@intel.com, thomas.hellstrom@linux.intel.com, sarah.walker@imgtec.com, donald.robson@imgtec.com, boris.brezillon@collabora.com, faith.ekstrand@collabora.com, bskeggs@redhat.com, Liam.Howlett@oracle.com, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 12 Oct 2023 03:33:40 -0700 (PDT) On Wed, 11 Oct 2023 at 17:07, Christian K=C3=B6nig wrote: > > Am 10.10.23 um 22:23 schrieb Dave Airlie: > >> I think we're then optimizing for different scenarios. Our compute > >> driver will use mostly external objects only, and if shared, I don't > >> forsee them bound to many VMs. What saves us currently here is that in > >> compute mode we only really traverse the extobj list after a preempt > >> fence wait, or when a vm is using a new context for the first time. So > >> vm's extobj list is pretty large. Each bo's vma list will typically be > >> pretty small. > > Can I ask why we are optimising for this userspace, this seems > > incredibly broken. > > > > We've has this sort of problem in the past with Intel letting the tail > > wag the horse, does anyone remember optimising relocations for a > > userspace that didn't actually need to use relocations? > > > > We need to ask why this userspace is doing this, can we get some > > pointers to it? compute driver should have no reason to use mostly > > external objects, the OpenCL and level0 APIs should be good enough to > > figure this out. > > Well that is pretty normal use case, AMD works the same way. > > In a multi GPU compute stack you have mostly all the data shared between > different hardware devices. > > As I said before looking at just the Vulcan use case is not a good idea > at all. > It's okay, I don't think anyone is doing that, some of the these use-cases are buried in server land and you guys don't communicate them very well. multi-gpu compute would I'd hope be moving towards HMM/SVM type solutions though? I'm also not into looking at use-cases that used to be important but might not as important going forward. Dave. > Christian. > > > > > Dave. >