From: Peter Zijlstra <peterz@infradead.org>
To: Maarten Lankhorst <dev@mblankhorst.nl>
Cc: "Nicolai Hähnle" <nhaehnle@gmail.com>,
linux-kernel@vger.kernel.org,
"Nicolai Hähnle" <Nicolai.Haehnle@amd.com>,
"Ingo Molnar" <mingo@redhat.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Chris Wilson" <chris@chris-wilson.co.uk>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL context
Date: Mon, 28 Nov 2016 13:50:24 +0100 [thread overview]
Message-ID: <20161128125024.GZ3092@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <03202725-ecf3-1b49-f22a-1cbff84156bc@mblankhorst.nl>
On Mon, Nov 28, 2016 at 01:42:26PM +0100, Maarten Lankhorst wrote:
> > + ww_mutex_lock(&resv->lock.base, NULL);
> Yuck, can we rename base to __NEVER_TOUCH_DIRECTLY_OUTSIDE_LOCKING_CORE?
> It's harder to get them confused like that, even with a null context it's illegal to call mutex_lock/unlock directly.
I think there's a __private sparse annotation that could be used.
next prev parent reply other threads:[~2016-11-28 12:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-28 12:20 [PATCH 00/11] locking/ww_mutex: Keep sorted wait list to avoid stampedes Nicolai Hähnle
2016-11-28 12:20 ` [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL context Nicolai Hähnle
2016-11-28 12:42 ` Maarten Lankhorst
2016-11-28 12:50 ` Peter Zijlstra [this message]
2016-11-28 12:58 ` Christian König
2016-11-28 12:20 ` [PATCH 02/11] locking/ww_mutex: Re-check ww->ctx in the inner optimistic spin loop Nicolai Hähnle
2016-11-28 12:20 ` [PATCH 03/11] locking/ww_mutex: Extract stamp comparison to __ww_mutex_stamp_after Nicolai Hähnle
2016-11-28 12:20 ` [PATCH 04/11] locking/ww_mutex: Set use_ww_ctx even when locking without a context Nicolai Hähnle
2016-11-28 12:20 ` [PATCH 05/11] locking/ww_mutex: Add waiters in stamp order Nicolai Hähnle
2016-11-30 14:10 ` Chris Wilson
2016-11-28 12:20 ` [PATCH 06/11] locking/ww_mutex: Notify waiters that have to back off while adding tasks to wait list Nicolai Hähnle
2016-11-28 12:20 ` [PATCH 07/11] locking/ww_mutex: Wake at most one waiter for back off when acquiring the lock Nicolai Hähnle
2016-11-28 12:20 ` [PATCH 08/11] locking/ww_mutex: Yield to other waiters from optimistic spin Nicolai Hähnle
2016-11-28 12:20 ` [PATCH 09/11] locking/mutex: Initialize mutex_waiter::ww_ctx with poison when debugging Nicolai Hähnle
2016-11-28 12:20 ` [PATCH 10/11] Documentation/locking/ww_mutex: Update the design document Nicolai Hähnle
2016-11-28 12:20 ` [PATCH 11/11] [rfc] locking/ww_mutex: Always spin optimistically for the first waiter Nicolai Hähnle
2016-11-30 0:35 ` [PATCH 1/4] locking: Begin kselftests for ww_mutex Chris Wilson
2016-11-30 0:35 ` [PATCH 2/4] locking: Add kselftests for ww_mutex AA deadlock detection Chris Wilson
2016-11-30 0:35 ` [PATCH 3/4] locking: Add kselftests for ww_mutex ABBA " Chris Wilson
2016-11-30 0:35 ` [PATCH 4/4] locking: Add kselftests for ww_mutex stress Chris Wilson
2016-11-30 12:29 ` Maarten Lankhorst
2016-11-30 12:52 ` Chris Wilson
2016-11-30 8:00 ` [PATCH 1/4] locking: Begin kselftests for ww_mutex Nicolai Hähnle
2016-11-30 19:08 ` kbuild test robot
2016-11-30 9:40 ` [PATCH 00/11] locking/ww_mutex: Keep sorted wait list to avoid stampedes Chris Wilson
2016-11-30 11:52 ` Nicolai Hähnle
2016-11-30 12:20 ` Chris Wilson
2016-11-30 13:40 ` Nicolai Hähnle
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=20161128125024.GZ3092@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Nicolai.Haehnle@amd.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel@ffwll.ch \
--cc=dev@mblankhorst.nl \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nhaehnle@gmail.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
Powered by JetHome