Message ID | 20230113114903.7824-1-nirmoy.das@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/selftests: Unwind hugepages to drop wakeref on error | expand |
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>
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>
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>
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>
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);
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);