All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Arkadiusz Hiler <arkadiusz.hiler@intel.com>,
	igt-dev@lists.freedesktop.org
Cc: Leo Liu <Leo.Liu@amd.com>, Petri Latvala <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 0/4] device selection && lsgpu
Date: Tue, 12 Nov 2019 10:14:13 +0000	[thread overview]
Message-ID: <58d24738-3f84-fcaf-ba74-4719d3d887fc@linux.intel.com> (raw)
In-Reply-To: <20191024110515.11741-1-arkadiusz.hiler@intel.com>


On 24/10/2019 12:05, Arkadiusz Hiler wrote:
> Hey,
> 
> This series aims to make running IGT on hosts with multiple GPUs manageable
> without the need to unload modules / unbind devices.
> 
> Suggested reviewing order:
>   * lsgpu
>   * igt_core && drm_test changes
>   * implementation internals in igt_device_scan.c
> 
> Changes since Zbigniew's last revision:
>   * rewritten most of the parts that were using glib
>   * removed multiple filter support - this will be added back when the need
>     arises
>   * we don't second guess the "chipset" of the device and just let the underlying
>     open to fail if it has to
>   * extra looging around opening device when filter is set
>   * sysfs filter now has it's own prefix
>   * no "platform" filter - sysfs should suffice for now, it can be added by
>     someone more knowledgeable if the need arises
> 
> TODO:
>   * API for opening multiple devices in a single test (e.g. for prime) - I don't
>     want to design this upfront
> 
> Example usage:
>    $ build/tools/lsgpu
>    sys:/sys/devices/pci0000:00/0000:00:02.0/drm/card0
>        subsystem       : drm
>        drm card        : /dev/dri/card0
>        parent          : sys:/sys/devices/pci0000:00/0000:00:02.0
> 
>    sys:/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128
>        subsystem       : drm
>        drm render      : /dev/dri/renderD128
>        parent          : sys:/sys/devices/pci0000:00/0000:00:02.0
> 
>    sys:/sys/devices/platform/vgem/drm/card1
>        subsystem       : drm
>        drm card        : /dev/dri/card1
>        parent          : sys:/sys/devices/platform/vgem
> 
>    sys:/sys/devices/platform/vgem/drm/renderD129
>        subsystem       : drm
>        drm render      : /dev/dri/renderD129
>        parent          : sys:/sys/devices/platform/vgem
> 
>    sys:/sys/devices/pci0000:00/0000:00:02.0
>        subsystem       : pci
>        drm card        : /dev/dri/card0
>        drm render      : /dev/dri/renderD128
>        vendor          : 8086
>        device          : 5927
> 
>    sys:/sys/devices/platform/vgem
>        subsystem       : platform
>        drm card        : /dev/dri/card1
>        drm render      : /dev/dri/renderD129
> 
>    $ build/tools/lsgpu -d "sys:/sys/devices/pci0000:00/0000:00:02.0"
>    Notice: Using --device filters
>    === Device filter ===
>    sys:/sys/devices/pci0000:00/0000:00:02.0
> 
>    === Testing device open ===
>    Device detail:
>    subsystem   : pci
>    drm card    : /dev/dri/card0
>    drm render  : /dev/dri/renderD128
>    Device /dev/dri/card0 successfully opened
>    Device /dev/dri/renderD128 successfully opened
>    -------------------------------------------
> 
>    # build/tests/core_auth --run-subtest getclient-simple --device "pci:vendor=intel"
>    IGT-Version: 1.24-g64068440 (x86_64) (Linux: 5.3.7-250.vanilla.knurd.1.fc30.x86_64 x86_64)
>    Starting subtest: getclient-simple
>    Looking for devices to open using filter: pci:vendor=intel
>    Filter matched /dev/dri/card0 | /dev/dri/renderD128
>    Looking for devices to open using filter: pci:vendor=intel
>    Filter matched /dev/dri/card0 | /dev/dri/renderD128 >    Subtest getclient-simple: SUCCESS (0.007s)

Looks very usable!

Can I be cheeky and ask if you could also cover the existing tools 
(especially intel_gpu_top (VLK-5588))?

Plus I would need a helper to get the selected device PCI string to use 
with i915 PMU? There I'd need to get a string like "0000:01:00.0" since 
the i915 PMU registers the device as either:


