public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: "Chris Wilson" <chris@chris-wilson.co.uk>,
	"Ingo Molnar" <mingo@redhat.com>,
	intel-gfx@lists.freedesktop.org,
	"Christian König" <christian.koenig@amd.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mutex: Report recursive ww_mutex locking early
Date: Mon, 30 May 2016 11:11:16 +0200	[thread overview]
Message-ID: <20160530091116.GP3192@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <4271f89a-ab98-2d97-fccb-3527931597ec@linux.intel.com>

On Mon, May 30, 2016 at 09:43:53AM +0200, Maarten Lankhorst wrote:
> Op 26-05-16 om 22:08 schreef Chris Wilson:
> > Recursive locking for ww_mutexes was originally conceived as an
> > exception. However, it is heavily used by the DRM atomic modesetting
> > code. Currently, the recursive deadlock is checked after we have queued
> > up for a busy-spin and as we never release the lock, we spin until
> > kicked, whereupon the deadlock is discovered and reported.
> >
> > A simple solution for the now common problem is to move the recursive
> > deadlock discovery to the first action when taking the ww_mutex.
> >
> > Testcase: igt/kms_cursor_legacy

I've no idea what this tag is or where to find the actual testcase, so
I've killed it.

> > Suggested-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Christian König <christian.koenig@amd.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: linux-kernel@vger.kernel.org
> > ---
> >
> > Maarten suggested this as a simpler fix to the immediate problem. Imo,
> > we still want to perform deadlock detection within the spin in order to
> > catch more complicated deadlocks without osq_lock() forcing fairness!
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> 
> Should this be Cc: stable@vger.kernel.org ?

Can do; how far back?

  reply	other threads:[~2016-05-30  9:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  8:31 [PATCH] mutex: Do not spin/queue before performing ww_mutex deadlock avoidance Chris Wilson
2016-05-26 10:37 ` Maarten Lankhorst
2016-05-26 10:43   ` Chris Wilson
2016-05-26 11:08     ` Maarten Lankhorst
2016-05-26 20:08 ` [PATCH] mutex: Report recursive ww_mutex locking early Chris Wilson
2016-05-30  7:43   ` Maarten Lankhorst
2016-05-30  9:11     ` Peter Zijlstra [this message]
2016-05-30  9:43       ` Maarten Lankhorst
2016-05-30 10:27         ` Peter Zijlstra
2016-05-30 10:45           ` Chris Wilson
2016-05-30 11:16             ` Maarten Lankhorst
2016-06-03 10:46   ` [tip:locking/core] locking/ww_mutex: " tip-bot for 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=20160530091116.GP3192@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=christian.koenig@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mingo@redhat.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