Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp276363rdg; Thu, 12 Oct 2023 05:36:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvlZnBplsCCSpIrvCUnqthkzNBCxlaW0oK3vLtgwmyUHadiTGiDIAcJxc3oH2uu1L75bHp X-Received: by 2002:a17:902:788a:b0:1c5:c23c:a9ff with SMTP id q10-20020a170902788a00b001c5c23ca9ffmr20350294pll.58.1697114187915; Thu, 12 Oct 2023 05:36:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697114187; cv=pass; d=google.com; s=arc-20160816; b=gEKDBWNDzujWrsTffn8aNhAPcWu2Usojf1tt3IRTtIxPwa9csVeaWU/dJbID68pljg znnPw5SMhfVoQVSfMJkO5jHBYqduLZK1FsLkRjAxadqGki9xhIX9BM7o75CtbQJD/3zR kqsgWdd7YrvEwc+5eZ4xgcG/edYey6vjlbHMSaWL1NB27aG1+1t2p4JYjieHlZrIpvKP +9RpE9AvOpN5c0akRid37OVuInqNnyNHB29YlAX3odJVRTGYwX+0el3Wkr83EARKLZsD NWCgzJfEm4SMRASPNYD4Q4c38yw4FRnw7kfrFBLw2A2UAhDGIId43EtaZyA5DmRdrujT F1wA== 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=+8i1QDQRgnEcNFH71h9YiSG/SvH2Vp96L3nXHeGTJf4=; fh=BG1eSRuPPF2PaIbzyMLGNgbIJTIny2Of9se8FHG7O3o=; b=vgb1aStLpQVgF7cg9i2eauxia27da3yXLSVx5gtp3EpqqlGThHv0+scpK6PSHLE74K wTvRM2YHorDWMfGNdNlcT/RUolTKlaNAYupGld9maXoZM5fEP4ECqa6+pgCD8yT0MRGL OA+OpOsKiJJvhXhDaJQJLTl0IUT8XO/MXQOh4lpNxlhy04KMRABLEO3IRZazoBxQ1NWU Hjtpkcesl+yE2Ku4QfoCvi5MuDAEZ8enyHgMPW4QgjA9k4ayYOUPl3W43i02Bsy/UWO4 0rncCsF3xB5PXxAtfBUogdWNqy2HRX64sQpUAp1BOu7HVIihuCsjmEovDLDgJZAnAH9V Tk/A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=w8cwqlMF; 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.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bd10-20020a170902830a00b001c5fca2e1besi2005675plb.15.2023.10.12.05.36.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 05:36:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=w8cwqlMF; 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.35 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 groat.vger.email (Postfix) with ESMTP id 2696E8068979; Thu, 12 Oct 2023 05:35:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343824AbjJLMfc (ORCPT + 99 others); Thu, 12 Oct 2023 08:35:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235703AbjJLMfb (ORCPT ); Thu, 12 Oct 2023 08:35:31 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2087.outbound.protection.outlook.com [40.107.223.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA95DBE for ; Thu, 12 Oct 2023 05:35:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kTbzTcz4NBss9+v4yUTqcbgu8Z5ut+K5D5wXA1O6UNnbp9ASBAjj5mbRW5FKJl6njWWU0oujzW6QWYVMRIIiEer7AocM8j5eN31zsp7a88jLujFJ9AxPgf774e7VTvcP5xL9YOkBUKksPmDojzoPAIHaMX4iuBF160NrmDfsKhhOnFpyAVVuQe2/hz20OzogJ4+t3E4lYsv1rh164bH1FRcVrKID7/1+SHD9IVaPMSwdjJn9AE0v02b4TG6fOPH292dhl4AzoJu5ZiPY9EuaMfBEb/KnhfAbT2a5WItruzPu06Pjc4Um4tKISOqDGOpbnzezA6iKGrQGVJqrUKAxKg== 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=+8i1QDQRgnEcNFH71h9YiSG/SvH2Vp96L3nXHeGTJf4=; b=ksi5+I/u9lJ8rW3phDKHqmMlJDRI/xv8DoPyuNEmk5BByYJfbzGFwLotC3f49roEXKb+phfRUq8yLEaZRwd6AZRj96Ib1ukUrIRcGHIILSqYF7lBImhIi852q3FP0au/a1yY7GAr4QzX5jfDX5zTIdpz+d1sFDULsHM1KumKCVOSdqNO3UBRd+/sG/PMAmJOXRCZfPcqvKCpfKGKIHmOdHhPfm+C3kF8aXMOkABLjByDNXSSOmn2HN9PXHAJUic4DGdd1hXURm2SHA9Z+ysSYEzdSTWDPOhcpX5Pld2nCgU4FWyE+dmowIDrttF1L14CRdOi2sr/LZ1HWWFu2tuaEQ== 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=+8i1QDQRgnEcNFH71h9YiSG/SvH2Vp96L3nXHeGTJf4=; b=w8cwqlMFH59ADI23w3QdBgiGVRluVFSsZC4Rgm89+pou4AejuSgBZjgUpgKGCScs2mSNMuXTtvbNA+lfwmEceCwJliK8HNmeh5u4/cd11CHX7po/0pgc/yU2KaY+fjciGRqH09pX5BwRjRcuCE56ojia6OdkyXY2WXsplX6pwt4= 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 SJ2PR12MB7865.namprd12.prod.outlook.com (2603:10b6:a03:4cc::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Thu, 12 Oct 2023 12:35:23 +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.043; Thu, 12 Oct 2023 12:35:23 +0000 Message-ID: <1333e15b-f229-460a-8965-01ff3e778a4d@amd.com> Date: Thu, 12 Oct 2023 14:35:15 +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 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 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> From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR4P281CA0090.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:cd::16) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB3587:EE_|SJ2PR12MB7865:EE_ X-MS-Office365-Filtering-Correlation-Id: 96370a12-b4ca-4826-9e0f-08dbcb1fb3fd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ci4UcZ2SkZhGpgeXpxS2yhJefqnsjuUP0U3dhKg4c6Abm/dahCqEVZB7TSYxv7MUsDD/pIbS/sxkBqF5Y3bITNm8LVWVvUOS06v6cXDOc44xU1dkj5L7YyZwaxjk6BNEWWSNauQWkepupmFz2FJlZyKAw2XTxb0jYe7pbyqiIONgLbHncF1ekEHM0Z6U7HyDXhzimsA74ihqz3apBWDp8MB4W5pVtQq1H5Q6f/XTtZWxcc0DQamNQ1N3YJeKCfHpWNbIURPVnVEt1APYQ/DIbLGOeQZpUfsX5A32ZucsQS6+VoT9yyeKZ5LGdQRNmPIgubiKIS9RyPQfB76mR55lanGbS8iwtkLKe49/6xLCyy4JB2Jrk2iyLiQznOW/Q7AkjurffkO6XcQswWxgTYN3vcnubfhFYT/HJ29bl/B8flY/442vXJt2LH2xYjYvJbZzaZ1KbqqbfMIjinqgjJTu/rSYSo1kOZRBFzeJI4vC9wfiX2oYV01MOldjV4eMBIjP09Qq9912cuf7IFNRo6I5fRto8nBswGf4EEm9e/0DhHnkB+3dPGFbCpRZGREwP2k9mRVcaVQ1sjCt+OwUbnoIWLooccHrgT7a34cv82DATZaxgc30vfQosqn/1yJZA25eKg2OgjFRawd2dxRh4YRSWg== 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)(136003)(39860400002)(366004)(376002)(346002)(396003)(230922051799003)(1800799009)(451199024)(186009)(64100799003)(66556008)(66946007)(316002)(6916009)(54906003)(41300700001)(6486002)(5660300002)(66476007)(4326008)(8936002)(7416002)(8676002)(31686004)(2906002)(83380400001)(6512007)(26005)(86362001)(2616005)(31696002)(66574015)(6666004)(38100700002)(6506007)(36756003)(478600001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UEFtZmdjSGxsM25wNlFVdk1ReWtwUGJFditKZThDdFRSL0hJQU5mNVpQY016?= =?utf-8?B?TGQxYXNlRitBNEZ0dklZZjVraTNHR0xMZWxIVWt1MWxEQm5jeXJTZnFaSDRE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qam5DaE01bWhLd3plSmJzVGRuNEN2RHNG?= =?utf-8?B?M2pVM3ZCblBCdnZDT3czYXVpOGNrUXMzQUJmU1dIOGtEZXBVNFh6M25IU3JF?= =?utf-8?B?ZHhBbmZlclQydWdzS3o4Wi9SYS93K0hmcmdjT3NYZDUvbW40dUFHbm9SeWVH?= =?utf-8?B?aWY3eWhSdEtKSlg5bC9SR2JmUHk2MTJyVzlkMW5XMW1UUEYzd1J5dDY4U3Ey?= =?utf-8?Q?Ur9I=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96370a12-b4ca-4826-9e0f-08dbcb1fb3fd X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2023 12:35:23.0084 (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: EgHHwSzxgMW3YrU/YGnrvOnDOncICu37EJGAU9uTVTVAugFwn6fMmgASDJKPlhpQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7865 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Thu, 12 Oct 2023 05:35:54 -0700 (PDT) Am 12.10.23 um 12:33 schrieb Dave Airlie: > On Wed, 11 Oct 2023 at 17:07, Christian König 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. Yeah, well everybody is trying very hard to get away from those approaches :) But so far there hasn't been any breakthrough. > > multi-gpu compute would I'd hope be moving towards HMM/SVM type > solutions though? Unfortunately not in the foreseeable future. HMM seems more and more like a dead end, at least for AMD. AMD still has hardware support in all of their MI* products, but for Navi the features necessary for implementing HMM have been dropped. And it looks more and more like their are not going to come back. Additional to that from the software side Felix summarized it in the HMM peer2peer discussion thread recently quite well. A buffer object based approach is not only simpler to handle, but also performant vise multiple magnitudes faster. > I'm also not into looking at use-cases that used to be important but > might not as important going forward. Well multimedia applications and OpenGL are still around, but it's not the main focus any more. Christian. > > Dave. > > >> Christian. >> >>> Dave.