From patchwork Thu Oct 18 15:27:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10647489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B3B6915E2 for ; Thu, 18 Oct 2018 15:28:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A466A28C20 for ; Thu, 18 Oct 2018 15:28:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 976F028D0C; Thu, 18 Oct 2018 15:28:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C661B28C20 for ; Thu, 18 Oct 2018 15:28:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 536E0894A7; Thu, 18 Oct 2018 15:28:26 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id B2B5F894A7 for ; Thu, 18 Oct 2018 15:28:24 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id y144-v6so733917wmd.4 for ; Thu, 18 Oct 2018 08:28:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=K4Txp2ri9LZZruXfFjK2g8xlvoQVG3SASx2iOfDITP0=; b=QaWX6Jkv2GS+FJ0rrcqTQxSbDIM58OJlRNYhjbPPiNPdx0th1+JA6GPjqxS5ZYNjTd C3H55Ltjb7o5BglozrSm9vSDW3H/OuUF+Yc3Er6EAPcfMgrYKf+xu0N10zW43iF7nel5 L73ULXSHFmEerVg1mdBJ4nfwvF2shdAas7THNCq5HAAcnC88rG+2IwpZtJfHB1ODv829 pLB4JXBgkQiqpumEkDjTaqIKEqNJALgCLmrCu3sPDt5RNQgrxe8POa2P51VIaJULkBND tXGTkFu81fanyEpYLtHjnSbdkOMyAViE67uwZnr4FxafK3A3n16TKdzDbD4M4EpBHnap VPZg== X-Gm-Message-State: AGRZ1gKheFnyiqazIOYZXm1L94HMDh4xPGX2mArGoP4kTZSdePW++D9r +TnWxTHRZvZfCDqDsQc3Pl/pfw== X-Google-Smtp-Source: ACcGV62RglIE8II98+O7qrfJD+qC3AiTk2u1IqGYRc9cKzeGE4EIN1XJUXSvxCrN4ZogYnN72lY6Bw== X-Received: by 2002:a1c:85d0:: with SMTP id h199-v6mr775506wmd.127.1539876503281; Thu, 18 Oct 2018 08:28:23 -0700 (PDT) Received: from localhost.localdomain ([91.110.193.16]) by smtp.gmail.com with ESMTPSA id i6-v6sm19530387wrq.4.2018.10.18.08.28.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 08:28:22 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Thu, 18 Oct 2018 16:27:58 +0100 Message-Id: <20181018152815.31816-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 Subject: [Intel-gfx] [PATCH i-g-t 00/17] Media scalability tooling X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Intel-gfx@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin A bunch of patches to trace.pl and gem_wsim which enable simulation and load balancing analysis of the Virtual Engine work done separately by Chris Wilson. Culmination is being able to simulate a so called frame split media workloads. Example workload for this looks like this (annotated only for cover letter): X.1.0 ; disable preemption on context 1 M.1.VCS1 ; configure engine map on context 1 B.1 ; turn on load balancing on context 1 X.2.0 ; \ M.2.VCS2 ; -> same as above but for context 2 B.2 ; / b.2.1.VCS1 ; bond VCS2 in context 2 with VCS1 f ; create an unsignaled fence 1.DEFAULT.*.f-1.0 ; submit an infinite batch to ctx 1, with input fence 2.DEFAULT.4000-6000.s-1.0 ; submit a 4-6ms batch to ctx 2, with submit fence from the previous step a.-3 ; advance the fence created 3 lines above s.-2 ; wait for ctx 2 batch to complete T.-4 ; terminate ctx 1 infinite batch 3.RCS.2000-4000.-5/-4.0 ; submit 2-4ms ctx 3 batch to RCS, with data dependencies 3.VECS.2000.-1.0 ; submit 2ms ctx 3 batch to VECS, data dependency on previous batch 4.BCS.1000.-1.0 ; submit 1ms ctx 4 batch to BCS, data dependency on previous batch s.-2 ; wait for ctx 3 batch to complete p.16667 ; start next iteration to hit 60fps simulation And can be run for instance like this: ./gem_wsim -n -w wsim/frame_split_60fps.wsim -r 60 -c 3 This runs three clients of the same workload, 60 iterations each. This can then also be captured with trace.pl and a HTML representation of the execution timeline analysed: ../scripts/trace.pl --trace ./gem_wsim ... perf script | ../scripts/trace.pl -s -c --gpu-timeline --html >timeline.html [Vis npm module is required to be present in the same directory as the HTML ] [file, see trace.pl --help for instructions. ] Tvrtko Ursulin (17): lib: Update uapi headers trace.pl: Virtual engine support trace.pl: Virtual engine preemption support wsim/media-bench: i915 balancing gem_wsim: Use IGT uapi headers gem_wsim: Fix shadowed local gem_wsim: Factor out common error handling gem_wsim: More wsim_err gem_wsim: Submit fence support gem_wsim: Extract str to engine lookup gem_wsim: Engine map support gem_wsim: Save some lines by changing to implicit NULL checking gem_wsim: Compact int command parsing with a macro gem_wsim: Engine map load balance command gem_wsim: Engine bond command gem_wsim: Some more example workloads gem_wsim: Infinite batch support benchmarks/gem_wsim.c | 1060 +++++++++++++------ benchmarks/wsim/README | 111 +- benchmarks/wsim/frame-split-60fps.wsim | 18 + benchmarks/wsim/high-composited-game.wsim | 11 + benchmarks/wsim/media-1080p-player.wsim | 5 + benchmarks/wsim/medium-composited-game.wsim | 9 + include/drm-uapi/amdgpu_drm.h | 52 +- include/drm-uapi/drm.h | 16 + include/drm-uapi/drm_fourcc.h | 224 ++++ include/drm-uapi/drm_mode.h | 26 +- include/drm-uapi/etnaviv_drm.h | 6 + include/drm-uapi/exynos_drm.h | 240 +++++ include/drm-uapi/i915_drm.h | 239 ++++- include/drm-uapi/msm_drm.h | 2 + include/drm-uapi/sync_file.h | 98 -- include/drm-uapi/tegra_drm.h | 492 ++++++++- include/drm-uapi/v3d_drm.h | 194 ++++ include/drm-uapi/vc4_drm.h | 13 +- include/drm-uapi/virtgpu_drm.h | 1 + include/drm-uapi/vmwgfx_drm.h | 166 ++- scripts/media-bench.pl | 9 +- scripts/trace.pl | 244 ++++- 22 files changed, 2705 insertions(+), 531 deletions(-) create mode 100644 benchmarks/wsim/frame-split-60fps.wsim create mode 100644 benchmarks/wsim/high-composited-game.wsim create mode 100644 benchmarks/wsim/media-1080p-player.wsim create mode 100644 benchmarks/wsim/medium-composited-game.wsim delete mode 100644 include/drm-uapi/sync_file.h create mode 100644 include/drm-uapi/v3d_drm.h