Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp899440rwl; Wed, 12 Apr 2023 05:50:52 -0700 (PDT) X-Google-Smtp-Source: AKy350a2JOJZvBVcD/rukYIZtTnji0P2I9E7uD8HEyrrDWWH4uN2fNKSg+uQ9g8lLW0CSTZ7GezQ X-Received: by 2002:a17:906:b241:b0:931:bc4a:ce08 with SMTP id ce1-20020a170906b24100b00931bc4ace08mr15865255ejb.36.1681303852139; Wed, 12 Apr 2023 05:50:52 -0700 (PDT) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa40-20020a1709076d2800b0094a784e8a90si1773433ejc.957.2023.04.12.05.50.24; Wed, 12 Apr 2023 05:50:52 -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=STJIzRIF; arc=fail (signature failed); 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 S230502AbjDLMsX (ORCPT + 99 others); Wed, 12 Apr 2023 08:48:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230142AbjDLMsJ (ORCPT ); Wed, 12 Apr 2023 08:48:09 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B37F286A2; Wed, 12 Apr 2023 05:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681303653; x=1712839653; h=date:from:to:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=k8CTtmTgd1tuOukuXQD5U9SP64IDGSAxFh2QAKhMw2o=; b=STJIzRIFPuReUD3dgU/BSVa2yWrd8+04r/gENAba4hM7jrOiKozOO+8U VssvFIIQsteV5buCxXG1IJckTDWdrGBJtgAQmdOSPRb7BayKS6+EpQuyc 8BpA2HNQXfbQSWjoI9JTZ1PCusasGTU0Q0sqhfmRO7devrPkUo6dwEb5T 6AKjg8g9h7F+6noFoKV8gZjBG2RXJMbXCC70lxRTFGqfABFETi1u6Ymcp x3rfbqymqPhhGfrXOGmFIbZUekdWkUFUczzsEkBaesEAFytsOGsXR9qkg LtDPB3w6KEHlhWPNHW/c7nPQiVj8DTfDkuFzZD+0s1KlP/90nYv239imU g==; X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="430168075" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="430168075" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 05:47:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="812972574" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="812972574" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP; 12 Apr 2023 05:47:26 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 12 Apr 2023 05:47:26 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Wed, 12 Apr 2023 05:47:26 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Wed, 12 Apr 2023 05:47:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OfnSDB/dPEB8e8cTUMMnz2ra0swWEOTvuqAQPqgQG8+VBLemTkBZV3ouyZbDdFY4PjkmApbDyYyTvIzG/NWRSBHUu0CwRfEKu3QffcsPHfOzTZRG3Vr8xk0VYcIEUOZ1NCjRN0Ru+v6yRCI1BnvXwMA6j3oJyGVPiSDvqfZKsVBmqYwiwA96Nm1bPHSfjGBl5Riw/gkUtDDPKTPKzkKGPDoTChZugdxmHc8q3sTN67VlfcCh4idwo48rVaPhXFkhCuRNL57wXO7Jz3Dz85GvZG8zIkBJPbTGrM18OXJRYFqKO55KLSsiRYeFwZfBANOoq2HWkVEeXtbQ+Kuemt7hjw== 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=2dJLaGjF0t2COFSVjQBXAuz/SwXEjoEJgTbPa/ux2MM=; b=RS4xYB0N6coFaqm2CNjfP/7kHW0eE1CqXafnKoACdnXTV7O9YFJTrybSNhtFYpm6ctPDjC8VS7vxBy65iWRJS64Fp0d4hK+n6pBZwWVsqzHMf2aKogAqY8RdsY6sEln1pnsN+yZ4nudFPYT5dlv9/UGjnft0iBjrAGrTaqJhCpy0d02eoU5J3w+Dgt9LRfSah2jWdTV1KQjJI42M+5KgwhqxrhXA6oWhtToKmO7kb6FoSLO/8YbeJcNBH//e+FEpyWDzZMeg4ihtPG2ru3SJiutuIYqpy/6b6iZnLiY4v5TGQ5K+l3dgYRTGgQ5zLfldpc2vJbsFyoa9gDQfSFWboQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MN0PR11MB6059.namprd11.prod.outlook.com (2603:10b6:208:377::9) by SN7PR11MB7993.namprd11.prod.outlook.com (2603:10b6:806:2e5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Wed, 12 Apr 2023 12:47:17 +0000 Received: from MN0PR11MB6059.namprd11.prod.outlook.com ([fe80::2b57:646c:1b01:cd18]) by MN0PR11MB6059.namprd11.prod.outlook.com ([fe80::2b57:646c:1b01:cd18%6]) with mapi id 15.20.6277.036; Wed, 12 Apr 2023 12:47:17 +0000 Date: Wed, 12 Apr 2023 08:47:11 -0400 From: Rodrigo Vivi To: Dmitry Baryshkov , Rob Clark , , Rob Clark , Tvrtko Ursulin , "open list:DOCUMENTATION" , , Emil Velikov , Christopher Healy , open list , Sean Paul , Boris Brezillon , Subject: Re: [Freedreno] [PATCH v2 0/2] drm: fdinfo memory stats Message-ID: References: <20230410210608.1873968-1-robdclark@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: SJ0PR05CA0180.namprd05.prod.outlook.com (2603:10b6:a03:339::35) To MN0PR11MB6059.namprd11.prod.outlook.com (2603:10b6:208:377::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR11MB6059:EE_|SN7PR11MB7993:EE_ X-MS-Office365-Filtering-Correlation-Id: 94956e75-031a-4b46-c403-08db3b540c15 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8XCQN7Rts+Dbe7BoqjvAUuSUUuVoQL6k7pRWHNTiaoCh0V1XVTA5Nbp7AGmXFctl8LCyFzixFpo+Nz9/chpAWVX7iexg+6NfXCxD6UxeS/nhRIn47N7FXJMBJJbqd8jY9MvavaI7KH2H6PYsprjrvQwIL5qFV7kJoYXu4mucaPAhMYMICGGw/91TaUHWyeGwal6TlxO/L83E33Fr6ivs0OAflVZuSaJ4htpqRuhVnCBtvT6tbz2hbq81P1Sj5Ru6Zbt8tyXxBJCnr0CIc6fa5vPFilxzVUZp8/TwVW/Rlj8KtDr1JOGQAHduCLbFcawfoRvoE03XTM2mmutYJmoY5Fbgb6zNn+zwmaw0AxOkghrwilCjtN0x1UP7ox99gp9MHjYOv0qhkUIS9c8q7SMrWwggkDmMdyOYq4KajUnD+OnJk3N/CRDXxaU+Y98NHRwmgYPwOJl72MIXNtT1J4F5wfQkuGC4HuVSA6T6K4Ransoia3GI3L36zsl+6OjFPB8zNyPilAL/DMZXnlwsfO4YKJxjE3SDrlbKgeJ6XS7pELQk9g4vCoXp+c8bs4eR7PQFFvbCQjBWjTvmXLZjfE7uAquUCBs65JvcV5wX1N9rdA3AUnL10okGda9tgzqm5sUG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR11MB6059.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(136003)(396003)(346002)(376002)(366004)(451199021)(44832011)(66899021)(82960400001)(7416002)(38100700002)(5660300002)(8936002)(2906002)(53546011)(2616005)(966005)(26005)(6506007)(921005)(110136005)(6512007)(36756003)(41300700001)(86362001)(66946007)(186003)(316002)(66476007)(8676002)(66556008)(478600001)(6486002)(6666004)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exch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zhMME8wNnRrMys1YS9SVFpqQUg2OWpPSFhTTVNIUjRwbHA3K1hKU0Fs?= =?utf-8?B?cW5Cc1pmcTBhRmllUWxwUnZabEI5QUdScFZiRlRzVTQxdGVwODdZWFVyeDhw?= =?utf-8?B?OENVTDhPTmtpZjkrckVZamc5d2NZTEh0eG50cUx2VFVWRnJEVUlWaXV3a3Vp?= =?utf-8?B?cmt3eW50VVNMbWRCN3pscGhyU08yNkdXcVRMWmQzVlc0a0NnSVVJd3hOL0py?= =?utf-8?B?eDJvWVVYbVU5VnBpVUVWR2pTVXdOTTFmcDQrOW9WOXZnNnExUGlLeHRaM0t0?= =?utf-8?B?cG1KWk9JRXd5QmphUno5bkxMcFdjL0N5ZnJTVVBYenBaTmM2T2ZZdTlvWmZT?= =?utf-8?Q?M1Bej8CIY5JOQjNcJdfi6nrnY?= X-MS-Exchange-CrossTenant-Network-Message-Id: 94956e75-031a-4b46-c403-08db3b540c15 X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6059.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2023 12:47:17.3856 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: X383OXT6asuvVofrJnncuPCPd7UpM8wJeUApPuAOK4QBmz2/YiAy8XaBK0xW+NXPNUZp/gBWMm6Mng5qAiNo1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7993 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Wed, Apr 12, 2023 at 10:11:32AM +0200, Daniel Vetter wrote: > On Wed, Apr 12, 2023 at 01:36:52AM +0300, Dmitry Baryshkov wrote: > > On 11/04/2023 21:28, Rob Clark wrote: > > > On Tue, Apr 11, 2023 at 10:36 AM Dmitry Baryshkov > > > wrote: > > > > > > > > On Tue, 11 Apr 2023 at 20:13, Rob Clark wrote: > > > > > > > > > > On Tue, Apr 11, 2023 at 9:53 AM Daniel Vetter wrote: > > > > > > > > > > > > On Tue, Apr 11, 2023 at 09:47:32AM -0700, Rob Clark wrote: > > > > > > > On Mon, Apr 10, 2023 at 2:06 PM Rob Clark wrote: > > > > > > > > > > > > > > > > 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) > > > > > > > > > > > > I think that's a bit much layering violation, we'd essentially have to > > > > > > reinvent the hwmon sysfs uapi in fdinfo. Not really a business I want to > > > > > > be in :-) > > > > > > > > > > I guess this is true for temp (where there are thermal zones with > > > > > potentially multiple temp sensors.. but I'm still digging my way thru > > > > > the thermal_cooling_device stuff) > > > > > > > > It is slightly ugly. All thermal zones and cooling devices are virtual > > > > devices (so, even no connection to the particular tsens device). One > > > > can either enumerate them by checking > > > > /sys/class/thermal/thermal_zoneN/type or enumerate them through > > > > /sys/class/hwmon. For cooling devices again the only enumeration is > > > > through /sys/class/thermal/cooling_deviceN/type. > > > > > > > > Probably it should be possible to push cooling devices and thermal > > > > zones under corresponding providers. However I do not know if there is > > > > a good way to correlate cooling device (ideally a part of GPU) to the > > > > thermal_zone (which in our case is provided by tsens / temp_alarm > > > > rather than GPU itself). > > > > > > > > > > > > > > But what about freq? I think, esp for cases where some "fw thing" is > > > > > controlling the freq we end up needing to use gpu counters to measure > > > > > the freq. > > > > > > > > For the freq it is slightly easier: /sys/class/devfreq/*, devices are > > > > registered under proper parent (IOW, GPU). So one can read > > > > /sys/class/devfreq/3d00000.gpu/cur_freq or > > > > /sys/bus/platform/devices/3d00000.gpu/devfreq/3d00000.gpu/cur_freq. > > > > > > > > However because of the components usage, there is no link from > > > > /sys/class/drm/card0 > > > > (/sys/devices/platform/soc@0/ae00000.display-subsystem/ae01000.display-controller/drm/card0) > > > > to /sys/devices/platform/soc@0/3d00000.gpu, the GPU unit. > > > > > > > > Getting all these items together in a platform-independent way would > > > > be definitely an important but complex topic. > > > > > > But I don't believe any of the pci gpu's use devfreq ;-) > > > > > > And also, you can't expect the CPU to actually know the freq when fw > > > is the one controlling freq. We can, currently, have a reasonable > > > approximation from devfreq but that stops if IFPC is implemented. And > > > other GPUs have even less direct control. So freq is a thing that I > > > don't think we should try to get from "common frameworks" > > > > I think it might be useful to add another passive devfreq governor type for > > external frequencies. This way we can use the same interface to export > > non-CPU-controlled frequencies. > > Yeah this sounds like a decent idea to me too. It might also solve the fun > of various pci devices having very non-standard freq controls in sysfs > (looking at least at i915 here ...) I also like the idea of having some common infrastructure for the GPU freq. hwmon have a good infrastructure, but they are more focused on individual monitoring devices and not very welcomed to embedded monitoring and control. I still want to check the opportunity to see if at least some freq control could be aligned there. Another thing that complicates that is that there are multiple frequency domains and controls with multipliers in Intel GPU that are not very standard or easy to integrate. On a quick glace this devfreq seems neat because it aligns with the cpufreq and governors. But again it would be hard to align with the multiple domains and controls. But it deserves a look. I will take a look to both fronts for Xe: hwmon and devfreq. Right now on Xe we have a lot less controls than i915, but I can imagine soon there will be requirements to make that to grow and I fear that we end up just like i915. So I will take a look before that happens. > > I guess it would minimally be a good idea if we could document this, or > maybe have a reference implementation in nvtop or whatever the cool thing > is rn. > -Daniel > > > > > > > > > BR, > > > -R > > > > > > > > > > > > > > What might be needed is better glue to go from the fd or fdinfo to the > > > > > > right hw device and then crawl around the hwmon in sysfs automatically. I > > > > > > would not be surprised at all if we really suck on this, probably more > > > > > > likely on SoC than pci gpus where at least everything should be under the > > > > > > main pci sysfs device. > > > > > > > > > > yeah, I *think* userspace would have to look at /proc/device-tree to > > > > > find the cooling device(s) associated with the gpu.. at least I don't > > > > > see a straightforward way to figure it out just for sysfs > > > > > > > > > > BR, > > > > > -R > > > > > > > > > > > -Daniel > > > > > > > > > > > > > > > > > > > > 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 > > > > > > > > > > > > > > > > > > > > -- > > > > > > Daniel Vetter > > > > > > Software Engineer, Intel Corporation > > > > > > http://blog.ffwll.ch > > > > > > > > > > > > > > > > -- > > > > With best wishes > > > > Dmitry > > > > -- > > With best wishes > > Dmitry > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch