Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5777571rwl; Tue, 11 Apr 2023 09:49:11 -0700 (PDT) X-Google-Smtp-Source: AKy350bkV5S6ixEWt44sbqKymXrEJPwg7UuD7fCzqDYEoSygkfEUyAMMv1nhQy1qqOh14KCU+i9+ X-Received: by 2002:a05:6402:2547:b0:502:50b0:a879 with SMTP id l7-20020a056402254700b0050250b0a879mr18699223edb.5.1681231750868; Tue, 11 Apr 2023 09:49:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681231750; cv=none; d=google.com; s=arc-20160816; b=SQ9yiBomQLFiLzp1hQzWUD6kQeBNBkDmNqUcrgyQmNUeToYpui0cnRmdLJonaT1BkU TwEKGQ1300TMsY88WA4Cu8zt97cBFu/qolQwgpMMoZ1ydiKkhH08Bcgi3+GN8mSxHQCd jvk0c/+eVqM08jkPH60VzULm5xBZIhUARdHgSC7JCm8HHzgPdy3jOzCgsodocyBsdrGA UFQK9TnGeTqOij4bwn8hMrZ9tTJYhXuiXfaaFfx7KlR74NlAWb3Dd8U3qa5b+dH9zzJo rjds0F2tX2RpW5Xt2IpmDscB9gwtL9ujIHaNnmhdvEBWpAsmXCZgcZqJzueaiRg/bcBy GD5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=OV/uuQZ41eH3AQ7KVpUu+AQP65VPVOJDNUkIUJlBcW8=; b=HYY+mAlX4kZdWz1+vDRf5S2pN4EwXQrXScR6JXUyKVfDKHzh67J5g2gqNTsGHDrtix pZfakOdQsplYKyek1u+yLuoE+fA2U8OgJqwoz8O4C0UWaocgKXRXONZEjsSDVH9DD9iw us2EiJeabTGR6eVpnelbaN8nh9BDPB2XGa7vP7inMZhRiPCrjb9UvwQ3foZp/HiJlEdW 94X3AXw7tbEsQzxFaYIL5SBGPQ+4KJ5/6xSD7J5IhUIBbDucQfri0IZzXDZONK7G6TSh RUjJrYtR7UK6YP1i/GAgTyHFJ8xH6qTtKvs5QfJ5yfOC+w4cIanalYbARvM/vEVxumf9 Ev7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M0JuxiDM; 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 bc21-20020a056402205500b005029d16fcebsi894992edb.649.2023.04.11.09.48.45; Tue, 11 Apr 2023 09:49:10 -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=M0JuxiDM; 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 S229989AbjDKQrz (ORCPT + 99 others); Tue, 11 Apr 2023 12:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230091AbjDKQrs (ORCPT ); Tue, 11 Apr 2023 12:47:48 -0400 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5677C59E3; Tue, 11 Apr 2023 09:47:44 -0700 (PDT) Received: by mail-ot1-x336.google.com with SMTP id 39-20020a9d04aa000000b006a1370e214aso2414944otm.11; Tue, 11 Apr 2023 09:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681231663; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OV/uuQZ41eH3AQ7KVpUu+AQP65VPVOJDNUkIUJlBcW8=; b=M0JuxiDMCuw5UBrcSnwb9HMdF0X77GXMcLCxFtljkSQ17pMsAE5s6+iVvE8x1k64lk bFXie5+nYrcwp/e2JgNUFyd35ZZWgyNZArZ+Wuq8LfFlylOY11Zl6h7r76dLM7Xt9Wdd D82CHTUBVKnKyhf9KQIS2hQkLUYG42ti+02ifxh8vcbCaqfvbvpSrUFNlr1NYwlMIp3W wRiFQu/5DfcEA0XLxhNgxHFFHISPgN2hIIokMRLq0lxk6UiIcSd5yIiiN9I/HGUhmvlQ pLWaUSRGgkGWcbAaUWt3w7uNaAtNuyqxHMPEuzDdplBxkGdJlaW3Bhza+bcFOz7KDp3B OHEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681231663; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OV/uuQZ41eH3AQ7KVpUu+AQP65VPVOJDNUkIUJlBcW8=; b=jGg9vnZvxgr2suM+ZMSPQ+5xn9u/aMKmxWc+UN+jJJkQVlq8u7EaCJHAU7QZ1vBH8L zfTyxCDB9v6jHpFPkN3MHEGd4PojGHQFVBPEIt3bdM1W32WDxgyc2al3Juh/eG5wN7H8 4An5seHebE4SrXKbGs5Y5RWaaeaK5jlDal7zj6dosafqftX3syrRWzvmHIS5HHUj7BE5 6ZKJgUhB00fR7asfohfnriyD1PjbmiB+vsckwYZnKEtx6/z+PnTsse5hnQvz0RlN6DB3 ZN9k/SjzyDe9kRt/iv7w42YS4Eb8ikMLmGMDh+a8B6Fa4SuU4Xt4JtHIuUuzlGaE1PJt srEA== X-Gm-Message-State: AAQBX9e5DZPWr/IwNzxsgpl1nEP0CuDLPXsePjo0RzZRh50bjp8gY4kA OoZndD1H4IEsjrELfTD9yn8KZ15SiBemwICXnd8= X-Received: by 2002:a05:6830:1b62:b0:6a4:17b6:8767 with SMTP id d2-20020a0568301b6200b006a417b68767mr12354ote.7.1681231663656; Tue, 11 Apr 2023 09:47:43 -0700 (PDT) MIME-Version: 1.0 References: <20230410210608.1873968-1-robdclark@gmail.com> In-Reply-To: <20230410210608.1873968-1-robdclark@gmail.com> From: Rob Clark Date: Tue, 11 Apr 2023 09:47:32 -0700 Message-ID: Subject: Re: [PATCH v2 0/2] drm: fdinfo memory stats 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 , "open list:DOCUMENTATION" , open list , Sean Paul Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Mon, Apr 10, 2023 at 2:06=E2=80=AFPM Rob Clark wro= te: > > 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 On a related topic, I'm wondering if it would make sense to report some more global things (temp, freq, etc) via fdinfo? Some of this, tools like nvtop could get by trawling sysfs or other driver specific ways. But maybe it makes sense to have these sort of things reported in a standardized way (even though they aren't really per-drm_file) BR, -R > [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 >