From: Felix Kuehling <felix.kuehling@amd.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
alexander.deucher@amd.com, christian.koenig@amd.com,
Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2 2/2] drm/amdkfd: Slighly optimize 'init_doorbell_bitmap()'
Date: Thu, 25 Nov 2021 16:37:08 -0500 [thread overview]
Message-ID: <549df417-2aee-55f4-78f4-d6dec478ffa7@amd.com> (raw)
In-Reply-To: <72ac7967f07e0794a8a06793407cf03f6a34e9fa.1637700315.git.christophe.jaillet@wanadoo.fr>
Am 2021-11-23 um 3:46 p.m. schrieb Christophe JAILLET:
> The 'doorbell_bitmap' bitmap has just been allocated. So we can use the
> non-atomic '__set_bit()' function to save a few cycles as no concurrent
> access can happen.
>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Thank you! I applied the series to amd-staging-drm-next.
Regards,
Felix
> ---
> bitmap_set() could certainly also be use, but range checking would be
> tricky.
>
> v1 --> v2: No change
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_process.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> index 67bb1654becc..9158f9754a24 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> @@ -1446,9 +1446,9 @@ static int init_doorbell_bitmap(struct qcm_process_device *qpd,
>
> for (i = 0; i < KFD_MAX_NUM_OF_QUEUES_PER_PROCESS / 2; i++) {
> if (i >= range_start && i <= range_end) {
> - set_bit(i, qpd->doorbell_bitmap);
> - set_bit(i + KFD_QUEUE_DOORBELL_MIRROR_OFFSET,
> - qpd->doorbell_bitmap);
> + __set_bit(i, qpd->doorbell_bitmap);
> + __set_bit(i + KFD_QUEUE_DOORBELL_MIRROR_OFFSET,
> + qpd->doorbell_bitmap);
> }
> }
>
prev parent reply other threads:[~2021-11-25 21:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 20:46 [PATCH v2 1/2] drm/amdkfd: Use bitmap_zalloc() when applicable Christophe JAILLET
2021-11-23 20:46 ` [PATCH v2 2/2] drm/amdkfd: Slighly optimize 'init_doorbell_bitmap()' Christophe JAILLET
2021-11-25 21:37 ` Felix Kuehling [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=549df417-2aee-55f4-78f4-d6dec478ffa7@amd.com \
--to=felix.kuehling@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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