Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp389568rdg; Tue, 10 Oct 2023 13:23:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVXwVrmEGizNmuE80HyrIZzqcw0dRK7R/tEUALb5PZ6zGO8aPIKJNJ0j7l+dGpI5IohZu9 X-Received: by 2002:a17:90b:3892:b0:26b:56fa:87d3 with SMTP id mu18-20020a17090b389200b0026b56fa87d3mr16427939pjb.31.1696969431817; Tue, 10 Oct 2023 13:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696969431; cv=none; d=google.com; s=arc-20160816; b=DcAYnwYp/JHchFdKTUGCI+Nu7/x0gy4mH6UMFhXTXVH7Y6EMUv+ljDSnH9XGlEjAmE 1eVbgK8i2UYwOx5zwjXaxVRQ4Q4D1dguO7xDJu8zA2qiFAo4fMaT8RoXUEWrppqrIjuh OH9WKhZhTNfiag7/2ClD3W8KoW8C1oXl4pPwHA+IpAHOnrdjieuZzaQvh84itnEi+BzF ITvDcT4uVt0zcBNsXu7tnQQH//doFvigg/LnK6IOAvOGqeDMyabL0aWVBMyXddQ2zMx6 7+uekrbRX3iUHQktSgbH2hjEKN2l7AnFTxq9uJgm3MG2XbIC7sPLDNQIuN1zU9QZhusY 6mfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Q9K/39pYVDB63ZN/U40w9C502En4aUTJoZoW8PKDMTc=; fh=upG6cpjCowRQSuw2t2P6yThKU0uT4AAq+QIvj4Y34Qs=; b=pU+sp62qcLGe2zVHzCwGih74dqqdwSxrSNVu2vqNx+4WtOrC4MMe+WeKMap28IHsHo FpNz6YKMm4sUPZVdP0qimOXg2Cuqf2r85bBeMoE1fYVgLuJqm0fCKJ2S3jQZ/BnafKZB 3/TE47tWUEvqe6fFnO9NOtZh8zXC/6x4wQYj9Ejep7XJkhHnBMY17He2mpqp/N+/8LWz YsXLEZBwigPKe6mXcuYPTbsYDu3VTyXczduIuMsq7nVW2ROYJ+pf1TeGfRoXOGSCTJf9 ZlqA34UsczgLH1aL/WKjn8cDmmWV8Qi1J7Jipxzbhk8f+Jn1NRblCxNLv2wDsa3Q533Z gaLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RoEmv0VX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id s18-20020a17090a5d1200b002775f7dbd79si10472698pji.184.2023.10.10.13.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 13:23:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RoEmv0VX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 83ED88329AB1; Tue, 10 Oct 2023 13:23:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbjJJUXc (ORCPT + 99 others); Tue, 10 Oct 2023 16:23:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjJJUXb (ORCPT ); Tue, 10 Oct 2023 16:23:31 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF7EB8E for ; Tue, 10 Oct 2023 13:23:30 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-53808d5b774so10873495a12.3 for ; Tue, 10 Oct 2023 13:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696969409; x=1697574209; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Q9K/39pYVDB63ZN/U40w9C502En4aUTJoZoW8PKDMTc=; b=RoEmv0VXe20h981NDuvT4ZuoSNe7IMYJLp0GP4o1wgwErn9pPxGpTfqV3ZGOQvHw7a iwzIiXFw82+mrHyRpC2jHAIoplEjqAJo0mY1Y6PaWrQXLJv6zC76RVLkk3z6niu+N7Fk dCXvJTQDV0uTnP5xneHfE8+qG1yPsa+NGF6q+bygsW+EEdtsSdYDWZs1nH6IPYudLGGX bJbDlAgtpm7XVAGP1Ffe9W8hNqaRJ4WcsQbydzjXUUKyRqJzVPSubEQe6IHToDBo+wM+ aRXZQ1rifHx+NXY3qDWEUfDkoZJIZNV7jGH38qKiNmilo1zKBf7uPgF2xgvIHKJd8cQC uU8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696969409; x=1697574209; h=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=Q9K/39pYVDB63ZN/U40w9C502En4aUTJoZoW8PKDMTc=; b=iUrqoGLqhof1rQr3/lXaSXWmOHFq7Qg4c4U2682qzM/B7PumKPx5zImCl8851nPILe QJsICn1euY+FI7+gZmnaw1874EZ1bMqciMN5lGEus+OlGjvYwR8X7SaAg0OSUvhJl+FX Q2NbeDy/8zhUH0AzdrkL4Z6ORMvt56SDLQMAT9/TLiz4+G6h6xBaOptikTxLUwOyLiW4 W6SIhRVU3dXvkP2QSFr3O63ne2tULZ9SSuaeqN/JPdCf3vqsngMKwtPHkjgnxEVQ7MAk /4c3y1yKPOWsHfahFc5Y+GLsRx/a1GSt0Kt9leHqnNxvIOjBrksPs1QFdaFL3qk7M0uD HXcA== X-Gm-Message-State: AOJu0YyWctLCgVPwJFHeulnIeUC/a/WJV6UB02hhAT+IFElXgMgrxiDx rfbMILmiK4yYef2b+44BKlJf7J2IIsZMCGuv1S0= X-Received: by 2002:a17:906:7398:b0:9b1:aa5d:5d1f with SMTP id f24-20020a170906739800b009b1aa5d5d1fmr15193521ejl.73.1696969408945; Tue, 10 Oct 2023 13:23:28 -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> In-Reply-To: <8a8253ae-0b85-df90-b480-64eeebfafc6d@shipmail.org> From: Dave Airlie Date: Wed, 11 Oct 2023 06:23:16 +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?Thomas_Hellstr=C3=B6m_=28Intel=29?= Cc: 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, christian.koenig@amd.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" X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Tue, 10 Oct 2023 13:23:49 -0700 (PDT) X-Spam-Level: ** > 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. Dave.