Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3280125rwl; Sun, 2 Apr 2023 04:31:24 -0700 (PDT) X-Google-Smtp-Source: AKy350bVbLPnMAHMgVWKCAhB9SgqU4RIJ0zs3HwwGJ7+9WlMBo/DfhgtImecZlzX92H4v/g0JR7d X-Received: by 2002:a17:90a:190f:b0:233:c301:32b3 with SMTP id 15-20020a17090a190f00b00233c30132b3mr36393508pjg.3.1680435084313; Sun, 02 Apr 2023 04:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680435084; cv=none; d=google.com; s=arc-20160816; b=WEe9DDyDXedkUacc82u4EeNU3F/+BssD1XL1iAUY7RQqxndg5RwtFNHjHmOT1kTQ+T qi9kW0S5uSrpGY99B+Lz4q2hDf+M1XtlQD24Da/aJPtTn7w0PlUHa03RKOnNtkpCUjUJ IgaDAq4ut2taOiUQMxlWdda1w6joB1tQDQCcLxqxjCnKMJ8+K2tYd/PGSnoQdxlDon05 OqE1icBoVLT9mMp1mqLKY/Efo+xotoCgt4xWuKsMrBHgrsT8rcBVvYPeNmxAz2Q/QZtE TA4zFxHDoRMVHOSDgJBzM9eGP9D0RYGCBA/PQhqzXZR0pz52502+jXcFPqKWfc9aIWH+ ePKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=nD3qegrpWrX+mFwz2GPsiA1lcJpNUF+ie5Eitfq0jno=; b=uxwaqyPMO6Bt7kvzIqjQQpJ3teEVgfTRzeEp9G/2bgEW09nAtlIIlgMLEfBKaYE5OE +MTRlCg9zkWhYMPTJy7/Jlu6ypKHrUn0V9yelHSiJICS6gSSYUWy3X/UraoLxg6Wuk32 9fe1usYbhAl3GNej/nr/J3xG5fFI5ioTw3Eea2Br5Nj3Ahyj+J0C7pADn/WsMdgx/8NS Ri69WnZZiTc13Uuma9l7ftjG3LORNRMhV26I+nq9YjUln4o7ED/hyEDJ7I8cnUW/liQP AAnN0EOsUvFDEK1rWDsUxGWMI+rWoQjh5Ua82pBXR/13Ooj2I4lxyboSqDrf3sHnsMx1 Jv7A== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1-20020a17090ace0100b002403f301ebfsi6017539pju.15.2023.04.02.04.31.13; Sun, 02 Apr 2023 04:31:24 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbjDBLUp convert rfc822-to-8bit (ORCPT + 99 others); Sun, 2 Apr 2023 07:20:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbjDBLUo (ORCPT ); Sun, 2 Apr 2023 07:20:44 -0400 X-Greylist: delayed 389 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 02 Apr 2023 04:20:43 PDT Received: from lynxeye.de (ns.lynxeye.de [87.118.118.114]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 73A031D2DC for ; Sun, 2 Apr 2023 04:20:43 -0700 (PDT) Received: by lynxeye.de (Postfix, from userid 501) id D153DE74004; Sun, 2 Apr 2023 13:13:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from [192.168.178.22] (a89-183-231-124.net-htp.de [89.183.231.124]) by lynxeye.de (Postfix) with ESMTPSA id 510DFE74004; Sun, 2 Apr 2023 13:13:42 +0200 (CEST) Message-ID: <3c1d4d055df1b75c757956b47b77a23a9edcf842.camel@lynxeye.de> Subject: Re: [PATCH 0/3] drm/lima: expose usage statistics via fdinfo From: Lucas Stach To: Qiang Yu , Erico Nunes Cc: David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org Date: Sun, 02 Apr 2023 13:13:41 +0200 In-Reply-To: References: <20230312233052.21095-1-nunes.erico@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Sonntag, dem 02.04.2023 um 18:22 +0800 schrieb Qiang Yu: > Applied to drm-misc-next. > "df622729ddbf drm/scheduler: track GPU active time per entity" had to be reverted due to it introducing a use after free. I guess this patchset now conflicts with the revert. Regards, Lucas > On Mon, Mar 13, 2023 at 11:09 AM Qiang Yu wrote: > > > > Patch set is: > > Reviewed-by: Qiang Yu > > > > Looks like drm-misc-next does not contain "df622729ddbf drm/scheduler: > > track GPU active time per entity" yet. > > Will apply later. > > > > Regards, > > Qiang > > > > On Mon, Mar 13, 2023 at 7:31 AM Erico Nunes wrote: > > > > > > Expose lima gp and pp usage stats through fdinfo, following > > > Documentation/gpu/drm-usage-stats.rst. > > > Borrowed from these previous implementations: > > > > > > "df622729ddbf drm/scheduler: track GPU active time per entity" added > > > usage time accounting to drm scheduler, which is where the data used > > > here comes from. > > > > > > Then the main implementation is based on these etnaviv commits: > > > "d306788b6e1b drm/etnaviv: allocate unique ID per drm_file" and > > > "97804a133c68 drm/etnaviv: export client GPU usage statistics via > > > fdinfo" > > > > > > Also "874442541133 drm/amdgpu: Add show_fdinfo() interface" since lima > > > has a context manager very similar to amdgpu and all contexts created > > > (and released) at the ctx_mgr level need to be accounted for. > > > > > > Tested with the generic "gputop" tool currently available as patches to > > > igt, a sample run with this patchset looks like this: > > > > > > DRM minor 128 > > > PID NAME gp pp > > > 4322 glmark2-es2-way |█████▊ ||██████████████████ | > > > 3561 weston |▎ ||███▌ | > > > 4159 Xwayland |▏ ||▉ | > > > 4154 glxgears |▏ ||▎ | > > > 3661 firefox |▏ ||▏ | > > > > > > > > > Erico Nunes (3): > > > drm/lima: add usage counting method to ctx_mgr > > > drm/lima: allocate unique id per drm_file > > > drm/lima: add show_fdinfo for drm usage stats > > > > > > drivers/gpu/drm/lima/lima_ctx.c | 30 ++++++++++++++++++++- > > > drivers/gpu/drm/lima/lima_ctx.h | 3 +++ > > > drivers/gpu/drm/lima/lima_device.h | 3 +++ > > > drivers/gpu/drm/lima/lima_drv.c | 43 +++++++++++++++++++++++++++++- > > > drivers/gpu/drm/lima/lima_drv.h | 1 + > > > 5 files changed, 78 insertions(+), 2 deletions(-) > > > > > > -- > > > 2.39.2 > > >