* [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error
@ 2023-01-13 11:49 Nirmoy Das
2023-01-13 11:51 ` Matthew Auld
2023-01-16 11:21 ` Andrzej Hajda
0 siblings, 2 replies; 9+ messages in thread
From: Nirmoy Das @ 2023-01-13 11:49 UTC (permalink / raw)
To: intel-gfx; +Cc: Nirmoy Das, chris.p.wilson, matthew.auld, dri-devel
From: Chris Wilson <chris.p.wilson@linux.intel.com>
Make sure that upon error after we have acquired the wakeref we do
release it again.
Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
index c281b0ec9e05..295d6f2cc4ff 100644
--- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
@@ -1855,7 +1855,7 @@ static int igt_shrink_thp(void *arg)
I915_SHRINK_ACTIVE);
i915_vma_unpin(vma);
if (err)
- goto out_put;
+ goto out_wf;
/*
* Now that the pages are *unpinned* shrinking should invoke
@@ -1871,7 +1871,7 @@ static int igt_shrink_thp(void *arg)
pr_err("unexpected pages mismatch, should_swap=%s\n",
str_yes_no(should_swap));
err = -EINVAL;
- goto out_put;
+ goto out_wf;
}
if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) {
@@ -1883,7 +1883,7 @@ static int igt_shrink_thp(void *arg)
err = i915_vma_pin(vma, 0, 0, flags);
if (err)
- goto out_put;
+ goto out_wf;
while (n--) {
err = cpu_check(obj, n, 0xdeadbeaf);
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error
2023-01-13 11:49 [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error Nirmoy Das
@ 2023-01-13 11:51 ` Matthew Auld
2023-01-13 12:02 ` Das, Nirmoy
2023-01-16 11:21 ` Andrzej Hajda
1 sibling, 1 reply; 9+ messages in thread
From: Matthew Auld @ 2023-01-13 11:51 UTC (permalink / raw)
To: Nirmoy Das, intel-gfx; +Cc: chris.p.wilson, dri-devel
On 13/01/2023 11:49, Nirmoy Das wrote:
> From: Chris Wilson <chris.p.wilson@linux.intel.com>
>
> Make sure that upon error after we have acquired the wakeref we do
> release it again.
>
> Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error
2023-01-13 11:51 ` Matthew Auld
@ 2023-01-13 12:02 ` Das, Nirmoy
2023-01-13 12:05 ` Matthew Auld
0 siblings, 1 reply; 9+ messages in thread
From: Das, Nirmoy @ 2023-01-13 12:02 UTC (permalink / raw)
To: Matthew Auld, Nirmoy Das, intel-gfx; +Cc: chris.p.wilson, dri-devel
Thanks Matt, I missed the Fixes tag so resent it with fixes and Cc to
stable.
On 1/13/2023 12:51 PM, Matthew Auld wrote:
> On 13/01/2023 11:49, Nirmoy Das wrote:
>> From: Chris Wilson <chris.p.wilson@linux.intel.com>
>>
>> Make sure that upon error after we have acquired the wakeref we do
>> release it again.
>>
>> Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error
2023-01-13 12:02 ` Das, Nirmoy
@ 2023-01-13 12:05 ` Matthew Auld
2023-01-13 12:07 ` Das, Nirmoy
0 siblings, 1 reply; 9+ messages in thread
From: Matthew Auld @ 2023-01-13 12:05 UTC (permalink / raw)
To: Das, Nirmoy, Nirmoy Das, intel-gfx; +Cc: chris.p.wilson, dri-devel
On 13/01/2023 12:02, Das, Nirmoy wrote:
> Thanks Matt, I missed the Fixes tag so resent it with fixes and Cc to
> stable.
I don't think kernel selftests are really stable material. AFAIK it's
not something normal users care about.
>
> On 1/13/2023 12:51 PM, Matthew Auld wrote:
>> On 13/01/2023 11:49, Nirmoy Das wrote:
>>> From: Chris Wilson <chris.p.wilson@linux.intel.com>
>>>
>>> Make sure that upon error after we have acquired the wakeref we do
>>> release it again.
>>>
>>> Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
>>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error
2023-01-13 12:05 ` Matthew Auld
@ 2023-01-13 12:07 ` Das, Nirmoy
0 siblings, 0 replies; 9+ messages in thread
From: Das, Nirmoy @ 2023-01-13 12:07 UTC (permalink / raw)
To: Matthew Auld, Nirmoy Das, intel-gfx; +Cc: chris.p.wilson, dri-devel
On 1/13/2023 1:05 PM, Matthew Auld wrote:
> On 13/01/2023 12:02, Das, Nirmoy wrote:
>> Thanks Matt, I missed the Fixes tag so resent it with fixes and Cc to
>> stable.
>
> I don't think kernel selftests are really stable material. AFAIK it's
> not something normal users care about.
True, in that case please ignore the latest copy of this patch!.
Thanks,
Nirmoy
>
>>
>> On 1/13/2023 12:51 PM, Matthew Auld wrote:
>>> On 13/01/2023 11:49, Nirmoy Das wrote:
>>>> From: Chris Wilson <chris.p.wilson@linux.intel.com>
>>>>
>>>> Make sure that upon error after we have acquired the wakeref we do
>>>> release it again.
>>>>
>>>> Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
>>>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>>> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error
2023-01-13 11:49 [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error Nirmoy Das
2023-01-13 11:51 ` Matthew Auld
@ 2023-01-16 11:21 ` Andrzej Hajda
1 sibling, 0 replies; 9+ messages in thread
From: Andrzej Hajda @ 2023-01-16 11:21 UTC (permalink / raw)
To: Nirmoy Das, intel-gfx; +Cc: chris.p.wilson, matthew.auld, dri-devel
On 13.01.2023 12:49, Nirmoy Das wrote:
> From: Chris Wilson <chris.p.wilson@linux.intel.com>
>
> Make sure that upon error after we have acquired the wakeref we do
> release it again.
>
> Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Regards
Andrzej
> ---
> drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> index c281b0ec9e05..295d6f2cc4ff 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> @@ -1855,7 +1855,7 @@ static int igt_shrink_thp(void *arg)
> I915_SHRINK_ACTIVE);
> i915_vma_unpin(vma);
> if (err)
> - goto out_put;
> + goto out_wf;
>
> /*
> * Now that the pages are *unpinned* shrinking should invoke
> @@ -1871,7 +1871,7 @@ static int igt_shrink_thp(void *arg)
> pr_err("unexpected pages mismatch, should_swap=%s\n",
> str_yes_no(should_swap));
> err = -EINVAL;
> - goto out_put;
> + goto out_wf;
> }
>
> if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) {
> @@ -1883,7 +1883,7 @@ static int igt_shrink_thp(void *arg)
>
> err = i915_vma_pin(vma, 0, 0, flags);
> if (err)
> - goto out_put;
> + goto out_wf;
>
> while (n--) {
> err = cpu_check(obj, n, 0xdeadbeaf);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error
@ 2023-01-13 12:00 Nirmoy Das
2023-01-16 18:49 ` Andi Shyti
0 siblings, 1 reply; 9+ messages in thread
From: Nirmoy Das @ 2023-01-13 12:00 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel, stable, matthew.auld, chris.p.wilson, Nirmoy Das
From: Chris Wilson <chris.p.wilson@linux.intel.com>
Make sure that upon error after we have acquired the wakeref we do
release it again.
Fixes: 027c38b4121e ("drm/i915/selftests: Grab the runtime pm in shrink_thp")
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Cc: <stable@vger.kernel.org> # v6.0+
---
drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
index c281b0ec9e05..295d6f2cc4ff 100644
--- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
@@ -1855,7 +1855,7 @@ static int igt_shrink_thp(void *arg)
I915_SHRINK_ACTIVE);
i915_vma_unpin(vma);
if (err)
- goto out_put;
+ goto out_wf;
/*
* Now that the pages are *unpinned* shrinking should invoke
@@ -1871,7 +1871,7 @@ static int igt_shrink_thp(void *arg)
pr_err("unexpected pages mismatch, should_swap=%s\n",
str_yes_no(should_swap));
err = -EINVAL;
- goto out_put;
+ goto out_wf;
}
if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) {
@@ -1883,7 +1883,7 @@ static int igt_shrink_thp(void *arg)
err = i915_vma_pin(vma, 0, 0, flags);
if (err)
- goto out_put;
+ goto out_wf;
while (n--) {
err = cpu_check(obj, n, 0xdeadbeaf);
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error
2023-01-13 12:00 Nirmoy Das
@ 2023-01-16 18:49 ` Andi Shyti
2023-01-17 8:57 ` Das, Nirmoy
0 siblings, 1 reply; 9+ messages in thread
From: Andi Shyti @ 2023-01-16 18:49 UTC (permalink / raw)
To: Nirmoy Das; +Cc: dri-devel, intel-gfx, stable, matthew.auld, chris.p.wilson
Hi Nirmoy,
On Fri, Jan 13, 2023 at 01:00:53PM +0100, Nirmoy Das wrote:
> From: Chris Wilson <chris.p.wilson@linux.intel.com>
>
> Make sure that upon error after we have acquired the wakeref we do
> release it again.
>
> Fixes: 027c38b4121e ("drm/i915/selftests: Grab the runtime pm in shrink_thp")
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> Cc: <stable@vger.kernel.org> # v6.0+
> ---
> drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> index c281b0ec9e05..295d6f2cc4ff 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> @@ -1855,7 +1855,7 @@ static int igt_shrink_thp(void *arg)
> I915_SHRINK_ACTIVE);
> i915_vma_unpin(vma);
> if (err)
> - goto out_put;
> + goto out_wf;
>
> /*
> * Now that the pages are *unpinned* shrinking should invoke
> @@ -1871,7 +1871,7 @@ static int igt_shrink_thp(void *arg)
> pr_err("unexpected pages mismatch, should_swap=%s\n",
> str_yes_no(should_swap));
> err = -EINVAL;
> - goto out_put;
> + goto out_wf;
> }
aren't we missing here one out_put -> out_wf change?
This one:
@@ -1878,7 +1878,7 @@ static int igt_shrink_thp(void *arg)
pr_err("unexpected residual page-size bits, should_swap=%s\n",
str_yes_no(should_swap));
err = -EINVAL;
- goto out_put;
+ goto out_wf;
}
err = i915_vma_pin(vma, 0, 0, flags);
Andi
>
> if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) {
> @@ -1883,7 +1883,7 @@ static int igt_shrink_thp(void *arg)
>
> err = i915_vma_pin(vma, 0, 0, flags);
> if (err)
> - goto out_put;
> + goto out_wf;
>
> while (n--) {
> err = cpu_check(obj, n, 0xdeadbeaf);
> --
> 2.39.0
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error
2023-01-16 18:49 ` Andi Shyti
@ 2023-01-17 8:57 ` Das, Nirmoy
0 siblings, 0 replies; 9+ messages in thread
From: Das, Nirmoy @ 2023-01-17 8:57 UTC (permalink / raw)
To: Andi Shyti, Nirmoy Das
Cc: intel-gfx, chris.p.wilson, stable, dri-devel, matthew.auld
On 1/16/2023 7:49 PM, Andi Shyti wrote:
> Hi Nirmoy,
>
> On Fri, Jan 13, 2023 at 01:00:53PM +0100, Nirmoy Das wrote:
>> From: Chris Wilson <chris.p.wilson@linux.intel.com>
>>
>> Make sure that upon error after we have acquired the wakeref we do
>> release it again.
>>
>> Fixes: 027c38b4121e ("drm/i915/selftests: Grab the runtime pm in shrink_thp")
>> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
>> Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>> Cc: <stable@vger.kernel.org> # v6.0+
>> ---
>> drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
>> index c281b0ec9e05..295d6f2cc4ff 100644
>> --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
>> +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
>> @@ -1855,7 +1855,7 @@ static int igt_shrink_thp(void *arg)
>> I915_SHRINK_ACTIVE);
>> i915_vma_unpin(vma);
>> if (err)
>> - goto out_put;
>> + goto out_wf;
>>
>> /*
>> * Now that the pages are *unpinned* shrinking should invoke
>> @@ -1871,7 +1871,7 @@ static int igt_shrink_thp(void *arg)
>> pr_err("unexpected pages mismatch, should_swap=%s\n",
>> str_yes_no(should_swap));
>> err = -EINVAL;
>> - goto out_put;
>> + goto out_wf;
>> }
> aren't we missing here one out_put -> out_wf change?
>
> This one:
>
> @@ -1878,7 +1878,7 @@ static int igt_shrink_thp(void *arg)
> pr_err("unexpected residual page-size bits, should_swap=%s\n",
> str_yes_no(should_swap));
> err = -EINVAL;
> - goto out_put;
> + goto out_wf;
Thanks for catching this. Yes, we need this too. I will resend.
Nirmoy
> }
>
> err = i915_vma_pin(vma, 0, 0, flags);
>
> Andi
>
>>
>> if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) {
>> @@ -1883,7 +1883,7 @@ static int igt_shrink_thp(void *arg)
>>
>> err = i915_vma_pin(vma, 0, 0, flags);
>> if (err)
>> - goto out_put;
>> + goto out_wf;
>>
>> while (n--) {
>> err = cpu_check(obj, n, 0xdeadbeaf);
>> --
>> 2.39.0
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-01-17 8:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-13 11:49 [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error Nirmoy Das
2023-01-13 11:51 ` Matthew Auld
2023-01-13 12:02 ` Das, Nirmoy
2023-01-13 12:05 ` Matthew Auld
2023-01-13 12:07 ` Das, Nirmoy
2023-01-16 11:21 ` Andrzej Hajda
-- strict thread matches above, loose matches on Subject: below --
2023-01-13 12:00 Nirmoy Das
2023-01-16 18:49 ` Andi Shyti
2023-01-17 8:57 ` Das, Nirmoy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox