From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, airlied@linux.ie,
daniel.vetter@intel.com, seanpaul@chromium.org,
gustavo@padovan.org, jgross@suse.com, boris.ostrovsky@oracle.com,
konrad.wilk@oracle.com
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
Dongwon Kim <dongwon.kim@intel.com>,
"Potrola, MateuszX" <mateuszx.potrola@intel.com>,
Matt Roper <matthew.d.roper@intel.com>,
Artem Mygaiev <Artem_Mygaiev@epam.com>
Subject: Re: [PATCH 0/1] drm/xen-zcopy: Add Xen zero-copy helper DRM driver
Date: Mon, 16 Apr 2018 17:33:46 +0300 [thread overview]
Message-ID: <5d8fec7f-956c-378f-be90-f45029385740@gmail.com> (raw)
In-Reply-To: <20180329131931.29957-1-andr2000@gmail.com>
Hello, all!
After discussing xen-zcopy and hyper-dmabuf [1] approaches
it seems that xen-zcopy can be made not depend on DRM core any more
and be dma-buf centric (which it in fact is).
The DRM code was mostly there for dma-buf's FD import/export
with DRM PRIME UAPI and with DRM use-cases in mind, but it comes out that if
the proposed 2 IOCTLs (DRM_XEN_ZCOPY_DUMB_FROM_REFS and
DRM_XEN_ZCOPY_DUMB_TO_REFS)
are extended to also provide a file descriptor of the corresponding
dma-buf, then
PRIME stuff in the driver is not needed anymore.
That being said, xen-zcopy can safely be detached from DRM and moved from
drivers/gpu/drm/xen into drivers/xen/dma-buf-backend(?).
This driver then becomes a universal way to turn any shared buffer
between Dom0/DomD
and DomU(s) into a dma-buf, e.g. one can create a dma-buf from any grant
references
or represent a dma-buf as grant-references for export.
This way the driver can be used not only for DRM use-cases, but also for
other
use-cases which may require zero copying between domains.
For example, the use-cases we are about to work in the nearest future
will use
V4L, e.g. we plan to support cameras, codecs etc. and all these will benefit
from zero copying much. Potentially, even block/net devices may benefit,
but this needs some evaluation.
I would love to hear comments for authors of the hyper-dmabuf
and Xen community, as well as DRI-Devel and other interested parties.
Thank you,
Oleksandr
On 03/29/2018 04:19 PM, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>
> Hello!
>
> When using Xen PV DRM frontend driver then on backend side one will need
> to do copying of display buffers' contents (filled by the
> frontend's user-space) into buffers allocated at the backend side.
> Taking into account the size of display buffers and frames per seconds
> it may result in unneeded huge data bus occupation and performance loss.
>
> This helper driver allows implementing zero-copying use-cases
> when using Xen para-virtualized frontend display driver by
> implementing a DRM/KMS helper driver running on backend's side.
> It utilizes PRIME buffers API to share frontend's buffers with
> physical device drivers on backend's side:
>
> - a dumb buffer created on backend's side can be shared
> with the Xen PV frontend driver, so it directly writes
> into backend's domain memory (into the buffer exported from
> DRM/KMS driver of a physical display device)
> - a dumb buffer allocated by the frontend can be imported
> into physical device DRM/KMS driver, thus allowing to
> achieve no copying as well
>
> For that reason number of IOCTLs are introduced:
> - DRM_XEN_ZCOPY_DUMB_FROM_REFS
> This will create a DRM dumb buffer from grant references provided
> by the frontend
> - DRM_XEN_ZCOPY_DUMB_TO_REFS
> This will grant references to a dumb/display buffer's memory provided
> by the backend
> - DRM_XEN_ZCOPY_DUMB_WAIT_FREE
> This will block until the dumb buffer with the wait handle provided
> be freed
>
> With this helper driver I was able to drop CPU usage from 17% to 3%
> on Renesas R-Car M3 board.
>
> This was tested with Renesas' Wayland-KMS and backend running as DRM master.
>
> Thank you,
> Oleksandr
>
> Oleksandr Andrushchenko (1):
> drm/xen-zcopy: Add Xen zero-copy helper DRM driver
>
> Documentation/gpu/drivers.rst | 1 +
> Documentation/gpu/xen-zcopy.rst | 32 +
> drivers/gpu/drm/xen/Kconfig | 25 +
> drivers/gpu/drm/xen/Makefile | 5 +
> drivers/gpu/drm/xen/xen_drm_zcopy.c | 880 ++++++++++++++++++++++++++++
> drivers/gpu/drm/xen/xen_drm_zcopy_balloon.c | 154 +++++
> drivers/gpu/drm/xen/xen_drm_zcopy_balloon.h | 38 ++
> include/uapi/drm/xen_zcopy_drm.h | 129 ++++
> 8 files changed, 1264 insertions(+)
> create mode 100644 Documentation/gpu/xen-zcopy.rst
> create mode 100644 drivers/gpu/drm/xen/xen_drm_zcopy.c
> create mode 100644 drivers/gpu/drm/xen/xen_drm_zcopy_balloon.c
> create mode 100644 drivers/gpu/drm/xen/xen_drm_zcopy_balloon.h
> create mode 100644 include/uapi/drm/xen_zcopy_drm.h
>
[1]
https://lists.xenproject.org/archives/html/xen-devel/2018-02/msg01202.html
next prev parent reply other threads:[~2018-04-16 14:33 UTC|newest]
Thread overview: 131+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 13:19 [PATCH 0/1] drm/xen-zcopy: Add Xen zero-copy helper DRM driver Oleksandr Andrushchenko
2018-03-29 13:19 ` Oleksandr Andrushchenko
2018-03-29 13:19 ` [PATCH 1/1] " Oleksandr Andrushchenko
2018-03-29 13:19 ` Oleksandr Andrushchenko
2018-03-29 13:19 ` Oleksandr Andrushchenko
2018-04-03 9:47 ` Daniel Vetter
2018-04-03 9:47 ` Daniel Vetter
2018-04-03 9:47 ` Daniel Vetter
2018-04-06 11:25 ` Oleksandr Andrushchenko
2018-04-06 11:25 ` Oleksandr Andrushchenko
2018-04-06 11:25 ` Oleksandr Andrushchenko
2018-04-09 8:27 ` Daniel Vetter
2018-04-09 8:27 ` Daniel Vetter
2018-04-09 8:27 ` Daniel Vetter
2018-04-16 14:33 ` Oleksandr Andrushchenko [this message]
2018-04-16 19:29 ` [PATCH 0/1] " Dongwon Kim
2018-04-16 19:29 ` Dongwon Kim
2018-04-16 19:29 ` Dongwon Kim
2018-04-17 7:59 ` Daniel Vetter
2018-04-17 7:59 ` Daniel Vetter
2018-04-17 7:59 ` Daniel Vetter
2018-04-17 8:19 ` Oleksandr Andrushchenko
2018-04-17 8:19 ` Oleksandr Andrushchenko
2018-04-17 8:19 ` Oleksandr Andrushchenko
2018-04-17 20:57 ` Dongwon Kim
2018-04-17 20:57 ` Dongwon Kim
2018-04-18 6:38 ` Oleksandr Andrushchenko
2018-04-18 7:35 ` Roger Pau Monné
2018-04-18 7:35 ` [Xen-devel] " Roger Pau Monné
2018-04-18 7:35 ` Roger Pau Monné
2018-04-18 8:01 ` Oleksandr Andrushchenko
2018-04-18 8:01 ` [Xen-devel] " Oleksandr Andrushchenko
2018-04-18 8:01 ` Oleksandr Andrushchenko
2018-04-18 10:10 ` Roger Pau Monné
2018-04-18 10:10 ` [Xen-devel] " Roger Pau Monné
2018-04-18 10:10 ` Roger Pau Monné
2018-04-18 10:18 ` Paul Durrant
2018-04-18 10:21 ` Oleksandr Andrushchenko
2018-04-18 10:21 ` Oleksandr Andrushchenko
2018-04-18 10:23 ` Paul Durrant
2018-04-18 10:31 ` Oleksandr Andrushchenko
2018-04-18 10:31 ` Oleksandr Andrushchenko
2018-04-18 10:23 ` Paul Durrant
2018-04-18 10:21 ` Oleksandr Andrushchenko
2018-04-18 10:39 ` [Xen-devel] " Oleksandr Andrushchenko
2018-04-18 10:39 ` Oleksandr Andrushchenko
2018-04-18 10:55 ` Roger Pau Monné
2018-04-18 10:55 ` [Xen-devel] " Roger Pau Monné
2018-04-18 12:42 ` Oleksandr Andrushchenko
2018-04-18 16:01 ` Dongwon Kim
2018-04-18 16:01 ` Dongwon Kim
2018-04-19 8:19 ` Oleksandr Andrushchenko
2018-04-19 8:19 ` [Xen-devel] " Oleksandr Andrushchenko
2018-04-19 8:19 ` Oleksandr Andrushchenko
2018-04-18 16:01 ` Dongwon Kim
2018-04-18 12:42 ` Oleksandr Andrushchenko
2018-04-20 7:22 ` Daniel Vetter
2018-04-20 7:22 ` [Xen-devel] " Daniel Vetter
2018-04-20 7:22 ` Daniel Vetter
2018-04-18 10:39 ` Oleksandr Andrushchenko
2018-04-18 10:18 ` Paul Durrant
2018-04-20 7:19 ` [Xen-devel] " Daniel Vetter
2018-04-20 11:25 ` Oleksandr Andrushchenko
2018-04-20 11:25 ` [Xen-devel] " Oleksandr Andrushchenko
2018-04-20 11:25 ` Oleksandr Andrushchenko
2018-04-23 11:52 ` Wei Liu
2018-04-23 12:10 ` Oleksandr Andrushchenko
2018-04-23 12:10 ` Oleksandr Andrushchenko
2018-04-23 22:41 ` Boris Ostrovsky
2018-04-23 22:41 ` [Xen-devel] " Boris Ostrovsky
2018-04-24 5:43 ` Oleksandr Andrushchenko
2018-04-24 5:43 ` [Xen-devel] " Oleksandr Andrushchenko
2018-04-24 5:43 ` Oleksandr Andrushchenko
2018-04-24 7:51 ` Juergen Gross
2018-04-24 8:07 ` Oleksandr Andrushchenko
2018-04-24 8:07 ` [Xen-devel] " Oleksandr Andrushchenko
2018-04-24 8:07 ` Oleksandr Andrushchenko
2018-04-24 8:40 ` Juergen Gross
2018-04-24 9:03 ` Oleksandr Andrushchenko
2018-04-24 9:03 ` Oleksandr Andrushchenko
2018-04-24 9:08 ` Juergen Gross
2018-04-24 9:13 ` Oleksandr Andrushchenko
2018-04-24 9:13 ` Oleksandr Andrushchenko
2018-04-24 10:01 ` [Xen-devel] " Wei Liu
2018-04-24 10:14 ` Oleksandr Andrushchenko
2018-04-24 10:14 ` [Xen-devel] " Oleksandr Andrushchenko
2018-04-24 10:24 ` Juergen Gross
2018-04-24 10:24 ` [Xen-devel] " Juergen Gross
2018-04-24 10:01 ` Wei Liu
2018-04-24 9:08 ` Juergen Gross
2018-04-24 9:03 ` Oleksandr Andrushchenko
2018-04-24 8:40 ` Juergen Gross
2018-04-24 7:51 ` Juergen Gross
2018-04-24 11:54 ` Daniel Vetter
2018-04-24 11:54 ` [Xen-devel] " Daniel Vetter
2018-04-24 11:54 ` Daniel Vetter
2018-04-24 11:59 ` Oleksandr Andrushchenko
2018-04-24 20:35 ` Dongwon Kim
2018-04-24 20:35 ` [Xen-devel] " Dongwon Kim
2018-04-24 20:35 ` Dongwon Kim
2018-04-25 6:07 ` Oleksandr Andrushchenko
2018-04-25 6:34 ` Daniel Vetter
2018-04-25 6:34 ` [Xen-devel] " Daniel Vetter
2018-04-25 6:34 ` Daniel Vetter
2018-04-25 17:16 ` Dongwon Kim
2018-04-25 17:16 ` Dongwon Kim
2018-04-27 6:54 ` Oleksandr Andrushchenko
2018-04-27 6:54 ` [Xen-devel] " Oleksandr Andrushchenko
2018-04-27 6:54 ` Oleksandr Andrushchenko
2018-04-25 17:16 ` Dongwon Kim
2018-04-25 6:07 ` Oleksandr Andrushchenko
2018-04-25 6:12 ` [Xen-devel] " Juergen Gross
2018-04-30 18:43 ` Dongwon Kim
2018-04-30 18:43 ` Dongwon Kim
2018-04-25 6:12 ` Juergen Gross
2018-04-24 11:59 ` Oleksandr Andrushchenko
2018-04-23 12:10 ` Oleksandr Andrushchenko
2018-04-23 11:52 ` Wei Liu
2018-04-20 7:19 ` Daniel Vetter
2018-04-18 17:01 ` Dongwon Kim
2018-04-18 17:01 ` Dongwon Kim
2018-04-18 17:01 ` Dongwon Kim
2018-04-19 8:14 ` Oleksandr Andrushchenko
2018-04-19 8:14 ` Oleksandr Andrushchenko
2018-04-19 8:14 ` Oleksandr Andrushchenko
2018-04-19 17:55 ` Dongwon Kim
2018-04-19 17:55 ` Dongwon Kim
2018-04-19 17:55 ` Dongwon Kim
2018-04-18 6:38 ` Oleksandr Andrushchenko
2018-04-16 14:33 ` Oleksandr Andrushchenko
-- strict thread matches above, loose matches on Subject: below --
2018-03-29 13:19 Oleksandr Andrushchenko
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=5d8fec7f-956c-378f-be90-f45029385740@gmail.com \
--to=andr2000@gmail.com \
--cc=Artem_Mygaiev@epam.com \
--cc=airlied@linux.ie \
--cc=boris.ostrovsky@oracle.com \
--cc=daniel.vetter@intel.com \
--cc=dongwon.kim@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=jgross@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mateuszx.potrola@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=oleksandr_andrushchenko@epam.com \
--cc=seanpaul@chromium.org \
--cc=xen-devel@lists.xenproject.org \
/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.