Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp877073rwl; Wed, 12 Apr 2023 05:31:03 -0700 (PDT) X-Google-Smtp-Source: AKy350YtmiICmzDqxe3kLH0q2FRI+fMKhCbweVo5zrJkJWcbNUtW4Fvp+rRCrNWasWLTz9Sbcagx X-Received: by 2002:a62:388a:0:b0:622:ec07:c6bc with SMTP id f132-20020a62388a000000b00622ec07c6bcmr18667276pfa.15.1681302662753; Wed, 12 Apr 2023 05:31:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681302662; cv=pass; d=google.com; s=arc-20160816; b=gCzSkXlnHtE9nYO/1kmy69w3WxG1gynm0jX271/qgWfQqb+9XYTgL19mwKnPpk758j 7uZOibCyHI/H/Kn9/9lEGuEsAaRYTj5jXhc2hDAfSqZ+kmzNubhdNXYfJyeexwkIDqT2 Lpnfz2eE1qt7nbUWG9EJpPvALuQOIfIn/2BVPjmhzKaEEqLD4BLbnqOb51S1QVXskiVu +YkSY2skTxD5LRQgMM+pzo2mrz/2jerHzQy5dtwNBG+u2tZeOTXFpMzevZkTureC+uZX LU+pa4gwa9m7QBgWlj2hDdEFu7y1OhcTJPM6s4NclgsCBhGc+zRCaDIgpZeMD+zdCvaG M2YQ== 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=heg35P71C/DU03bOC8umryfXh1DUcNpzxNoVgNqfVnk=; b=BCm1e5WlXBUgF8z+FGuB0FdtE2xor4fBiiywq96+Y7geQg4QFCKeiKeS3oxUnKClNx nWEhYfGaDNeAJ8Uc7qMaZnKDAjiXm82kGOWhAT1W15tkSlB/A8uxHG8ZYGq7OiBWNFJi PvIh5czIsl5rKlrg2Wa0TC3ORH9fEvc+DlMpwCowoD1NF0Ubbz4TQdSHI54zO5mV2otx /wcFuAlZP5wvnWY30XbJQTRt09TWvF+euIQqjRuXLCcXmraVLPPRysPoJWikPMF1CXor KxGweRv+dSLeXDZOoL1y/hx77CQjk0fDdUTtlYRrZ+z9h4R5S4KrMV17kdNWbOZun/Mq WMIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=wgnukGl5; 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 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k29-20020aa7999d000000b006262bc88219si12017794pfh.160.2023.04.12.05.30.50; Wed, 12 Apr 2023 05:31:02 -0700 (PDT) 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=@amd.com header.s=selector1 header.b=wgnukGl5; 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 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229769AbjDLMY3 (ORCPT + 99 others); Wed, 12 Apr 2023 08:24:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231131AbjDLMYZ (ORCPT ); Wed, 12 Apr 2023 08:24:25 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2075.outbound.protection.outlook.com [40.107.93.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF5C276B9; Wed, 12 Apr 2023 05:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jIlV6KmQ5lul4nNIBGoanQQ8kiphiVDNlwFbiro8SCgbymfgHcvlWix7TtBf2ITKTmmd751aAr9rYYUMW1vQhjJRbtZ3c16dy8NOO6VgKu40L8+GWqnb5OLunqeJNbScznecv3zg09qTNUbQog2TWw/e+sS3+GVhU0QiTIaQ0sjKNsqdwHrf40adxNH10JqbTZJDstGBqV0cCum0teuug6NNqOz+MYNVWZ28BN5o76rGM1ecpKaZcAB2ztiUfFBuCP0O1u/U8csng0cC3AEy5xGuNYica6vMRCBsfSMikCk8oZ6Do0wrz7g19UNXfegumd9YkLLUx6Tww58evsZ7ZA== 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=heg35P71C/DU03bOC8umryfXh1DUcNpzxNoVgNqfVnk=; b=jK5C2JnazPXxSqRUKYWRum+EpyCLkpf4MiN7X2m7i5ZefICv3p9TFYg+b+OWbUHKi19X6wlx9H+gYQAZ+2OV7dDoPQcd94A6UYUHsuhd3UkN4SX3XFuFC3P9qBhgfDt2U3n934iqv3uw0A3WCYWA/6dmgodS0SrES69Z/Mtm/xQzrwnr6Q1x9cWtyOq6mAQFq0JhijEmG4oHlCz2a5jscqV19Hxu2XbjP+Ofsg8j4Y9veZCO/OLbUyvUXB+Iy90/bnKQv8rqRjdcRzFOilH+kaDlSZp/kko993ccBCBIhmkwsqke4UkREW3pmN/T/Jw9cDC5yVpQiuFAS98lKtn29g== 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=heg35P71C/DU03bOC8umryfXh1DUcNpzxNoVgNqfVnk=; b=wgnukGl5Qn3MVrA/hUvq8RRXW1ujzvwLjVVR2Z1Zb5V2InCmJTm2OLaH9PEKNCZ55RH+kFBVBlmFcyEvJkKvIu6It4UpoWCY3AJmArSCsXNufMVE0N0DEQSqp03IorDs9PojrCokG4S4UkBg4EGunPHc6cdMDDtt/n0W3ed3S68= 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 SN7PR12MB8819.namprd12.prod.outlook.com (2603:10b6:806:32a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36; Wed, 12 Apr 2023 12:24:08 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::4624:dc39:943e:6ae]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::4624:dc39:943e:6ae%5]) with mapi id 15.20.6277.036; Wed, 12 Apr 2023 12:24:08 +0000 Message-ID: <53c2e18b-48ec-fded-e1d8-7b345dea49ba@amd.com> Date: Wed, 12 Apr 2023 14:22:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v3 0/7] drm: fdinfo memory stats Content-Language: en-US To: Tvrtko Ursulin , Rob Clark , dri-devel@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Boris Brezillon , Christopher Healy , Emil Velikov , Rob Clark , Alex Deucher , "open list:RADEON and AMDGPU DRM DRIVERS" , Arunpravin Paneer Selvam , Christian Gmeiner , "moderated list:DRM DRIVERS FOR VIVANTE GPU IP" , Evan Quan , Guchun Chen , Hawking Zhang , intel-gfx@lists.freedesktop.org, "open list:DOCUMENTATION" , open list , Mario Limonciello , =?UTF-8?Q?Michel_D=c3=a4nzer?= , Russell King , Sean Paul , Shashank Sharma , Tvrtko Ursulin , YiPeng Chai References: <20230411225725.2032862-1-robdclark@gmail.com> <98bb3388-d671-dcf3-0247-649a702b5e11@linux.intel.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= In-Reply-To: <98bb3388-d671-dcf3-0247-649a702b5e11@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR2P281CA0163.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:99::6) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB3587:EE_|SN7PR12MB8819:EE_ X-MS-Office365-Filtering-Correlation-Id: 87a7b358-7976-478c-ea8e-08db3b50d053 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sPOVcqrF9OUzZsU0fwu5CotOmYZ/zE+0sQwxjRBnrxh0AQBswsJvpxElRt1zcgzPLBuxAq+usDbfkBFJLbASqwkbj8QXOpyYYAYUd/96zhUyXTxL9Bi7Zw9MQknIcOOIvRoTqFiXW2ehC76P8QksebF6vcywSQZLIKUMgY9EJxGSozEGphgHLc2MnTRAFmYTQqvYvpfxCIh42ZCj0iiIqaNw3Ms7CZYSG8NQXTKw+el5GdymX/kguqmRPuk9cHedLIncdec4bmdaxuuc9tRhVgAXvOIhy0a5JCyS9VYB+ezRR1cRRmWMUjK2jDcuXkGQlCFFSWu5JQcGYTxqNXFSltpZarvL+7W9BA/G7FwQPlThCdQIiaL3ueIxoWHHydCSuX1W9OFqh/rgWNK1dEDiraphPzfVT/PwQKbhgiR1q4k4cfDamcnZIhtKQ4zibwNbjcAm7vRDGASg0mJnWGM6oAFF8Si4Rr5BBbO9MbIwczlbfTWFsrGHEETX5P4696y5/uynitoO4Fj0JH0AV4Ph06311jIzPX7qiJHZK4c3Uq3sN9vFoYoBcRlkHjSG8Dprh9gZO2O7ebjom/jzU2Oek7F4IZ6wKDKRCjRsv8pqy5e10ZD/r9jvaLQZflUix4HtNoJ8IMEkRoVNGPri86lcDQ== 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:(13230028)(4636009)(396003)(346002)(136003)(376002)(39860400002)(366004)(451199021)(478600001)(110136005)(53546011)(6506007)(186003)(5660300002)(54906003)(316002)(2906002)(966005)(66946007)(4326008)(6666004)(6486002)(7416002)(66476007)(41300700001)(8676002)(8936002)(66556008)(31696002)(86362001)(6512007)(36756003)(2616005)(38100700002)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?N2orY1g5QUt2YUEyT2wwZ1BlM050MVpaVkNvRnZxTnJmYXk5V3JTTjZRTUJw?= =?utf-8?B?cnRlblB6T01EYVRRWk9RWUdOMERDUHlFWlJmVDE1Z3diWFBWN3ZiQnZBcEJX?= =?utf-8?B?MUFHOFNNVi85UlczWWUrNS8yWllvQy92U3NMMUl6T3Z1NlU0eG0rVjN4RzhS?= =?utf-8?B?cStRQ0NoVHUxcDlkeEVpVE9YblBkZ3l6SXZMTmF2NEtFbEgwNjgyY2JSRS9x?= =?utf-8?B?U2ZFbW1pREJQakw0Q2Q3cjhKVTZtQ2pxKzR6ekpXSVdkMlZydWluTGVQanUx?= =?utf-8?B?aHV5ejExeDFJajBvQloz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?utf-8?B?ekhvLzZvUVU1cHczUmVGaTBIOEU4M3YzNGVXbWVPQTJ5YzFTb1JabEhXNFN4?= =?utf-8?Q?G+03p8kojsoqeXwpoNtzuFMPrei37BL+aUBnXbpteV2U?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87a7b358-7976-478c-ea8e-08db3b50d053 X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2023 12:24:08.3843 (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: damCiX+BEHrJgH1SDR1v9UrtPgkV3U4R1pBye3XQbhUDE6ZVVMyZfrWaFwkt+N+h X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8819 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED 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 Am 12.04.23 um 14:10 schrieb Tvrtko Ursulin: > > On 12/04/2023 10:34, Christian König wrote: >> Am 12.04.23 um 00:56 schrieb Rob Clark: >>> From: Rob Clark >>> >>> Similar motivation to other similar recent attempt[1].  But with an >>> attempt to have some shared code for this.  As well as documentation. >>> >>> It is probably a bit UMA-centric, I guess devices with VRAM might want >>> some placement stats as well.  But this seems like a reasonable start. >>> >>> Basic gputop support: https://patchwork.freedesktop.org/series/116236/ >>> And already nvtop support: https://github.com/Syllo/nvtop/pull/204 >>> >>> [1] https://patchwork.freedesktop.org/series/112397/ >> >> I think the extra client id looks a bit superfluous since the ino of >> the file should already be unique and IIRC we have been already using >> that one. > > Do you mean file_inode(struct drm_file->filp)->i_ino ? That one would > be the same number for all clients which open the same device node so > wouldn't work. Ah, right. DMA-buf used a separate ino per buffer, but we don't do that for the drm_file. > > I also don't think the atomic_add_return for client id works either, > since it can alias on overflow. Yeah, we might want to use a 64bit number here if any. Christian. > > In i915 I use an xarray and __xa_alloc_cyclic. > > Regards, > > Tvrtko