From: Felix Kuehling <felix.kuehling@amd.com>
To: "Christian König" <christian.koenig@amd.com>,
"James Zhu" <James.Zhu@amd.com>,
amd-gfx@lists.freedesktop.org
Cc: Philip.Yang@amd.com, jamesz@amd.com
Subject: Re: [PATCH 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages
Date: Mon, 11 Dec 2023 18:43:26 -0500 [thread overview]
Message-ID: <952aa532-e82c-4e5a-8edd-1ebbf5c79ce3@amd.com> (raw)
In-Reply-To: <a7821e98-8066-4870-b41d-a57e7f04a2f5@amd.com>
On 2023-12-11 05:38, Christian König wrote:
> Am 09.12.23 um 00:01 schrieb James Zhu:
>> Needn't do schedule for each hmm_range_fault, and use cond_resched
>> to replace schedule.
>
> cond_resched() is usually NAKed upstream since it is a NO-OP in most
> situations.
That's weird, because https://docs.kernel.org/RCU/stallwarn.html
specifically recommends it to resolve RCU stall warnings. I previously
told James to use that instead of schedule().
Regards,
Felix
>
> IIRC there was even a patch set to completely remove it.
>
> Christian.
>
>>
>> Signed-off-by: James Zhu <James.Zhu@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>> index b24eb5821fd1..c77c4eceea46 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>> @@ -199,6 +199,7 @@ int amdgpu_hmm_range_get_pages(struct
>> mmu_interval_notifier *notifier,
>> hmm_range->notifier_seq = mmu_interval_read_begin(notifier);
>> r = hmm_range_fault(hmm_range);
>> if (unlikely(r)) {
>> + cond_resched();
>> /*
>> * FIXME: This timeout should encompass the retry from
>> * mmu_interval_read_retry() as well.
>> @@ -212,7 +213,6 @@ int amdgpu_hmm_range_get_pages(struct
>> mmu_interval_notifier *notifier,
>> break;
>> hmm_range->hmm_pfns += MAX_WALK_BYTE >> PAGE_SHIFT;
>> hmm_range->start = hmm_range->end;
>> - schedule();
>> } while (hmm_range->end < end);
>> hmm_range->start = start;
>
next prev parent reply other threads:[~2023-12-11 23:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 23:01 [PATCH 1/2] drm/amdgpu: increase hmm range get pages timeout James Zhu
2023-12-08 23:01 ` [PATCH 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages James Zhu
2023-12-11 10:38 ` Christian König
2023-12-11 17:23 ` James Zhu
2023-12-11 23:43 ` Felix Kuehling [this message]
2023-12-12 8:43 ` Christian König
2023-12-11 20:02 ` [PATCH v2 " James Zhu
2023-12-13 15:24 ` [PATCH 1/2] drm/amdgpu: increase hmm range get pages timeout James Zhu
2023-12-13 16:23 ` Felix Kuehling
2023-12-13 16:55 ` James Zhu
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=952aa532-e82c-4e5a-8edd-1ebbf5c79ce3@amd.com \
--to=felix.kuehling@amd.com \
--cc=James.Zhu@amd.com \
--cc=Philip.Yang@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=jamesz@amd.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 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.