* [PATCH] drm/i915/selftests: exercise shmem_writeback with THP
@ 2021-09-21 14:21 Matthew Auld
2021-09-22 8:08 ` Tvrtko Ursulin
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Auld @ 2021-09-21 14:21 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel, Tvrtko Ursulin
In commit:
commit 1e6decf30af5c5c75445ed6ad4e65a26de578a03
Author: Hugh Dickins <hughd@google.com>
Date: Thu Sep 2 14:54:43 2021 -0700
shmem: shmem_writepage() split unlikely i915 THP
it looks THP + shmem_writeback was an unexpected combination, and ends up
hitting some BUG_ON, but it also looks like that is now fixed.
While the IGTs did eventually hit this(although not during pre-merge it
seems), it's likely worthwhile adding some explicit coverage for this
scenario in the shrink_thp selftest.
References: https://gitlab.freedesktop.org/drm/intel/-/issues/4166
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
---
drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
index 0827634c842c..8260a533d43f 100644
--- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
@@ -1589,7 +1589,8 @@ static int igt_shrink_thp(void *arg)
i915_gem_shrink(NULL, i915, -1UL, NULL,
I915_SHRINK_BOUND |
I915_SHRINK_UNBOUND |
- I915_SHRINK_ACTIVE);
+ I915_SHRINK_ACTIVE |
+ I915_SHRINK_WRITEBACK);
if (should_swap == i915_gem_object_has_pages(obj)) {
pr_err("unexpected pages mismatch, should_swap=%s\n",
yesno(should_swap));
--
2.26.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] drm/i915/selftests: exercise shmem_writeback with THP
2021-09-21 14:21 [PATCH] drm/i915/selftests: exercise shmem_writeback with THP Matthew Auld
@ 2021-09-22 8:08 ` Tvrtko Ursulin
0 siblings, 0 replies; 2+ messages in thread
From: Tvrtko Ursulin @ 2021-09-22 8:08 UTC (permalink / raw)
To: Matthew Auld, intel-gfx; +Cc: dri-devel
On 21/09/2021 15:21, Matthew Auld wrote:
> In commit:
>
> commit 1e6decf30af5c5c75445ed6ad4e65a26de578a03
> Author: Hugh Dickins <hughd@google.com>
> Date: Thu Sep 2 14:54:43 2021 -0700
>
> shmem: shmem_writepage() split unlikely i915 THP
>
> it looks THP + shmem_writeback was an unexpected combination, and ends up
> hitting some BUG_ON, but it also looks like that is now fixed.
>
> While the IGTs did eventually hit this(although not during pre-merge it
> seems), it's likely worthwhile adding some explicit coverage for this
> scenario in the shrink_thp selftest.
>
> References: https://gitlab.freedesktop.org/drm/intel/-/issues/4166
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> index 0827634c842c..8260a533d43f 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> @@ -1589,7 +1589,8 @@ static int igt_shrink_thp(void *arg)
> i915_gem_shrink(NULL, i915, -1UL, NULL,
> I915_SHRINK_BOUND |
> I915_SHRINK_UNBOUND |
> - I915_SHRINK_ACTIVE);
> + I915_SHRINK_ACTIVE |
> + I915_SHRINK_WRITEBACK);
> if (should_swap == i915_gem_object_has_pages(obj)) {
> pr_err("unexpected pages mismatch, should_swap=%s\n",
> yesno(should_swap));
>
Good idea I think.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-22 8:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-21 14:21 [PATCH] drm/i915/selftests: exercise shmem_writeback with THP Matthew Auld
2021-09-22 8:08 ` Tvrtko Ursulin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox