linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	linux-arch@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>,
	x86@kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
	rob clark <robclark@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] mutex: add support for reservation style locks, v2
Date: Thu, 18 Apr 2013 20:37:02 +0300	[thread overview]
Message-ID: <20130418173702.GV4469@intel.com> (raw)
In-Reply-To: <CAKMK7uHst+s9x0u4J04Qck26EeeUDOORM_SgYovmjV4c+mKP0w@mail.gmail.com>

On Wed, Apr 17, 2013 at 09:08:17PM +0200, Daniel Vetter wrote:
> On Wed, Apr 10, 2013 at 12:28 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > On Thu, Apr 04, 2013 at 06:41:02PM +0200, Peter Zijlstra wrote:
> >> On Thu, 2013-04-04 at 15:31 +0200, Daniel Vetter wrote:
> >> > The thing is now that you're not expected to hold these locks for a
> >> > long
> >> > time - if you need to synchronously stall while holding a lock
> >> > performance
> >> > will go down the gutters anyway. And since most current
> >> > gpus/co-processors
> >> > still can't really preempt fairness isn't that high a priority,
> >> > either.
> >> > So we didn't think too much about that.
> >>
> >> Yeah but you're proposing a new synchronization primitive for the core
> >> kernel.. all such 'fun' details need to be considered, not only those
> >> few that bear on the one usecase.
> >
> > Which bares the question, what other use cases are there?
> 
> Just stumbled over one I think: If we have a big graph of connected
> things (happens really often for video pipelines). And we want
> multiple users to use them in parallel. But sometimes a configuration
> change could take way too long and so would unduly stall a 2nd thread
> with just a global mutex, then per-object ww_mutexes would be a fit:
> You'd start with grabbing all the locks for the objects you want to
> change anything with, then grab anything in the graph that you also
> need to check. Thanks to loop detection and self-recursion this would
> all nicely work out, even for cyclic graphs of objects.

Indeed, that would make the locking for atomic modeset/page flip very
easy to handle, while still allowing the use of suitable fine grained
locks. I like the idea.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-04-18 17:37 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28 10:24 [PATCH v2 1/3] arch: make __mutex_fastpath_lock_retval return whether fastpath succeeded or not Maarten Lankhorst
2013-02-28 10:24 ` Maarten Lankhorst
2013-02-28 10:25 ` [PATCH v2 2/3] mutex: add support for reservation style locks, v2 Maarten Lankhorst
2013-02-28 10:25   ` Maarten Lankhorst
2013-04-02 10:56   ` Peter Zijlstra
2013-04-02 10:56     ` Peter Zijlstra
2013-04-02 10:57   ` Peter Zijlstra
2013-04-02 11:00   ` Peter Zijlstra
2013-04-02 14:57     ` Maarten Lankhorst
2013-04-02 14:57       ` Maarten Lankhorst
2013-04-02 16:59       ` Peter Zijlstra
2013-04-02 17:23         ` Daniel Vetter
2013-04-02 17:23           ` Daniel Vetter
2013-04-02 17:30         ` Daniel Vetter
2013-04-02 17:30           ` Daniel Vetter
2013-04-04 12:01         ` Peter Zijlstra
2013-04-04 12:01           ` Peter Zijlstra
2013-04-04 13:31           ` Daniel Vetter
2013-04-04 16:33             ` Peter Zijlstra
2013-04-04 16:33               ` Peter Zijlstra
2013-04-04 16:38             ` Peter Zijlstra
2013-04-04 16:38               ` Peter Zijlstra
2013-04-04 16:59               ` Daniel Vetter
2013-04-09 22:27               ` Steven Rostedt
2013-04-10  8:27                 ` Daniel Vetter
2013-04-10  8:27                   ` Daniel Vetter
2013-04-04 16:39             ` Peter Zijlstra
2013-04-04 16:39               ` Peter Zijlstra
2013-04-04 16:41             ` Peter Zijlstra
2013-04-04 16:41               ` Peter Zijlstra
2013-04-09 22:28               ` Steven Rostedt
2013-04-10  9:33                 ` Daniel Vetter
2013-04-17 19:08                 ` Daniel Vetter
2013-04-18 17:37                   ` Ville Syrjälä [this message]
2013-04-04 16:43             ` Peter Zijlstra
2013-04-04 16:43               ` Peter Zijlstra
2013-04-04 16:46             ` Peter Zijlstra
2013-04-04 16:46               ` Peter Zijlstra
2013-04-04 16:49             ` Peter Zijlstra
2013-04-04 16:49               ` Peter Zijlstra
2013-04-04 20:44               ` Daniel Vetter
2013-04-04 16:54             ` Peter Zijlstra
2013-04-04 16:54               ` Peter Zijlstra
2013-04-04 16:56             ` Daniel Vetter
2013-04-04 16:56               ` Daniel Vetter
2013-04-08 10:39               ` Peter Zijlstra
2013-04-08 11:50                 ` Daniel Vetter
2013-04-08 11:50                   ` Daniel Vetter
2013-04-10 10:34                   ` Daniel Vetter
2013-04-09 22:42               ` Steven Rostedt
2013-04-10  7:34                 ` Peter Zijlstra
2013-04-09 22:18         ` Steven Rostedt
2013-04-02 15:56     ` Daniel Vetter
2013-04-02 11:04   ` Peter Zijlstra
2013-04-02 11:04     ` Peter Zijlstra
2013-02-28 10:25 ` [PATCH v2 3/3] reservation: Add tests to lib/locking-selftest.c. v2 Maarten Lankhorst
2013-03-09 12:06 ` [Linaro-mm-sig] [PATCH v2 1/3] arch: make __mutex_fastpath_lock_retval return whether fastpath succeeded or not Francesco Lavra

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=20130418173702.GV4469@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=robclark@gmail.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).