Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp626299rdg; Wed, 11 Oct 2023 00:08:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJPKOQcu3crIDhJhK0yuG7KhPNvWtJXC4YpUCXF4ftpsZqAllJc6ArxsmH9ULppjnwxhPi X-Received: by 2002:a17:90a:b114:b0:25b:c454:a366 with SMTP id z20-20020a17090ab11400b0025bc454a366mr20484905pjq.5.1697008104361; Wed, 11 Oct 2023 00:08:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697008104; cv=pass; d=google.com; s=arc-20160816; b=i43yg9CH3J2rFoku+G8r/WTIk8ID6qFjwx4RTx+6HZ6RNLd4cWUuiyaZyjEAfPIl1Q 4klSiM8ugF+jEV1g7O+K/BWGfuH+iEdbNpsSY7A3842oM0hznzGC/AZ2dkXefoErcYN0 tBWaJlBk6ClRsA3Ydd60IA+boAHRbxtPpUXDrQ3NlNj6ErjakmQ3+EitklSjUxiF9LF0 ln2jlElzdOJVbuAhhKGQmYkz7ZA1eqJjKGc8IwgCM8BucAL9wSmPEiPG7JenojDL/07i 4WEBNl98mDS6zhLs4oSOYX+3OD0LM4hdg+EWgYUPu+ZcxkPZ+Fh7cEyEkGMe9C6PFYFG REyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=jgFKqCi2UIbu4cj9NmVvG3lT1c3jQ0od4yED2AHluxs=; fh=OeNVorY/fsiJJj1zPwisAig+2qzAJP536r9FiYTBRHE=; b=LezAEjpOgpVQk2HNu+zesy8mD/Jkeme1rqNC6zLBkXIAX4zvCGPT92luDFSHh6FuT+ AgV6DdhZ3ZPtDg1KvMM0vjm9iVedCg4dAJsdeDSxMkmTO4bXPnZBoduPUylxUVp9/kIJ 9stm+Djv0ueeoGgAt1zHzphL76LbazUsAMwyD5EA8C4KQgE1axh6ZetB8qylz5E7CCZs ZTjBd+BoPiGAivakULK9hq7UNwTNcEq8n+wDv0O2RwliVp+iXCyYtAnaYyCf++/jFQeJ 6QvauO8tokaPoNcDGW4/DuNMzPwyvVVdVWuKn1pwNaZOXrWgKi34ecSCpKBPD/M14lkF xL1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="sqv/hjZY"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id a4-20020a17090ad80400b002777081181fsi15036840pjv.51.2023.10.11.00.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 00:08:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="sqv/hjZY"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9ACDE812E02A; Wed, 11 Oct 2023 00:08:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344434AbjJKHHt (ORCPT + 99 others); Wed, 11 Oct 2023 03:07:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344306AbjJKHHs (ORCPT ); Wed, 11 Oct 2023 03:07:48 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2056.outbound.protection.outlook.com [40.107.223.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 711E78F for ; Wed, 11 Oct 2023 00:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FVdAXUO6IGww4lG6Mr4XWSxeTmhv6qK+YLWqMMDDTq7SVoHfAVyVkl0B2vPVv1rDw7FoKMwVFXkFuD6opUxtTXR1p9pttMdOFabVWmyTlQ+phGQ4W6yhW/sy0JTon/IpCcTVYxVgtxbOJfs+6yGOyAzEVKCPqPYVJVSWLc/s8Q+5UMz5fq1MtZON8Iijf8sZWjllUro8P5ALL0ud8HoLSxW3mOPQn2DiZb4mmoEup9L0dW4CfAo72Be3uqR+gFFlS1zRher+Uh0EaQqUGOm5qkp1lvz41gQ6gQUUz3KOyDi8W+bxB9Bv4M89c+wUiXdhNdKPJoGvgioAvV6MdBJwfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jgFKqCi2UIbu4cj9NmVvG3lT1c3jQ0od4yED2AHluxs=; b=GXKQnXexQHKr86/vbtrHZhsaV3shulkIi1OMdZ6urrIbnBqrYDLkVskNsqSroUDvIt6xOKUyJmEKsw332zfkAk0mGJkveQCE5L6PO3Ori6e7up8QxpqoKM8mmm5zBRfnl1soYappn09EcvhamR5ND3XQL4rrEWb0HaBFmFao74bNPFcPsnrCd7uLo3GUep7BpyqipXCdInAZvICVbu+xOvtXJJUeeWR/WncJ/hFR4exqGOp0693CDBC+i9CDqVA5PT12k2PQBqleIzPHvHiw9/DcjN1jarvtiYAI7EY9MF5sofbqmMsH/+xGE80Jmn9TyANDO1LSq2qPzt2IjD/Q9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jgFKqCi2UIbu4cj9NmVvG3lT1c3jQ0od4yED2AHluxs=; b=sqv/hjZY7K8H8YFwq76uO9YTSC442yIFatgxWf7g2D3Ta0DlBvM1HC3Ole+ESiVHv/feP1MgRASW6uo97cvs4qN2pI3Wx9CTvjL3HKyjUBNElg00KYkmT1vrlBuKBcEg4gHJ//gxoMoW4UQpfOhsnN0rYl23lorwVxjW8WnYukk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) by SN7PR12MB7345.namprd12.prod.outlook.com (2603:10b6:806:298::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.37; Wed, 11 Oct 2023 07:07:44 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::a7fa:4411:67a3:131d]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::a7fa:4411:67a3:131d%4]) with mapi id 15.20.6863.040; Wed, 11 Oct 2023 07:07:44 +0000 Message-ID: <76963abd-77a1-4bbd-9537-7b230e648a90@amd.com> Date: Wed, 11 Oct 2023 09:07:38 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation Content-Language: en-US To: Dave Airlie , =?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, 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 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> From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FRYP281CA0013.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10::23) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB3587:EE_|SN7PR12MB7345:EE_ X-MS-Office365-Filtering-Correlation-Id: 51acd07b-2f15-439b-4b12-08dbca28c3e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TDU9vEoSChpXhxYN5V7MYOBfvyIYS4XYu0aTalwAXuGtgBHUPN4tYcXHF3pjpy1CI/hfPZuIWBJCJ7kb+xyBBkKF/2Hwyt36VYKzunH8rAqn8x3bV/TJ+F+7whqKLHbtj4pLPxgGP7+u1BKPRidigHdhG4benT2A/jbualVe24LMPkn/EK812SZVbEkpFBcNT0Ah6OBk73Zm+vfnmXoMIrEJ15Wajg5N4UNf14cQM1nqWCBwnxB2+mAU7G8uXtdI+a/mWAWtdLxu1luD9WrqQqKP3v9Y4FqwZOCosQ1gcnRftvYRaRnnr19Wh4OVyjNZs/bFNb441StrN4QV8jjhnnAWl1UWSCHCXonbFxPzi3hCztdA/E/Jd0Y35fHIaYE1Vz7/46y0PB6125BFgjU2/DBRxxVdH0AMy86pdOA6toJETpbo4DGRUZv4UJ+hQawTNcYQAR/AgkcXsgTEhPMgQUlVHXrMAa0oniPaHpzXhzBpFzJQazuYkgLivHrjnO1A3gliFAMSf4vuFa4K95zIPRLwFsIs4ZP0Rz3P5F6JnQg1P3PjOVuySUyn7lWSIyMZy04j+PpJRc+b+5Tkk4GHtAFkgcfs9EydcPBsZVJ6GZMM3aZEExSVLQX/XMhPIu7MQThBq3Uy1XqdEf09SqIgUw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3587.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(39860400002)(396003)(346002)(376002)(136003)(230922051799003)(64100799003)(451199024)(1800799009)(186009)(31696002)(86362001)(38100700002)(36756003)(31686004)(6512007)(478600001)(2906002)(41300700001)(8676002)(4326008)(5660300002)(6486002)(6506007)(6666004)(8936002)(2616005)(83380400001)(66476007)(110136005)(66556008)(316002)(7416002)(66946007)(26005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cElBV29scDg1WTgxUEsweTFJcTAzZmJXTTF1WFVQZFNXOFNWQ0JZeDJFV0Yz?= =?utf-8?B?cGsrdXRwaUxpaTYrUHBZcTFTZ3JnZjBrRUtqWTNFcnVXM0tNUjB0SHhab3hV?= =?utf-8?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dVBrSlha?= =?utf-8?B?OTlQYjVYT2ZqbERETjBuUXdoZ051dEhGT016R2pXY3F2aDhmdWJVcGt3cFEr?= =?utf-8?B?MDNWUWoyZTVmcU1lZU1YZmtJRUUrYkFYMUlKN25GNjVWVE9WNEd3ckttY3Vv?= =?utf-8?B?R2xsek4zc2g0akFvcmNEbDRic2NnZm1yMWptU2phWG1Gek5aVFNnajFaSnI5?= =?utf-8?Q?aCVXlhIOB0TQBrgGw+Fq2T689?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51acd07b-2f15-439b-4b12-08dbca28c3e6 X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 07:07:44.0307 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rmFo+dEfiINTvvdJNPqEPuL7P1iPgzrkCwa0/MWpc/DbUIhWmHXSIKsC2i5Is3Nl X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7345 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Wed, 11 Oct 2023 00:08:21 -0700 (PDT) X-Spam-Level: ** 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. Christian. > > Dave.