Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4616746rwl; Mon, 10 Apr 2023 14:07:55 -0700 (PDT) X-Google-Smtp-Source: AKy350a1yShpsFSFYpCWN7TZPdnt6fOQQ4+u1iTxFNO4m0ruMwsgaQCFUvlWlrGIjbA03h8hlnA0 X-Received: by 2002:a62:1bc4:0:b0:636:206b:8595 with SMTP id b187-20020a621bc4000000b00636206b8595mr478406pfb.8.1681160874929; Mon, 10 Apr 2023 14:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681160874; cv=none; d=google.com; s=arc-20160816; b=ywC9EWaMqO3HjsvUPJvqlpW7ZRJaxNoLMJpikVBQZq5enmoEbjFcGXbbg8+pH0TBZf cgBNeU84gL5rdpvbsdDgeSLTjOwwcf3F7H3A/5uYMtUvS8IQ/rbgPPYkCofnd4LnasAZ o7Kt+O1Sz3Bhz4vwqBG1sazvfF0wFt1j7cw7FWugQsS34tudia9BGu6k06Ui0UmFppSm 1Ly+F1c2bPc2JzZ+TSeseFd6p3VXeE748iSNqONMl1iHXdCcM4/niCILnQFX0G88IiOe sF26kyPBfMt96bWNHCZCGYizG4zMuJDVUUVwFDRZrYwSEWGkKW44wHvOrwV8th9GxGE8 gl3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=mw7PIDF324rj5JmiBp3Gcc4Fg2iuz1Tt4YTUd4kugdk=; b=crotJbyP/3wcE/kuQ/yncUTGQIYR7GvLUcf6k+nzTMfALM//8+0m0LcRQ9xrDSsXgj u6MtH5vzeJQGfJ8gdrYDSkg0lASBHzMSofUJA+2ByvGxJrj74Y1l7yXIfc464wHGrGOe aPaLhsgp+tb9qAxbqi91L+bue2XXNodqfjAxufuABAGUfSXz+DObifI/SRzJlIM3tX+Q 3BZbQgHwmoe/15kqED/ekyJXk6kSMYUaWpTp1DK7Q88wiTsWrtnGc4CKLcWJAwqVKDo1 e2vzq4vDbk7HKCfBNcnw5vmwkbm7EjitxFdD8Q4myygLATcmZ2AANyi45emnWJYYHYSY kl5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=a68QFzn1; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w69-20020a627b48000000b00634970eca0csi5788761pfc.291.2023.04.10.14.07.43; Mon, 10 Apr 2023 14:07:54 -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=@gmail.com header.s=20210112 header.b=a68QFzn1; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbjDJVG2 (ORCPT + 99 others); Mon, 10 Apr 2023 17:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbjDJVGV (ORCPT ); Mon, 10 Apr 2023 17:06:21 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7974D1737; Mon, 10 Apr 2023 14:06:20 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id ik20so5645953plb.3; Mon, 10 Apr 2023 14:06:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681160780; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mw7PIDF324rj5JmiBp3Gcc4Fg2iuz1Tt4YTUd4kugdk=; b=a68QFzn1xixO15odT51vAd9u8PE/r3KgLLy3lgULiikNLxbWZc1f7JczaJVfAKkZQI pyUH/X3rpI0J+idTdkgL0jPeK847Y/6kFnjXjCA0hm/Uq7AL1NZYR4tfmge2JNjCq7oX rGVGYVunI3aFL+9V1gkWlzCAYY9qSrUoG543VJZfTf7GXytYKAGiCUHVb6CAo5J3Fgeq 0GNZS4cgqC/53a+Q6ZjdEG7JHGkntMEBZruSqBH7tOCcycBWoWoMLzrwtSBTaJN0EIuL IW1cmGWfMw5Yhhl8uU/8rify1v7DkpSS1526TkroQrtSK1L4s0g6/CPS3nqbOA/5aT4B fOzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681160780; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mw7PIDF324rj5JmiBp3Gcc4Fg2iuz1Tt4YTUd4kugdk=; b=oKjcadyVnhO62Yd1LoeBSIvx5CcVF98rF0pZozdL3pDQutUGhqA2rw6wz7xAHA4LAy upKRLOhj7pAaArUkt8aMCorYFZ5tHgddRxvQRZz0oeAMl5BIrhuqSLl101eHAcNRQUkk ctfhxi04RZoNDANHbb3oyAsEx8GCcGf8a1CFSjumgvP+NxsS+E28bB/89rWGDDK9jclk 02I9iKv9s+Uat38OuQL1x/1vcNpt2m8pdk1VIhfvtb2sS/HMaH4DqSMis7ma3UYpd4f8 ekrj6LjeyC4HUdD8H0TgceNzFomPVTl7zbMOA0xfVGD3hfFveTq2NTnvq5QX2P6IC/GK DvIA== X-Gm-Message-State: AAQBX9fTIIMmbuajkq+WtFaGlU1weCcxwBQOmmbAyLPLhwtwC0k5Pi9G XcN1ild/WVCOKImAuc3C+r9A5Vly9fo= X-Received: by 2002:a17:903:124f:b0:1a5:5e7:a1c9 with SMTP id u15-20020a170903124f00b001a505e7a1c9mr347008plh.61.1681160779826; Mon, 10 Apr 2023 14:06:19 -0700 (PDT) Received: from localhost ([2a00:79e1:abd:4a00:61b:48ed:72ab:435b]) by smtp.gmail.com with ESMTPSA id 3-20020a170902c20300b001a647709864sm1812180pll.155.2023.04.10.14.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 14:06:19 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Boris Brezillon , Tvrtko Ursulin , Christopher Healy , Emil Velikov , Rob Clark , linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-kernel@vger.kernel.org (open list), Sean Paul Subject: [PATCH v2 0/2] drm: fdinfo memory stats Date: Mon, 10 Apr 2023 14:06:05 -0700 Message-Id: <20230410210608.1873968-1-robdclark@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/ Rob Clark (2): drm: Add fdinfo memory stats drm/msm: Add memory stats to fdinfo Documentation/gpu/drm-usage-stats.rst | 21 +++++++ drivers/gpu/drm/drm_file.c | 79 +++++++++++++++++++++++++++ drivers/gpu/drm/msm/msm_drv.c | 25 ++++++++- drivers/gpu/drm/msm/msm_gpu.c | 2 - include/drm/drm_file.h | 10 ++++ 5 files changed, 134 insertions(+), 3 deletions(-) -- 2.39.2