All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: fixup igt_shrink_thp
Date: Thu, 29 Jul 2021 11:53:45 +0100	[thread overview]
Message-ID: <c5365359-0a0d-2232-5fde-c1f4caf45cc6@linux.intel.com> (raw)
In-Reply-To: <20210728155013.1741657-1-matthew.auld@intel.com>


Hi Matt,

On 28/07/2021 16:50, Matthew Auld wrote:
> Since the object might still be active here, the shrink_all will simply
> ignore it, which blows up in the test, since the pages will still be
> there. Currently THP is disabled which should result in the test being
> skipped, but if we ever re-enable THP we might start seeing the failure.
> Fix this by forcing I915_SHRINK_ACTIVE.
> 
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 5 ++++-
>   1 file changed, 4 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 a094f3ce1a90..7a67e880b562 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> @@ -1575,7 +1575,10 @@ static int igt_shrink_thp(void *arg)
>   	 * Now that the pages are *unpinned* shrink-all should invoke
>   	 * shmem to truncate our pages.
>   	 */
> -	i915_gem_shrink_all(i915);
> +	i915_gem_shrink(NULL, i915, -1UL, NULL,
> +			I915_SHRINK_BOUND |
> +			I915_SHRINK_UNBOUND |
> +			I915_SHRINK_ACTIVE);
>   	if (i915_gem_object_has_pages(obj)) {
>   		pr_err("shrink-all didn't truncate the pages\n");
>   		err = -EINVAL;
> 

I did s/shrink-all/shrinking/ locally in the comment above, and in 
pr_err below the call to shrinker. Are you okay if I repost like that 
and with my r-b as part of my series?

Regards,

Tvrtko

WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: fixup igt_shrink_thp
Date: Thu, 29 Jul 2021 11:53:45 +0100	[thread overview]
Message-ID: <c5365359-0a0d-2232-5fde-c1f4caf45cc6@linux.intel.com> (raw)
In-Reply-To: <20210728155013.1741657-1-matthew.auld@intel.com>


Hi Matt,

On 28/07/2021 16:50, Matthew Auld wrote:
> Since the object might still be active here, the shrink_all will simply
> ignore it, which blows up in the test, since the pages will still be
> there. Currently THP is disabled which should result in the test being
> skipped, but if we ever re-enable THP we might start seeing the failure.
> Fix this by forcing I915_SHRINK_ACTIVE.
> 
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 5 ++++-
>   1 file changed, 4 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 a094f3ce1a90..7a67e880b562 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> @@ -1575,7 +1575,10 @@ static int igt_shrink_thp(void *arg)
>   	 * Now that the pages are *unpinned* shrink-all should invoke
>   	 * shmem to truncate our pages.
>   	 */
> -	i915_gem_shrink_all(i915);
> +	i915_gem_shrink(NULL, i915, -1UL, NULL,
> +			I915_SHRINK_BOUND |
> +			I915_SHRINK_UNBOUND |
> +			I915_SHRINK_ACTIVE);
>   	if (i915_gem_object_has_pages(obj)) {
>   		pr_err("shrink-all didn't truncate the pages\n");
>   		err = -EINVAL;
> 

I did s/shrink-all/shrinking/ locally in the comment above, and in 
pr_err below the call to shrinker. Are you okay if I repost like that 
and with my r-b as part of my series?

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2021-07-29 10:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 15:50 [PATCH] drm/i915/selftests: fixup igt_shrink_thp Matthew Auld
2021-07-28 15:50 ` [Intel-gfx] " Matthew Auld
2021-07-28 16:55 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-07-28 19:53 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-07-29 10:53 ` Tvrtko Ursulin [this message]
2021-07-29 10:53   ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2021-07-29 10:55   ` Matthew Auld
2021-07-29 10:55     ` Matthew Auld
2021-09-06  9:17 Matthew Auld
2021-09-06 12:19 ` Tvrtko Ursulin
2021-09-06 12:30   ` Matthew Auld
2021-09-06 12:53     ` Tvrtko Ursulin
2021-09-06 13:48       ` Matthew Auld
2021-09-06 15:52         ` Tvrtko Ursulin

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=c5365359-0a0d-2232-5fde-c1f4caf45cc6@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.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.