From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-xe@lists.freedesktop.org
Cc: Nirmoy Das <nirmoy.das@intel.com>
Subject: Re: [PATCH v2 1/2] drm/xe/client: remove bogus rcu list usage
Date: Mon, 18 Mar 2024 10:45:16 +0100 [thread overview]
Message-ID: <5d49735b-e576-45e6-99e3-c60456b1e9d0@linux.intel.com> (raw)
In-Reply-To: <20240318093431.21075-3-matthew.auld@intel.com>
On 3/18/2024 10:34 AM, Matthew Auld wrote:
> We use plain spinlock to protect readers and writers, so there is no
> actual RCU here. Rather use the more appropriate non-rcu list based API.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
> drivers/gpu/drm/xe/xe_drm_client.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
> index 87c10bd7958b..59b01d838229 100644
> --- a/drivers/gpu/drm/xe/xe_drm_client.c
> +++ b/drivers/gpu/drm/xe/xe_drm_client.c
> @@ -78,7 +78,7 @@ void xe_drm_client_add_bo(struct xe_drm_client *client,
>
> spin_lock(&client->bos_lock);
> bo->client = xe_drm_client_get(client);
> - list_add_tail_rcu(&bo->client_link, &client->bos_list);
> + list_add_tail(&bo->client_link, &client->bos_list);
> spin_unlock(&client->bos_lock);
> }
>
> @@ -96,7 +96,7 @@ void xe_drm_client_remove_bo(struct xe_bo *bo)
> struct xe_drm_client *client = bo->client;
>
> spin_lock(&client->bos_lock);
> - list_del_rcu(&bo->client_link);
> + list_del(&bo->client_link);
> spin_unlock(&client->bos_lock);
>
> xe_drm_client_put(client);
> @@ -154,7 +154,7 @@ static void show_meminfo(struct drm_printer *p, struct drm_file *file)
>
> /* Internal objects. */
> spin_lock(&client->bos_lock);
> - list_for_each_entry_rcu(bo, &client->bos_list, client_link) {
> + list_for_each_entry(bo, &client->bos_list, client_link) {
> if (!bo || !kref_get_unless_zero(&bo->ttm.base.refcount))
> continue;
> bo_meminfo(bo, stats);
next prev parent reply other threads:[~2024-03-18 9:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 9:34 [PATCH v2 1/2] drm/xe/client: remove bogus rcu list usage Matthew Auld
2024-03-18 9:34 ` [PATCH v2 2/2] drm/xe/client: drop bogus bo NULL check Matthew Auld
2024-03-18 9:45 ` Nirmoy Das
2024-03-18 9:45 ` Nirmoy Das [this message]
2024-03-18 15:58 ` ✓ CI.Patch_applied: success for series starting with [v2,1/2] drm/xe/client: remove bogus rcu list usage Patchwork
2024-03-18 15:58 ` ✓ CI.checkpatch: " Patchwork
2024-03-18 15:59 ` ✓ CI.KUnit: " Patchwork
2024-03-18 16:10 ` ✓ CI.Build: " Patchwork
2024-03-18 16:12 ` ✓ CI.Hooks: " Patchwork
2024-03-18 16:14 ` ✓ CI.checksparse: " Patchwork
2024-03-18 16:35 ` ✓ CI.BAT: " Patchwork
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=5d49735b-e576-45e6-99e3-c60456b1e9d0@linux.intel.com \
--to=nirmoy.das@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=nirmoy.das@intel.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