From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: "Steven Price" <steven.price@arm.com>,
"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>,
"Gustavo Padovan" <gustavo.padovan@collabora.com>,
"Daniel Stone" <daniel@fooishbar.org>,
"Tomeu Vizoso" <tomeu.vizoso@collabora.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Rob Clark" <robdclark@gmail.com>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
"Qiang Yu" <yuq825@gmail.com>,
"Alyssa Rosenzweig" <alyssa.rosenzweig@collabora.com>,
"Rob Herring" <robh@kernel.org>, "Sean Paul" <sean@poorly.run>,
"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
"Abhinav Kumar" <quic_abhinavk@quicinc.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Dmitry Osipenko <digetx@gmail.com>,
kernel@collabora.com, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v8 7/7] drm/panfrost: Switch to generic memory shrinker
Date: Mon, 14 Nov 2022 20:13:31 +0300 [thread overview]
Message-ID: <9d9e745d-a417-d07f-e413-095dd2f610ac@collabora.com> (raw)
In-Reply-To: <41c4d78c-cb47-d06f-f6af-e827dd56b857@arm.com>
Hello Steve,
On 11/14/22 19:54, Steven Price wrote:
> On 05/11/2022 23:27, Dmitry Osipenko wrote:
>> Replace Panfrost's custom memory shrinker with a common drm-shmem
>> memory shrinker.
>>
>> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
>
> Sadly this triggers GPU faults under memory pressure - it looks
> suspiciously like mappings are being freed while the jobs are still running.
>
> I'm not sure I understand how the generic shrinker replicates the
> "gpu_usecount" atomic that Panfrost currently has, and I'm wondering if
> that's the cause?
>
> Also just reverting this commit (so just patches 1-6) I can't actually
> get Panfrost to purge any memory. So I don't think the changes (most
> likely in patch 4) are quite right either.
>
> At the moment I don't have the time to investigate in detail. But if
> you've any ideas for something specific I should look at I can run more
> testing.
Thank you for the testing! It just occurred to me that the shrinker
callback lost the dma_resv_test_signaled() in comparison to the previous
versions of this patchset. It appeared to me that the drm_gem_lru now
checks whether reservation is busy, but it doesn't.
I saw a similar page faults once in a while when was testing the
Panfrost driver, but then couldn't reproduce the faults after applying
the IOMMU unmap range fix that Robin made recently.
I'll re-add the dma_resv_test_signaled() in v9, it was a luck that I
didn't hit it much during my testing.
--
Best regards,
Dmitry
prev parent reply other threads:[~2022-11-14 17:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 23:27 [PATCH v8 0/7] Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers Dmitry Osipenko
2022-11-05 23:27 ` [PATCH v8 1/7] drm/msm/gem: Prevent blocking within shrinker loop Dmitry Osipenko
2022-11-05 23:27 ` [PATCH v8 2/7] drm/shmem-helper: Don't use vmap_use_count for dma-bufs Dmitry Osipenko
2022-11-10 8:55 ` Thomas Zimmermann
2022-11-05 23:27 ` [PATCH v8 3/7] drm/shmem-helper: Switch to reservation lock Dmitry Osipenko
2022-11-05 23:27 ` [PATCH v8 4/7] drm/shmem-helper: Add memory shrinker Dmitry Osipenko
2022-11-09 10:28 ` Thomas Zimmermann
2022-11-09 18:48 ` Dmitry Osipenko
2022-11-05 23:27 ` [PATCH v8 5/7] drm/gem: Add drm_gem_pin_unlocked() Dmitry Osipenko
2022-11-05 23:27 ` [PATCH v8 6/7] drm/virtio: Support memory shrinking Dmitry Osipenko
2022-11-05 23:27 ` [PATCH v8 7/7] drm/panfrost: Switch to generic memory shrinker Dmitry Osipenko
2022-11-14 16:54 ` Steven Price
2022-11-14 17:13 ` Dmitry Osipenko [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=9d9e745d-a417-d07f-e413-095dd2f610ac@collabora.com \
--to=dmitry.osipenko@collabora.com \
--cc=airlied@linux.ie \
--cc=alyssa.rosenzweig@collabora.com \
--cc=christian.koenig@amd.com \
--cc=daniel.almeida@collabora.com \
--cc=daniel@ffwll.ch \
--cc=daniel@fooishbar.org \
--cc=digetx@gmail.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=gustavo.padovan@collabora.com \
--cc=kernel@collabora.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=olvaffe@gmail.com \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=robh@kernel.org \
--cc=sean@poorly.run \
--cc=steven.price@arm.com \
--cc=sumit.semwal@linaro.org \
--cc=tomeu.vizoso@collabora.com \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=yuq825@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
all inboxes | Powered by JetHome®