From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Rob Clark <robdclark@gmail.com>, dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
Rob Clark <robdclark@chromium.org>,
Daniel Vetter <daniel@ffwll.ch>,
Thomas Zimmermann <tzimmermann@suse.de>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@linux.ie>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 09/15] drm/gem: Add LRU/shrinker helper
Date: Fri, 29 Jul 2022 18:27:19 +0300 [thread overview]
Message-ID: <49fe9ecf-b1bd-a21b-8d8c-e4a33e3fa821@collabora.com> (raw)
In-Reply-To: <20220726175043.1027731-10-robdclark@gmail.com>
On 7/26/22 20:50, Rob Clark wrote:
> +/**
> + * drm_gem_lru_move_tail_locked - move the object to the tail of the LRU
> + *
> + * If the object is already in this LRU it will be moved to the
> + * tail. Otherwise it will be removed from whichever other LRU
> + * it is in (if any) and moved into this LRU.
> + *
> + * Call with LRU lock held.
> + *
> + * @lru: The LRU to move the object into.
> + * @obj: The GEM object to move into this LRU
> + */
> +void
> +drm_gem_lru_move_tail_locked(struct drm_gem_lru *lru, struct drm_gem_object *obj)
> +{
> + lockdep_assert_held_once(lru->lock);
> +
> + if (obj->lru)
> + lru_remove(obj);
The obj->lru also needs to be locked if lru != obj->lru, isn't it? And
then we should add lockdep_assert_held_once(obj->lru->lock).
--
Best regards,
Dmitry
next prev parent reply other threads:[~2022-07-29 15:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 17:50 [PATCH v3 00/15] drm+msm: Shrinker and LRU rework Rob Clark
2022-07-26 17:50 ` [PATCH v3 01/15] drm/msm: Reorder lock vs submit alloc Rob Clark
2022-07-26 17:50 ` [PATCH v3 02/15] drm/msm: Small submit cleanup Rob Clark
2022-07-26 17:50 ` [PATCH v3 03/15] drm/msm: Split out idr_lock Rob Clark
2022-07-26 17:50 ` [PATCH v3 04/15] drm/msm/gem: Check for active in shrinker path Rob Clark
2022-07-26 17:50 ` [PATCH v3 05/15] drm/msm/gem: Rename update_inactive Rob Clark
2022-07-26 17:50 ` [PATCH v3 06/15] drm/msm/gem: Rename to pin/unpin_pages Rob Clark
2022-07-26 17:50 ` [PATCH v3 07/15] drm/msm/gem: Consolidate pin/unpin paths Rob Clark
2022-07-26 17:50 ` [PATCH v3 08/15] drm/msm/gem: Remove active refcnt Rob Clark
2022-07-26 17:50 ` [PATCH v3 09/15] drm/gem: Add LRU/shrinker helper Rob Clark
2022-07-29 15:27 ` Dmitry Osipenko [this message]
2022-07-29 15:40 ` Rob Clark
2022-07-29 17:01 ` Dmitry Osipenko
2022-08-01 19:41 ` Dmitry Osipenko
2022-08-01 20:00 ` Rob Clark
2022-08-01 20:11 ` Dmitry Osipenko
2022-08-01 20:13 ` Dmitry Osipenko
2022-08-01 20:26 ` Dmitry Osipenko
2022-08-01 20:42 ` Rob Clark
2022-08-01 20:59 ` Dmitry Osipenko
2022-07-26 17:50 ` [PATCH v3 10/15] drm/msm/gem: Convert to using drm_gem_lru Rob Clark
2022-07-26 17:50 ` [PATCH v3 11/15] drm/msm/gem: Unpin buffers earlier Rob Clark
2022-07-26 17:50 ` [PATCH v3 12/15] drm/msm/gem: Consolidate shrinker trace Rob Clark
2022-07-26 17:50 ` [PATCH v3 13/15] drm/msm/gem: Evict active GEM objects when necessary Rob Clark
2022-07-26 17:50 ` [PATCH v3 14/15] drm/msm/gem: Add msm_gem_assert_locked() Rob Clark
2022-07-26 17:50 ` [PATCH v3 15/15] drm/msm/gem: Convert to lockdep assert Rob Clark
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=49fe9ecf-b1bd-a21b-8d8c-e4a33e3fa821@collabora.com \
--to=dmitry.osipenko@collabora.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox