From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Rob Clark <robdclark@gmail.com>
Cc: David Airlie <airlied@linux.ie>,
Gerd Hoffmann <kraxel@redhat.com>,
Gurchetan Singh <gurchetansingh@chromium.org>,
Chia-I Wu <olvaffe@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Daniel Almeida <daniel.almeida@collabora.com>,
Gert Wollny <gert.wollny@collabora.com>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"open list:VIRTIO GPU DRIVER"
<virtualization@lists.linux-foundation.org>,
Gustavo Padovan <gustavo.padovan@collabora.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
Dmitry Osipenko <digetx@gmail.com>,
Rob Clark <robdclark@chromium.org>
Subject: Re: [PATCH v1 0/5] Add memory shrinker to VirtIO-GPU DRM driver
Date: Tue, 15 Mar 2022 02:04:57 +0300 [thread overview]
Message-ID: <64959ce1-15f0-59f5-a6f8-4258019e5a4b@collabora.com> (raw)
In-Reply-To: <285bf619-8c05-f2f4-3aeb-e013fba8754a@collabora.com>
On 3/10/22 01:43, Dmitry Osipenko wrote:
>> I think that, given virgl uses host storage, guest shrinker should be
>> still useful.. so I think continue with this series.
> Guest shrinker indeed will be useful for virgl today. I was already
> questioning why virgl needs both host and guest storages, maybe it will
> move to a host-only storage approach in the future.
>
> I think the variant with the timer expiration actually could be
> interesting to try because it should allow host to purge its VM BOs by
> itself, preventing host OOMs.
While I was working on shrinker v2, I noticed that host-side allocation
may take a significant time. So I decided to defer implementation of my
idea of using timer-based expiration for host-only BOs. I'll need to
examine it more.
>> For host shrinker, I'll have to look more at when crosvm triggers
>> balloon inflation. I could still go the MADV:WILLNEED_REPLACE
>> approach instead, which does have the advantage of host kernel not
>> relying on host userspace or vm having a chance to run in order to
>> release pages. The downside (perhaps?) is it would be more specific
>> to virtgpu-native-context and less so to virgl or venus (but I guess
>> there doesn't currently exist a way for madvise to be useful for vk
>> drivers).
> I'll also take a look at what CrOS does, maybe it has some interesting
> ideas.
I looked at CrOS kernel and crosvm, and haven't noticed anything special
there in regards to purging GPU's memory of VM on host-side memory
pressure. If you'll find something, then please let me know.
I sent out v2 of the shrinker series, but missed to CC you on it by
accident, please find it here [1].
[1]
https://lore.kernel.org/dri-devel/20220314224253.236359-1-dmitry.osipenko@collabora.com/T/#t
next prev parent reply other threads:[~2022-03-14 23:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 13:17 Dmitry Osipenko
2022-03-08 13:17 ` [PATCH v1 1/5] drm/virtio: Correct drm_gem_shmem_get_sg_table() error handling Dmitry Osipenko
2022-03-08 13:17 ` [PATCH v1 2/5] drm/virtio: Check whether transferred 2D BO is shmem Dmitry Osipenko
2022-03-08 13:17 ` [PATCH v1 3/5] drm/virtio: Unlock GEM reservations in error code path Dmitry Osipenko
2022-03-08 13:17 ` [PATCH v1 4/5] drm/virtio: Improve DMA API usage for shmem BOs Dmitry Osipenko
2022-03-08 13:17 ` [PATCH v1 5/5] drm/virtio: Add memory shrinker Dmitry Osipenko
2022-03-08 16:04 ` Dmitry Osipenko
2022-03-09 1:12 ` Rob Clark
2022-03-09 11:55 ` Dmitry Osipenko
2022-03-08 16:29 ` [PATCH v1 0/5] Add memory shrinker to VirtIO-GPU DRM driver Rob Clark
2022-03-08 19:28 ` Dmitry Osipenko
2022-03-08 22:24 ` Rob Clark
2022-03-08 23:36 ` Dmitry Osipenko
2022-03-09 0:56 ` Rob Clark
2022-03-09 20:06 ` Dmitry Osipenko
2022-03-09 21:51 ` Rob Clark
2022-03-09 22:43 ` Dmitry Osipenko
2022-03-14 23:04 ` Dmitry Osipenko [this message]
2022-03-09 8:59 ` Thomas Zimmermann
2022-03-09 11:55 ` Dmitry Osipenko
2022-03-09 19:28 ` Thomas Zimmermann
2022-03-09 22:25 ` Dmitry Osipenko
2022-03-10 19:02 ` Thomas Zimmermann
2022-03-10 21:32 ` Dmitry Osipenko
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=64959ce1-15f0-59f5-a6f8-4258019e5a4b@collabora.com \
--to=dmitry.osipenko@collabora.com \
--cc=airlied@linux.ie \
--cc=daniel.almeida@collabora.com \
--cc=daniel@ffwll.ch \
--cc=digetx@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gert.wollny@collabora.com \
--cc=gurchetansingh@chromium.org \
--cc=gustavo.padovan@collabora.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olvaffe@gmail.com \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=tomeu.vizoso@collabora.com \
--cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®