lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231007194747.788934-1-dmitry.osipenko@collabora.com>
Date:   Sat,  7 Oct 2023 22:47:46 +0300
From:   Dmitry Osipenko <dmitry.osipenko@...labora.com>
To:     David Airlie <airlied@...hat.com>,
        Gerd Hoffmann <kraxel@...hat.com>,
        Gurchetan Singh <gurchetansingh@...omium.org>,
        Chia-I Wu <olvaffe@...il.com>, Rob Clark <robdclark@...il.com>,
        Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@....com>
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        kernel@...labora.com, virtualization@...ts.linux-foundation.org
Subject: [RFC PATCH v1 0/1]  Support passing VirtIO-GPU fences to host for waiting

Today's VirtIO-GPU driver always has to wait for in-fences on the guest
side, creating bottleneck for workloads that produce lots of job submissions
or require lower submission latency. This bottleneck is caused by a need
to do extra round trips between host and guest for the fence signalling.

The solution is to move fence signalling and waiting entierly to the host
side, where it can be done more efficiently, without holding the guest side.
The proposed patch introduces new "fence passing" VirtIO-GPU protocol
feature, which extends VIRTIO_GPU_CMD_SUBMIT_3D with array of in-fence IDs
that are passed from guest to host along with the 3D commands. Host then
takes the in-fence IDs and passes them to virglrender, where the fence IDs
are resolved into sync file fences and handled (waited) by a corresponding
virglrender context.

The patch is RFC because we want to do more testing with crosvm and
CrOS first, support fence-passing for Venus and virtio-wl. The new
virglrender experimental fence-passing API already has been merged [1]
and crosvm support began to pick it up [2]. Qemu patch is available at [3].

Fence passing was tested using WIP amdgpu and intel native contexts,
where it proved to be useful by increasing FPS up to 3x times.

[1] https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1138
[2] https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4679609
[3] https://gitlab.freedesktop.org/digetx/qemu/-/commits/native-context-iris

Dmitry Osipenko (1):
  drm/virtio: Support fence-passing feature

 drivers/gpu/drm/virtio/virtgpu_drv.c    |  1 +
 drivers/gpu/drm/virtio/virtgpu_drv.h    | 11 ++-
 drivers/gpu/drm/virtio/virtgpu_fence.c  | 15 +++-
 drivers/gpu/drm/virtio/virtgpu_ioctl.c  | 11 ++-
 drivers/gpu/drm/virtio/virtgpu_kms.c    |  8 +-
 drivers/gpu/drm/virtio/virtgpu_submit.c | 99 ++++++++++++++++++++++++-
 drivers/gpu/drm/virtio/virtgpu_vq.c     |  7 +-
 include/uapi/drm/virtgpu_drm.h          |  3 +
 include/uapi/linux/virtio_gpu.h         | 11 ++-
 9 files changed, 152 insertions(+), 14 deletions(-)

-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