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: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190408092144.4548-1-tzimmermann@suse.de>
2019-04-08 11:10 ` [PATCH 00/15] Share TTM code among framebuffer drivers Koenig, Christian
[not found] ` <20190408092144.4548-13-tzimmermann@suse.de>
2019-04-09 7:09 ` [PATCH 12/15] drm/vboxvideo: Convert vboxvideo driver to |struct drm_gem_ttm_object| Hans de Goede
[not found] ` <20190408092144.4548-14-tzimmermann@suse.de>
2019-04-09 7:09 ` [PATCH 13/15] drm/vboxvideo: Convert vboxvideo driver to Simple TTM Hans de Goede
[not found] ` <d69e0b34-c586-2338-b063-fb758b6465d8@amd.com>
[not found] ` <096a70a7-ed24-2161-29e9-1907221b8a64@suse.de>
2019-04-09 7:12 ` [PATCH 00/15] Share TTM code among framebuffer drivers kraxel
[not found] ` <20190409071249.ngzarvjlztx4jwbh@sirius.home.kraxel.org>
2019-04-09 7:42 ` Dave Airlie
2019-04-09 8:29 ` kraxel
[not found] ` <a2f778c3-904b-5ee2-215e-df534f14b928@suse.de>
2019-04-15 15:54 ` Daniel Vetter
2019-04-15 15:57 ` Daniel Vetter
[not found] ` <b9ba305f-8140-faf9-3954-464d9f38852a@suse.de>
2019-04-15 19:17 ` Daniel Vetter
[not found] ` <CAKMK7uG+E1uTwSifSu5TrXwQXqu0Cpr30B02_S9bf95HEyqY_g@mail.gmail.com>
2019-04-16 10:05 ` Koenig, Christian
[not found] ` <9a3af097-d907-30da-73db-bcf00223e70b@amd.com>
2019-04-16 11:03 ` Daniel Vetter
[not found] ` <CAKMK7uGKK2gP-1Oht7ARAqPs4ccUeAh9EPPke+wX1JWLeT_S7Q@mail.gmail.com>
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