From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/7] drm/i915: Track user GTT faulting per-vma
Date: Mon, 09 Oct 2017 15:14:33 +0300 [thread overview]
Message-ID: <1507551273.6297.24.camel@linux.intel.com> (raw)
In-Reply-To: <20171009084401.29090-3-chris@chris-wilson.co.uk>
On Mon, 2017-10-09 at 09:43 +0100, Chris Wilson wrote:
> We don't wish to refault the entire object (other vma) when unbinding
> one partial vma. To do this track which vma have been faulted into the
> user's address space.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
<SNIP>
> @@ -683,6 +683,29 @@ static void __i915_vma_iounmap(struct i915_vma *vma)
> vma->iomap = NULL;
> }
>
> +void i915_vma_revoke_mmap(struct i915_vma *vma)
> +{
> + struct drm_vma_offset_node *node = &vma->obj->base.vma_node;
> +
> + lockdep_assert_held(&vma->vm->i915->drm.struct_mutex);
> +
> + if (!i915_vma_has_userfault(vma))
> + return;
> +
> + GEM_BUG_ON(!i915_vma_is_map_and_fenceable(vma));
> + GEM_BUG_ON(!vma->obj->userfault_count);
> +
> + unmap_mapping_range(vma->vm->i915->drm.anon_inode->i_mapping,
> + drm_vma_node_offset_addr(node) +
> + (vma->ggtt_view.partial.offset << PAGE_SHIFT),
Maybe compute this on a separate variable to not to confuse reader with
strange indent. "drm_vma_node_offset_addr(node) + vma_offset" would
read nicely.
Every other patch I read that touches the ggtt_views could use the
variables to be in page counts and others in byte counts...
Anyway,
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-09 12:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 8:43 [PATCH 1/7] drm/i915: Pin fence for iomap Chris Wilson
2017-10-09 8:43 ` [PATCH 2/7] drm/i915: Consolidate get_fence with pin_fence Chris Wilson
2017-10-09 10:38 ` Joonas Lahtinen
2017-10-09 8:43 ` [PATCH 3/7] drm/i915: Track user GTT faulting per-vma Chris Wilson
2017-10-09 12:14 ` Joonas Lahtinen [this message]
2017-10-09 8:43 ` [PATCH 4/7] drm/i915: Check PIN_NONFAULT overlaps in evict_for_node Chris Wilson
2017-10-09 12:17 ` Joonas Lahtinen
2017-10-09 13:39 ` Chris Wilson
2017-10-09 8:43 ` [PATCH 5/7] drm/i915: Try a minimal attempt to insert the whole object for relocations Chris Wilson
2017-10-09 12:18 ` Joonas Lahtinen
2017-10-09 8:44 ` [PATCH 6/7] drm/i915: Avoid evicting user fault mappable vma for pread/pwrite Chris Wilson
2017-10-09 12:19 ` Joonas Lahtinen
2017-10-09 8:44 ` [PATCH 7/7] drm/i915: Early rejection of mappable GGTT pin attempts for large bo Chris Wilson
2017-10-09 12:26 ` Joonas Lahtinen
2017-10-09 9:15 ` ✓ Fi.CI.BAT: success for series starting with [1/7] drm/i915: Pin fence for iomap Patchwork
2017-10-09 10:16 ` ✓ Fi.CI.IGT: " Patchwork
2017-10-09 13:51 ` Chris Wilson
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=1507551273.6297.24.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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