public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics <intel-gfx@lists.freedesktop.org>,
	linux-kernel@vger.kernel.org,
	DRI <dri-devel@lists.freedesktop.org>,
	linux-next@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>
Subject: Re: linux-next: manual merge of the tip tree with the drm-intel tree
Date: Tue, 8 Nov 2016 11:44:03 +0100	[thread overview]
Message-ID: <20161108104403.mi3onjfn65etrrtu@phenom.ffwll.local> (raw)
In-Reply-To: <20161108152541.096711bb@canb.auug.org.au>

On Tue, Nov 08, 2016 at 03:25:41PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> FIXME: Add owner of second tree to To:
>        Add author(s)/SOB of conflicting commits.
> 
> Today's linux-next merge of the tip tree got a conflict in:
> 
>   drivers/gpu/drm/i915/i915_gem_shrinker.c
> 
> between commits:
> 
>   1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking")
> 
> from the drm-intel tree and commit:
> 
>   3ab7c086d5ec ("locking/drm: Kill mutex trickery")
>   c7faee2109f9 ("locking/drm: Fix i915_gem_shrinker_lock() locking")

Hm, this seems to be the older versions that nuke the recursive locking
trickery entirely, I thought we had version in-flight that kept that? I
know that the i915 (and msm locking fwiw) is horrible since essentially
it's a recursive BKL, and we're working (slowly, after all getting rid of
the BKL wasn't simple either) to fix this. But meanwhile I'm assuming that
we'll still need this to be able to get out of low memory situations in
i915. Has that part simply not yet landed?

Thanks, Daniel

> 
> from the tip tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/gpu/drm/i915/i915_gem_shrinker.c
> index a6fc1bdc48af,e9bd2a81d03a..000000000000
> --- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
> +++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
> @@@ -35,33 -35,6 +35,15 @@@
>   #include "i915_drv.h"
>   #include "i915_trace.h"
>   
> - static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
> - {
> - 	if (!mutex_is_locked(mutex))
> - 		return false;
> - 
> - #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER)
> - 	return mutex->owner == task;
> - #else
> - 	/* Since UP may be pre-empted, we cannot assume that we own the lock */
> - 	return false;
> - #endif
> - }
> - 
>  +static bool i915_gem_shrinker_lock(struct drm_device *dev, bool *unlock)
>  +{
> - 	if (!mutex_trylock(&dev->struct_mutex)) {
> - 		if (!mutex_is_locked_by(&dev->struct_mutex, current))
> - 			return false;
> - 
> - 		*unlock = false;
> - 	} else {
> - 		*unlock = true;
> - 	}
> ++	if (!mutex_trylock(&dev->struct_mutex))
> ++		return false;
>  +
> ++	*unlock = true;
>  +	return true;
>  +}
>  +
>   static bool any_vma_pinned(struct drm_i915_gem_object *obj)
>   {
>   	struct i915_vma *vma;

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-11-08 10:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08  4:25 linux-next: manual merge of the tip tree with the drm-intel tree Stephen Rothwell
2016-11-08 10:44 ` Daniel Vetter [this message]
2016-11-08 13:24   ` Peter Zijlstra
2016-11-08 16:09     ` [Intel-gfx] " Daniel Vetter
2016-11-08 17:02       ` Peter Zijlstra
2016-11-08 17:04       ` [Intel-gfx] " Peter Zijlstra
2016-11-08 17:11         ` Daniel Vetter

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=20161108104403.mi3onjfn65etrrtu@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hpa@zytor.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /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