Message ID | 20191025142131.17378-1-tvrtko.ursulin@linux.intel.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <SRS0=2i6+=YS=lists.freedesktop.org=intel-gfx-bounces@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D71AC139A for <patchwork-intel-gfx@patchwork.kernel.org>; Fri, 25 Oct 2019 14:21:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE94C21D71 for <patchwork-intel-gfx@patchwork.kernel.org>; Fri, 25 Oct 2019 14:21:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE94C21D71 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6320B6EA51; Fri, 25 Oct 2019 14:21:37 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FA6689DE5 for <Intel-gfx@lists.freedesktop.org>; Fri, 25 Oct 2019 14:21:35 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2019 07:21:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,228,1569308400"; d="scan'208";a="202618168" Received: from mdlugoke-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.251.81.75]) by orsmga006.jf.intel.com with ESMTP; 25 Oct 2019 07:21:33 -0700 From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> To: Intel-gfx@lists.freedesktop.org Date: Fri, 25 Oct 2019 15:21:26 +0100 Message-Id: <20191025142131.17378-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Intel-gfx] [RFC 0/5] Per client engine busyness (all aboard the sysfs train!) X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development <intel-gfx.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/intel-gfx> List-Post: <mailto:intel-gfx@lists.freedesktop.org> List-Help: <mailto:intel-gfx-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" <intel-gfx-bounces@lists.freedesktop.org> |
Series |
Per client engine busyness (all aboard the sysfs train!)
|
expand
|
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> It was quite some time since I last posted this RFC, but recently there has been some new interest, this time from OpenCL and related customers, so I decided to give it a quick respin and test the waters. This time round it has been really hastily rebased since the upstream changed quite a lot and I have very little confidence it is technically correct. But it is enough to illustrate a point of what this feature could provide: In short it enables a "top-like" display for GPU tasks. Or with a screenshot: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ intel-gpu-top - 948/ 999 MHz; 0% RC6; 3.65 Watts; 2165 irqs/s IMC reads: 5015 MiB/s IMC writes: 143 MiB/s ENGINE BUSY MI_SEMA MI_WAIT Render/3D/0 56.60% |███████████████████████████▋ | 0% 0% Blitter/0 95.65% |██████████████████████████████████████████████▊ | 0% 0% Video/0 40.92% |████████████████████ | 0% 0% VideoEnhance/0 0.00% | | 0% 0% PID NAME RCS BCS VCS VECS 5347 gem_wsim |███████▍ ||███████████████▏||██████▌ || | 4929 Xorg |▎ || || || | 5305 glxgears | || || || | 5303 glxgears | || || || | 5024 xfwm4 | || || || | 4929 Xorg | || || || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Implementation wise we would get a a bunch of per-drm-client-per-engine-class files in sysfs like: # cd /sys/class/drm/card0/clients/ # tree . ├── 7 │ ├── busy │ │ ├── 0 │ │ ├── 1 │ │ ├── 2 │ │ └── 3 │ ├── name │ └── pid ├── 8 │ ├── busy │ │ ├── 0 │ │ ├── 1 │ │ ├── 2 │ │ └── 3 │ ├── name │ └── pid ├── 9 │ ├── busy │ │ ├── 0 │ │ ├── 1 │ │ ├── 2 │ │ └── 3 │ ├── name │ └── pid └── enable_stats I will post the corresponding patch to intel_gpu_top for reference as well. Tvrtko Ursulin (5): drm/i915: Track per-context engine busyness drm/i915: Expose list of clients in sysfs drm/i915: Update client name on context create drm/i915: Expose per-engine client busyness drm/i915: Add sysfs toggle to enable per-client engine stats drivers/gpu/drm/i915/gem/i915_gem_context.c | 17 +- drivers/gpu/drm/i915/gt/intel_context.c | 20 ++ drivers/gpu/drm/i915/gt/intel_context.h | 9 + drivers/gpu/drm/i915/gt/intel_context_types.h | 9 + drivers/gpu/drm/i915/gt/intel_engine_cs.c | 16 +- drivers/gpu/drm/i915/gt/intel_lrc.c | 66 +++++- drivers/gpu/drm/i915/i915_drv.h | 38 +++ drivers/gpu/drm/i915/i915_gem.c | 218 +++++++++++++++++- drivers/gpu/drm/i915/i915_sysfs.c | 81 +++++++ 9 files changed, 451 insertions(+), 23 deletions(-)