"/sys/bus/event_source/devices/i915" for integrated.

Or:

"/sys/bus/event_source/devices/i915-0000:01:00.0" for discrete.

So I am thinking something like igt_device_get_pci_string() could work 
for lib/igt_perf.c/i915_type_id().

Regards,

Tvrtko

> 
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> Cc: Leo Liu <Leo.Liu@amd.com>
> 
> Arkadiusz Hiler (1):
>    lib/igt_list: Update, clean-up and document igt_list
> 
> Zbigniew Kempczyński (3):
>    Introduce device selection API
>    Introduce device selection lsgpu tool
>    Add device selection in IGT
> 
>   benchmarks/gem_wsim.c                         |    6 +-
>   .../igt-gpu-tools/igt-gpu-tools-docs.xml      |    2 +
>   .../igt-gpu-tools/igt_test_programs.xml       |    7 +
>   lib/Makefile.sources                          |    4 +
>   lib/drmtest.c                                 |   94 +-
>   lib/drmtest.h                                 |    2 +
>   lib/igt_chamelium.c                           |    2 +-
>   lib/igt_core.c                                |   51 +-
>   lib/igt_device_scan.c                         | 1199 +++++++++++++++++
>   lib/igt_device_scan.h                         |   67 +
>   lib/igt_dummyload.c                           |    4 +-
>   lib/igt_kmod.c                                |    2 +-
>   lib/igt_list.c                                |   66 +
>   lib/igt_list.h                                |  165 ++-
>   lib/meson.build                               |    2 +
>   tests/i915/gem_exec_balancer.c                |    2 +-
>   tests/vc4_purgeable_bo.c                      |    6 +-
>   tools/Makefile.sources                        |    1 +
>   tools/lsgpu.c                                 |  295 ++++
>   tools/meson.build                             |    1 +
>   20 files changed, 1873 insertions(+), 105 deletions(-)
>   create mode 100644 lib/igt_device_scan.c
>   create mode 100644 lib/igt_device_scan.h
>   create mode 100644 lib/igt_list.c
>   create mode 100644 tools/lsgpu.c
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-11-12 10:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 11:05 [igt-dev] [PATCH i-g-t 0/4] device selection && lsgpu Arkadiusz Hiler
2019-10-24 11:05 ` [igt-dev] [PATCH i-g-t 1/4] lib/igt_list: Update, clean-up and document igt_list Arkadiusz Hiler
2019-10-24 11:16   ` Chris Wilson
2019-10-24 11:20     ` Arkadiusz Hiler
2019-10-24 11:23       ` Chris Wilson
2019-10-24 11:05 ` [igt-dev] [PATCH i-g-t 2/4] Introduce device selection API Arkadiusz Hiler
     [not found]   ` <20191024164030.GA7823@zkempczy-mobl2>
2019-10-28 13:06     ` Arkadiusz Hiler
2019-11-15 13:31   ` Petri Latvala
2019-11-18 11:55   ` Petri Latvala
2019-10-24 11:05 ` [igt-dev] [PATCH i-g-t 3/4] Introduce device selection lsgpu tool Arkadiusz Hiler
2019-10-24 13:06   ` Chris Wilson
2019-10-28 11:21     ` Arkadiusz Hiler
2019-11-18 11:58   ` Petri Latvala
2019-10-24 11:05 ` [igt-dev] [PATCH i-g-t 4/4] Add device selection in IGT Arkadiusz Hiler
2019-11-18 12:14   ` Petri Latvala
2019-11-19 14:18     ` Arkadiusz Hiler
2019-11-20  9:31   ` Petri Latvala
2019-10-24 13:00 ` [igt-dev] ✓ Fi.CI.BAT: success for device selection && lsgpu Patchwork
2019-10-25 17:07 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-11-12 10:14 ` Tvrtko Ursulin [this message]
2019-12-02 12:37   ` [igt-dev] [PATCH i-g-t 0/4] " Arkadiusz Hiler
2019-12-03 13:59     ` Tvrtko Ursulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58d24738-3f84-fcaf-ba74-4719d3d887fc@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Leo.Liu@amd.com \
    --cc=arkadiusz.hiler@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.