From: Joerg Roedel <joro@8bytes.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: mmu_notifier and i915_gem_userptr.c
Date: Thu, 26 Jun 2014 00:18:59 +0200 [thread overview]
Message-ID: <20140625221859.GD7732@8bytes.org> (raw)
In-Reply-To: <20140620114350.GH31771@8bytes.org>
On Fri, Jun 20, 2014 at 01:43:50PM +0200, Joerg Roedel wrote:
> Change_pte is also called when the underlying page of an address
> changes in the kernel which would matter for DMA. But that can only
> happen in KSM and uprobes code which is probably not of interest for the
> i915 driver.
>
> The other case where I think it matters is the do_wp_page() path for
> COW. The code works by calling invalidate_range_start -> change_pte ->
> invalidate_range_end. Your driver would react to this by unbinding the
> vma from itself internally (after a fork for example).
>
> But I have to check whether this really matters here.
Okay, I think it does not matter for the i915 driver. The code-paths
which map pages read-only for COW invoke invalidate_range_start/end on
the page-ranges which causes the driver to unbind the pages.
When get_user_pages() is called again later it will do the COW by
itself, so the driver doesn't need to care.
So I tend to say that the i915 driver does not need a change_pte()
call-back at all. But probably someone should double-check to make sure
I didn't miss something.
Joerg
WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Jani Nikula <jani.nikula@linux.intel.com>,
David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: mmu_notifier and i915_gem_userptr.c
Date: Thu, 26 Jun 2014 00:18:59 +0200 [thread overview]
Message-ID: <20140625221859.GD7732@8bytes.org> (raw)
In-Reply-To: <20140620114350.GH31771@8bytes.org>
On Fri, Jun 20, 2014 at 01:43:50PM +0200, Joerg Roedel wrote:
> Change_pte is also called when the underlying page of an address
> changes in the kernel which would matter for DMA. But that can only
> happen in KSM and uprobes code which is probably not of interest for the
> i915 driver.
>
> The other case where I think it matters is the do_wp_page() path for
> COW. The code works by calling invalidate_range_start -> change_pte ->
> invalidate_range_end. Your driver would react to this by unbinding the
> vma from itself internally (after a fork for example).
>
> But I have to check whether this really matters here.
Okay, I think it does not matter for the i915 driver. The code-paths
which map pages read-only for COW invoke invalidate_range_start/end on
the page-ranges which causes the driver to unbind the pages.
When get_user_pages() is called again later it will do the COW by
itself, so the driver doesn't need to care.
So I tend to say that the i915 driver does not need a change_pte()
call-back at all. But probably someone should double-check to make sure
I didn't miss something.
Joerg
next prev parent reply other threads:[~2014-06-25 22:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 15:36 mmu_notifier and i915_gem_userptr.c Joerg Roedel
2014-06-19 16:02 ` Chris Wilson
2014-06-19 16:02 ` Chris Wilson
2014-06-20 11:43 ` Joerg Roedel
2014-06-20 11:43 ` Joerg Roedel
2014-06-25 22:18 ` Joerg Roedel [this message]
2014-06-25 22:18 ` Joerg Roedel
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=20140625221859.GD7732@8bytes.org \
--to=joro@8bytes.org \
--cc=airlied@linux.ie \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.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 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.