From: Boris Brezillon <boris.brezillon@collabora.com>
To: Steven Price <steven.price@arm.com>
Cc: "Liviu Dudau" <liviu.dudau@arm.com>,
"Adrián Larumbe" <adrian.larumbe@collabora.com>,
dri-devel@lists.freedesktop.org,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Akash Goel" <akash.goel@arm.com>,
"Rob Clark" <robin.clark@oss.qualcomm.com>,
"Sean Paul" <sean@poorly.run>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Akhil P Oommen" <akhilpo@oss.qualcomm.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
"Chris Diamand" <chris.diamand@arm.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Matthew Brost" <matthew.brost@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Alice Ryhl" <aliceryhl@google.com>,
"Chia-I Wu" <olvaffe@gmail.com>,
kernel@collabora.com
Subject: Re: [PATCH v4 9/9] drm/panthor: Add a GEM shrinker
Date: Mon, 9 Mar 2026 11:44:07 +0100 [thread overview]
Message-ID: <20260309114407.45d6a8e3@fedora> (raw)
In-Reply-To: <0fbe7ff5-62e4-4345-882b-ca27195aa510@arm.com>
On Fri, 6 Mar 2026 15:17:25 +0000
Steven Price <steven.price@arm.com> wrote:
> > +int panthor_vm_evict_bo_mappings_locked(struct panthor_gem_object *bo)
> > +{
> > + struct drm_gpuvm_bo *vm_bo;
> > +
> > + drm_gem_for_each_gpuvm_bo(vm_bo, &bo->base) {
> > + struct panthor_vm *vm = container_of(vm_bo->vm, struct panthor_vm, base);
> > + struct drm_gpuva *va;
> > +
> > + /* Skip already evicted GPU mappings. */
> > + if (vm_bo->evicted)
> > + continue;
> > +
> > + if (!mutex_trylock(&vm->op_lock))
> > + return -EDEADLK;
> > +
> > + drm_gpuvm_bo_evict(vm_bo, true);
> > + drm_gpuvm_bo_for_each_va(va, vm_bo) {
> > + struct panthor_vma *vma = container_of(va, struct panthor_vma, base);
> > +
> > + if (vma->evicted)
> > + continue;
> > +
> > + panthor_vm_lock_region(vm, va->va.addr, va->va.range);
>
> NIT: You are ignoring the return value here - it might be better to bail
> out instead if this happens.
Will do in v5.
> Admittedly this is a "should never happen" case.
Better safe than sorry.
next prev parent reply other threads:[~2026-03-09 10:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 12:43 [PATCH v4 0/9] drm/panthor: Add a GEM shrinker Boris Brezillon
2026-03-05 12:43 ` [PATCH v4 1/9] drm/gem: Consider GEM object reclaimable if shrinking fails Boris Brezillon
2026-03-05 12:43 ` [PATCH v4 2/9] drm/panthor: Move panthor_gems_debugfs_init() to panthor_gem.c Boris Brezillon
2026-03-05 12:43 ` [PATCH v4 3/9] drm/panthor: Group panthor_kernel_bo_xxx() helpers Boris Brezillon
2026-03-05 12:43 ` [PATCH v4 4/9] drm/panthor: Don't call drm_gpuvm_bo_extobj_add() if the object is private Boris Brezillon
2026-03-05 12:43 ` [PATCH v4 5/9] drm/panthor: Part ways with drm_gem_shmem_object Boris Brezillon
2026-03-06 8:01 ` kernel test robot
2026-03-06 11:58 ` Steven Price
2026-03-06 12:15 ` Boris Brezillon
2026-03-06 12:17 ` Steven Price
2026-03-05 12:43 ` [PATCH v4 6/9] drm/panthor: Lazily allocate pages on mmap() Boris Brezillon
2026-03-05 12:43 ` [PATCH v4 7/9] drm/panthor: Split panthor_vm_prepare_map_op_ctx() to prepare for reclaim Boris Brezillon
2026-03-05 12:43 ` [PATCH v4 8/9] drm/panthor: Track the number of mmap on a BO Boris Brezillon
2026-03-05 12:43 ` [PATCH v4 9/9] drm/panthor: Add a GEM shrinker Boris Brezillon
2026-03-06 15:17 ` Steven Price
2026-03-09 10:44 ` Boris Brezillon [this message]
2026-03-06 11:58 ` [PATCH v4 0/9] " Steven Price
2026-03-06 12:30 ` Boris Brezillon
2026-03-06 15:13 ` Steven Price
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=20260309114407.45d6a8e3@fedora \
--to=boris.brezillon@collabora.com \
--cc=adrian.larumbe@collabora.com \
--cc=airlied@gmail.com \
--cc=akash.goel@arm.com \
--cc=akhilpo@oss.qualcomm.com \
--cc=aliceryhl@google.com \
--cc=chris.diamand@arm.com \
--cc=dakr@kernel.org \
--cc=dmitry.osipenko@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=konradybcio@kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.brost@intel.com \
--cc=mripard@kernel.org \
--cc=olvaffe@gmail.com \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tzimmermann@suse.de \
/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.