public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/gem: Fix gem_madvise for ttm+shmem objects
Date: Mon, 8 Nov 2021 12:39:19 +0000	[thread overview]
Message-ID: <7f53182e-71f9-f2d4-e744-75851707af67@intel.com> (raw)
In-Reply-To: <20211108123637.929617-1-thomas.hellstrom@linux.intel.com>

On 08/11/2021 12:36, Thomas Hellström wrote:
> Gem-TTM objects that are backed by shmem might have populated
> page-vectors without having the GEM pages set. Those objects
> aren't moved to the correct shrinker / purge list by gem_madvise.
> 
> For such objects, identified by having the
> _SELF_MANAGED_SHRINK_LIST set, make sure they end up on the
> correct list.
> 
> v2:
> - Revert a change that made swapped-out objects inaccessible for
>    truncating. (Matthew Auld)
> 
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

> ---
>   drivers/gpu/drm/i915/i915_gem.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index d0e642c82064..527228d4da7e 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1005,7 +1005,8 @@ i915_gem_madvise_ioctl(struct drm_device *dev, void *data,
>   			obj->ops->adjust_lru(obj);
>   	}
>   
> -	if (i915_gem_object_has_pages(obj)) {
> +	if (i915_gem_object_has_pages(obj) ||
> +	    i915_gem_object_has_self_managed_shrink_list(obj)) {
>   		unsigned long flags;
>   
>   		spin_lock_irqsave(&i915->mm.obj_lock, flags);
> 

  reply	other threads:[~2021-11-08 12:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 12:36 [Intel-gfx] [PATCH v2] drm/i915/gem: Fix gem_madvise for ttm+shmem objects Thomas Hellström
2021-11-08 12:39 ` Matthew Auld [this message]
2021-11-08 13:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gem: Fix gem_madvise for ttm+shmem objects (rev2) Patchwork
2021-11-08 14:44 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-11-08 14:48   ` Thomas Hellström
2021-11-08 18:19     ` Vudum, Lakshminarayana
2021-11-08 16:36 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork

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=7f53182e-71f9-f2d4-e744-75851707af67@intel.com \
    --to=matthew.auld@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.hellstrom@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox