On Sat, Mar 12, 2016 at 11:54:58AM +0000, Jean-S??bastien P??dron wrote:
> Author: dumbbell
> Date: Sat Mar 12 11:54:58 2016
> New Revision: 296720
> URL: https://svnweb.freebsd.org/changeset/base/296720
> 
> Log:
>   drm/i915: Fix page fault handler failure
>   
>   ... when __wait_seqno() is interrupted by a signal. In this case,
>   __wait_seqno() returns -ERESTARTSYS. Like we already do in drm_ioctl(),
>   we need to convert this error to a common code such as -EINTR, so the
>   page fault handler is restarted.
>   
>   Reported by:        Frederic Chardon <chardon.frede...@gmail.com>
>   Tested by:  Frederic Chardon <chardon.frede...@gmail.com>
> 
> Modified:
>   head/sys/dev/drm2/i915/i915_gem.c
> 
> Modified: head/sys/dev/drm2/i915/i915_gem.c
> ==============================================================================
> --- head/sys/dev/drm2/i915/i915_gem.c Sat Mar 12 09:44:23 2016        
> (r296719)
> +++ head/sys/dev/drm2/i915/i915_gem.c Sat Mar 12 11:54:58 2016        
> (r296720)
> @@ -1619,6 +1619,13 @@ out:
>       KASSERT(ret != 0, ("i915_gem_pager_fault: wrong return"));
>       CTR4(KTR_DRM, "fault_fail %p %jx %x err %d", gem_obj, offset, prot,
>           -ret);
> +     if (ret == -ERESTARTSYS) {
> +             /*
> +              * NOTE Linux<->FreeBSD: Convert Linux' -ERESTARTSYS to
> +              * the more common -EINTR, so the page fault is retried.
> +              */
> +             ret = -EINTR;
> +     }
>       if (ret == -EAGAIN || ret == -EIO || ret == -EINTR) {
>               kern_yield(PRI_USER);
>               goto retry;

It may be that the time come to remove i915_intr_pf tunable, and always
take device lock non-interruptible in i915 fault handler. TTM behaves
that way, and I think that situations where I used interruptible page
handlers, AFAIR to kill X or other gem clients in case of OOM, really not
useful to users.

_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to