* [PATCH 1/2] drm/amdgpu: increase hmm range get pages timeout
@ 2023-12-08 23:01 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-13 15:24 ` [PATCH 1/2] drm/amdgpu: increase hmm range get pages timeout James Zhu
0 siblings, 2 replies; 10+ messages in thread
From: James Zhu @ 2023-12-08 23:01 UTC (permalink / raw)
To: amd-gfx; +Cc: Philip.Yang, Felix.kuehling, jamesz, christian.koenig
When application tries to allocate all system memory and cause memory
to swap out. Needs more time for hmm_range_fault to validate the
remaining page for allocation. To be safe, increase timeout value to
1 second for 64MB range.
Signed-off-by: James Zhu <James.Zhu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
index 081267161d40..b24eb5821fd1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
@@ -190,8 +190,8 @@ int amdgpu_hmm_range_get_pages(struct mmu_interval_notifier *notifier,
pr_debug("hmm range: start = 0x%lx, end = 0x%lx",
hmm_range->start, hmm_range->end);
- /* Assuming 128MB takes maximum 1 second to fault page address */
- timeout = max((hmm_range->end - hmm_range->start) >> 27, 1UL);
+ /* Assuming 64MB takes maximum 1 second to fault page address */
+ timeout = max((hmm_range->end - hmm_range->start) >> 26, 1UL);
timeout *= HMM_RANGE_DEFAULT_TIMEOUT;
timeout = jiffies + msecs_to_jiffies(timeout);
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages
2023-12-08 23:01 [PATCH 1/2] drm/amdgpu: increase hmm range get pages timeout James Zhu
@ 2023-12-08 23:01 ` James Zhu
2023-12-11 10:38 ` 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
1 sibling, 2 replies; 10+ messages in thread
From: James Zhu @ 2023-12-08 23:01 UTC (permalink / raw)
To: amd-gfx; +Cc: Philip.Yang, Felix.kuehling, jamesz, christian.koenig
Needn't do schedule for each hmm_range_fault, and use cond_resched
to replace schedule.
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;
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages
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
2023-12-11 20:02 ` [PATCH v2 " James Zhu
1 sibling, 2 replies; 10+ messages in thread
From: Christian König @ 2023-12-11 10:38 UTC (permalink / raw)
To: James Zhu, amd-gfx; +Cc: Philip.Yang, Felix.kuehling, jamesz
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.
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;
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages
2023-12-11 10:38 ` Christian König
@ 2023-12-11 17:23 ` James Zhu
2023-12-11 23:43 ` Felix Kuehling
1 sibling, 0 replies; 10+ messages in thread
From: James Zhu @ 2023-12-11 17:23 UTC (permalink / raw)
To: Christian König, James Zhu, amd-gfx; +Cc: Philip.Yang, Felix.kuehling
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.
[JZ] then let me change back to schedule(); Thanks!
>
> 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;
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages
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 20:02 ` James Zhu
1 sibling, 0 replies; 10+ messages in thread
From: James Zhu @ 2023-12-11 20:02 UTC (permalink / raw)
To: amd-gfx; +Cc: Philip.Yang, Felix.kuehling, jamesz, christian.koenig
Only schedule when hmm_range_fault returns error.
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..55b65fc04b65 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)) {
+ schedule();
/*
* 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;
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages
2023-12-11 10:38 ` Christian König
2023-12-11 17:23 ` James Zhu
@ 2023-12-11 23:43 ` Felix Kuehling
2023-12-12 8:43 ` Christian König
1 sibling, 1 reply; 10+ messages in thread
From: Felix Kuehling @ 2023-12-11 23:43 UTC (permalink / raw)
To: Christian König, James Zhu, amd-gfx; +Cc: Philip.Yang, jamesz
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;
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages
2023-12-11 23:43 ` Felix Kuehling
@ 2023-12-12 8:43 ` Christian König
0 siblings, 0 replies; 10+ messages in thread
From: Christian König @ 2023-12-12 8:43 UTC (permalink / raw)
To: Felix Kuehling, James Zhu, amd-gfx; +Cc: Philip.Yang, jamesz
Am 12.12.23 um 00:43 schrieb Felix Kuehling:
>
> 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().
I haven't followed the full discussion and rational about that either,
could be that the documentation is outdated.
The latest RFC to remove cond_resched() and explaining the background
can be found here: https://lwn.net/Articles/950581/
Regards,
Christian.
>
> 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;
>>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] drm/amdgpu: increase hmm range get pages timeout
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-13 15:24 ` James Zhu
2023-12-13 16:23 ` Felix Kuehling
1 sibling, 1 reply; 10+ messages in thread
From: James Zhu @ 2023-12-13 15:24 UTC (permalink / raw)
To: James Zhu, amd-gfx; +Cc: Philip.Yang, Felix.kuehling, christian.koenig
Ping ...
On 2023-12-08 18:01, James Zhu wrote:
> When application tries to allocate all system memory and cause memory
> to swap out. Needs more time for hmm_range_fault to validate the
> remaining page for allocation. To be safe, increase timeout value to
> 1 second for 64MB range.
>
> Signed-off-by: James Zhu <James.Zhu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
> index 081267161d40..b24eb5821fd1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
> @@ -190,8 +190,8 @@ int amdgpu_hmm_range_get_pages(struct mmu_interval_notifier *notifier,
> pr_debug("hmm range: start = 0x%lx, end = 0x%lx",
> hmm_range->start, hmm_range->end);
>
> - /* Assuming 128MB takes maximum 1 second to fault page address */
> - timeout = max((hmm_range->end - hmm_range->start) >> 27, 1UL);
> + /* Assuming 64MB takes maximum 1 second to fault page address */
> + timeout = max((hmm_range->end - hmm_range->start) >> 26, 1UL);
> timeout *= HMM_RANGE_DEFAULT_TIMEOUT;
> timeout = jiffies + msecs_to_jiffies(timeout);
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] drm/amdgpu: increase hmm range get pages timeout
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
0 siblings, 1 reply; 10+ messages in thread
From: Felix Kuehling @ 2023-12-13 16:23 UTC (permalink / raw)
To: James Zhu, James Zhu, amd-gfx; +Cc: Philip.Yang, christian.koenig
On 2023-12-13 10:24, James Zhu wrote:
> Ping ...
>
> On 2023-12-08 18:01, James Zhu wrote:
>> When application tries to allocate all system memory and cause memory
>> to swap out. Needs more time for hmm_range_fault to validate the
>> remaining page for allocation. To be safe, increase timeout value to
>> 1 second for 64MB range.
>>
>> Signed-off-by: James Zhu <James.Zhu@amd.com>
This is not the first time we're incrementing this timeout. Eventually
we should get rid of that and find a way to make this work reliably
without a timeout. There can always be situations where faults take
longer, and we should not fail randomly in those cases.
There are also some FIXMEs in this code that should be addressed at the
same time.
That said, as a short-term fix, this patch is
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>> index 081267161d40..b24eb5821fd1 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>> @@ -190,8 +190,8 @@ int amdgpu_hmm_range_get_pages(struct
>> mmu_interval_notifier *notifier,
>> pr_debug("hmm range: start = 0x%lx, end = 0x%lx",
>> hmm_range->start, hmm_range->end);
>> - /* Assuming 128MB takes maximum 1 second to fault page
>> address */
>> - timeout = max((hmm_range->end - hmm_range->start) >> 27, 1UL);
>> + /* Assuming 64MB takes maximum 1 second to fault page
>> address */
>> + timeout = max((hmm_range->end - hmm_range->start) >> 26, 1UL);
>> timeout *= HMM_RANGE_DEFAULT_TIMEOUT;
>> timeout = jiffies + msecs_to_jiffies(timeout);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] drm/amdgpu: increase hmm range get pages timeout
2023-12-13 16:23 ` Felix Kuehling
@ 2023-12-13 16:55 ` James Zhu
0 siblings, 0 replies; 10+ messages in thread
From: James Zhu @ 2023-12-13 16:55 UTC (permalink / raw)
To: Felix Kuehling, James Zhu, amd-gfx; +Cc: Philip.Yang, christian.koenig
On 2023-12-13 11:23, Felix Kuehling wrote:
>
> On 2023-12-13 10:24, James Zhu wrote:
>> Ping ...
>>
>> On 2023-12-08 18:01, James Zhu wrote:
>>> When application tries to allocate all system memory and cause memory
>>> to swap out. Needs more time for hmm_range_fault to validate the
>>> remaining page for allocation. To be safe, increase timeout value to
>>> 1 second for 64MB range.
>>>
>>> Signed-off-by: James Zhu <James.Zhu@amd.com>
>
> This is not the first time we're incrementing this timeout. Eventually
> we should get rid of that and find a way to make this work reliably
> without a timeout. There can always be situations where faults take
> longer, and we should not fail randomly in those cases.
>
> There are also some FIXMEs in this code that should be addressed at
> the same time.
>
> That said, as a short-term fix, this patch is
[JZ] Yes, it is just a short-term fix. the root cause is still under study,
>
> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
>
>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>>> index 081267161d40..b24eb5821fd1 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
>>> @@ -190,8 +190,8 @@ int amdgpu_hmm_range_get_pages(struct
>>> mmu_interval_notifier *notifier,
>>> pr_debug("hmm range: start = 0x%lx, end = 0x%lx",
>>> hmm_range->start, hmm_range->end);
>>> - /* Assuming 128MB takes maximum 1 second to fault page
>>> address */
>>> - timeout = max((hmm_range->end - hmm_range->start) >> 27, 1UL);
>>> + /* Assuming 64MB takes maximum 1 second to fault page
>>> address */
>>> + timeout = max((hmm_range->end - hmm_range->start) >> 26, 1UL);
>>> timeout *= HMM_RANGE_DEFAULT_TIMEOUT;
>>> timeout = jiffies + msecs_to_jiffies(timeout);
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-12-13 16:55 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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.