Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp874514rwl; Wed, 12 Apr 2023 05:29:04 -0700 (PDT) X-Google-Smtp-Source: AKy350Z1huXTLcO7s1Ukwsjg1z25sX3urn3UKTZAv/I/dqQ9LnzoXthdIRg08rJQY5JoW26zZuC+ X-Received: by 2002:a05:6a20:6b96:b0:ea:ef5f:70ce with SMTP id bu22-20020a056a206b9600b000eaef5f70cemr5429845pzb.52.1681302544116; Wed, 12 Apr 2023 05:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681302544; cv=none; d=google.com; s=arc-20160816; b=Hf3+UzXjSiB4BMsnJ+aiMpujnlNVNkNlqwb4TQknu5TxC8O0Zk8vAezvL4BksIqkRU sBcf5Yg4AA1cCSIqrFZ1YPkHicZ1ZVbucAxabJDnsrOliQ1p9Bw9khtBT/ohNr9F2kIj /GBq7YdRPmPJ2pDJqe9M6wO4VyUMrrRsL6P5fmv29lvp9RXNxTOKHQiuUwcnOdxCaVrc ovwSQ9tTT0xckpsmOC07RwE6lTU+PV7BBio2vM/nfaO1+Y3ulExMN3n8zeRgcSQZfz3s nEKhQXhDEYGAkz2OYN0BK0bdMPAuZ6ak0VDiR6GJWUhjupkxras8AvB5scvDLkjOjVmT nmyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=rW+olLTJVazT+B9gkPwi+ON4OmKwNR1V5hl8XRLXidk=; b=BMfw7tw3d9jJ70hrhaC3mGP2l/LfxY7kGqT1ZJ00LQTlHrYRVtni5nw3TUKEgIhSaU efx8KtK6M6bdEPJq7varErf11EGeoulH28lu7V7WiTL7IoZuR5zOoIvbyZLgPddd29Wy 3uao/nZmwEDj8/ZkFqnXVMPRzb0h7FAF6Ny59Im9Wqq/qPRxA7VHJ0lz9NAY7UOhcSzm lrBw5Udib1m4XcYvkcLKhdiIuFXOP3T7WlCFTavChyDJycHsEZXFbicQF77MR3dm8Rlh I13rQDPwHkfrRR1ee098V50FxFUs+ttIAcusPKuBjPoIk/rPlKblPkUVeUmWKEdEcJP+ CpVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="mP7D6/EW"; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z25-20020aa79599000000b00624c3ad6c03si15986479pfj.227.2023.04.12.05.28.52; Wed, 12 Apr 2023 05:29:04 -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=@intel.com header.s=Intel header.b="mP7D6/EW"; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229932AbjDLMLi (ORCPT + 99 others); Wed, 12 Apr 2023 08:11:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbjDLMLg (ORCPT ); Wed, 12 Apr 2023 08:11:36 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6DD2B4; Wed, 12 Apr 2023 05:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681301495; x=1712837495; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ewT/IrLeXzhwmk8e73q3/ULj13sZtuYMfUJ09TlK3Rs=; b=mP7D6/EWOW7Nj1eRrJ251nO0kIpSGJlAVBjYkd9cAOC3vkz/5jRWa6Mq KuTL0W1P/EI2qvVt1OzdWGALYqSSDIZIIPbbkW17rVE5pgnEy7T/SzDDl o8sqAENnxzlPKJ/kcLfdAEIdkKr6JsCmO3aiKk88lNq80w9LYYnKCmNIx DGXvLhgGvlAzilsfSHp9XnHN0vThviQdLhjsrd19/XvxZ/BaKVMhC3nri H2BNdlSw/mWO7O9ip+rwAJrv7GqnV118y/Vj9+8ElHw5i7Uyf5uTCfNtT N5E1UjpAKUYKbykgKg0ylPY4th5C4Hr8+jDQdvWVPkdlvRgbxaoyWPQjy Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="346550590" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="346550590" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 05:11:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="688934157" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="688934157" Received: from amurkovx-mobl.ger.corp.intel.com (HELO [10.213.229.123]) ([10.213.229.123]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 05:11:28 -0700 Message-ID: <98bb3388-d671-dcf3-0247-649a702b5e11@linux.intel.com> Date: Wed, 12 Apr 2023 13:10:22 +0100 MIME-Version: 1.0 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 To: =?UTF-8?Q?Christian_K=c3=b6nig?= , 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> Content-Language: en-US From: Tvrtko Ursulin Organization: Intel Corporation UK Plc In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HK_RANDOM_ENVFROM,HK_RANDOM_FROM, NICE_REPLY_A,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,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 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. I also don't think the atomic_add_return for client id works either, since it can alias on overflow. In i915 I use an xarray and __xa_alloc_cyclic. Regards, Tvrtko