From: "Koenig, Christian" <Christian.Koenig@amd.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"airlied@linux.ie" <airlied@linux.ie>,
"kraxel@redhat.com" <kraxel@redhat.com>,
"Huang, Ray" <Ray.Huang@amd.com>,
"Zhang, Jerry" <Jerry.Zhang@amd.com>,
"hdegoede@redhat.com" <hdegoede@redhat.com>,
"z.liuxinliang@hisilicon.com" <z.liuxinliang@hisilicon.com>,
"zourongrong@gmail.com" <zourongrong@gmail.com>,
"kong.kongxinwei@hisilicon.com" <kong.kongxinwei@hisilicon.com>,
"puck.chen@hisilicon.com" <puck.chen@hisilicon.com>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH 00/15] Share TTM code among framebuffer drivers
Date: Tue, 9 Apr 2019 13:39:23 +0000 [thread overview]
Message-ID: <dd7affb9-4aa0-8f39-8937-e89e7cc8283c@amd.com> (raw)
In-Reply-To: <096a70a7-ed24-2161-29e9-1907221b8a64@suse.de>
Am 08.04.19 um 13:59 schrieb Thomas Zimmermann:
[SNIP]
> If not for TTM, what would be the alternative? One VMA manager per
> memory region per device?
Since everybody vital seems to be on this mail thread anyway, let's use
it a bit for brain storming what a possible replacement for TTM should
look like.
Well for simple drivers like qemu/bochs and cirrus the answer is to not
use it at all. E.g. VRAM is only used for scanout and unprivileged
userspace should not mess with it at all. In this case we don't need
dynamic eviction and so also don't need TTM.
That leaves us with the more complex drivers, like radeon, amdgpu,
nouveu and maybe some of the ARM based stuff, with vmwgfx being a bit
special here.
Now I can summarize the requirements for at least the amdgpu in the
following way:
1. We need to be able to allocate memory objects in different locations.
2. We need to be able to move around memory objects between different
locations.
3. We need some LRU component which tells us what to evict when memory
in a location becomes to tight.
Now for lessons learned we should at least avoid the following design
pitfalls:
A) DON'T make it a layered design! Layers are for making cake, not software.
B) DON'T make it a "Eierlegende Wollmilchsau" (German saying). E.g.
don't try to solve every single corner cases in one piece of software.
Let's make components which solve one specific problem.
C) Pipeline everything! E.g. the hardware we deal with is asynchronous
by design. Blocking for the hardware to finish in the common components
itself is an absolutely no-go.
If a driver wants to do something synchronous it should wait itself.
Those comments where not really intended for you Thomas, but I had to
write them down somewhere :)
Regards,
Christian.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
prev parent reply other threads:[~2019-04-09 13:39 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 9:21 [PATCH 00/15] Share TTM code among framebuffer drivers Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 01/15] drm: Add |struct drm_gem_ttm_object| and helpers Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 02/15] drm: Add |struct drm_gem_ttm_object| callbacks for |struct ttm_bo_driver| Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 03/15] drm: Add |struct drm_gem_ttm_object| callbacks for |struct drm_driver| Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 04/15] drm: Add drm_gem_ttm_fill_create_dumb() to create dumb buffers Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 05/15] drm: Add Simple TTM, a memory manager for dedicated VRAM Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 06/15] drm/ast: Convert AST driver to |struct drm_gem_ttm_object| Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 07/15] drm/ast: Convert AST driver to Simple TTM Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 08/15] drm/bochs: Convert Bochs driver to |struct drm_gem_ttm_object| Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 09/15] drm/bochs: Convert Bochs driver to Simple TTM Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 10/15] drm/mgag200: Convert mgag200 driver to |struct drm_gem_ttm_object| Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 11/15] drm/mgag200: Convert mgag200 driver to Simple TTM Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 12/15] drm/vboxvideo: Convert vboxvideo driver to |struct drm_gem_ttm_object| Thomas Zimmermann
2019-04-09 7:09 ` Hans de Goede
2019-04-08 9:21 ` [PATCH 13/15] drm/vboxvideo: Convert vboxvideo driver to Simple TTM Thomas Zimmermann
2019-04-09 7:09 ` Hans de Goede
2019-04-09 7:37 ` Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 14/15] drm/hisilicon: Convert hibmc-drm driver to |struct drm_gem_ttm_object| Thomas Zimmermann
2019-04-08 9:21 ` [PATCH 15/15] drm/hisilicon: Convert hibmc-drm driver to Simple TTM Thomas Zimmermann
2019-04-08 11:10 ` [PATCH 00/15] Share TTM code among framebuffer drivers Koenig, Christian
2019-04-08 11:59 ` Thomas Zimmermann
2019-04-09 7:12 ` kraxel
2019-04-09 7:42 ` Dave Airlie
2019-04-09 8:29 ` kraxel
2019-04-09 11:55 ` Christian König
2019-04-09 7:50 ` Thomas Zimmermann
2019-04-15 15:54 ` Daniel Vetter
2019-04-15 15:57 ` Daniel Vetter
2019-04-15 16:21 ` Thomas Zimmermann
2019-04-15 19:17 ` Daniel Vetter
2019-04-16 10:05 ` Koenig, Christian
2019-04-16 11:03 ` Daniel Vetter
2019-04-16 11:10 ` Koenig, Christian
2019-04-09 13:39 ` Koenig, Christian [this message]
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=dd7affb9-4aa0-8f39-8937-e89e7cc8283c@amd.com \
--to=christian.koenig@amd.com \
--cc=Jerry.Zhang@amd.com \
--cc=Ray.Huang@amd.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=kong.kongxinwei@hisilicon.com \
--cc=kraxel@redhat.com \
--cc=puck.chen@hisilicon.com \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=z.liuxinliang@hisilicon.com \
--cc=zourongrong@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox