linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] locking: Fix mutex debug call and ww_mutex doc
@ 2018-09-03 14:07 Thomas Hellstrom
  2018-09-07 11:43 ` Peter Zijlstra
  2018-09-10 10:05 ` [tip:locking/core] locking/mutex: Fix mutex debug call and ww_mutex documentation tip-bot for Thomas Hellstrom
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Hellstrom @ 2018-09-03 14:07 UTC (permalink / raw)
  To: peterz, dri-devel; +Cc: linux-kernel, Thomas Hellstrom

Commit 08295b3b5bee ("Implement an algorithm choice for Wound-Wait
mutexes") introduced a reference in the documentation to a function
that was removed in an earlier commit.

It also forgot to remove a call to debug_mutex_add_waiter() which is now
unconditionally called by __mutex_add_waiter().

Fix those issues.

Fixes: 08295b3b5bee ("Implement an algorithm choice for Wound-Wait mutexes")
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
---
 kernel/locking/mutex.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 1a81a1257b3f..3f8a35104285 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -389,7 +389,7 @@ static bool __ww_mutex_wound(struct mutex *lock,
 		/*
 		 * wake_up_process() paired with set_current_state()
 		 * inserts sufficient barriers to make sure @owner either sees
-		 * it's wounded in __ww_mutex_lock_check_stamp() or has a
+		 * it's wounded in __ww_mutex_check_kill() or has a
 		 * wakeup pending to re-read the wounded state.
 		 */
 		if (owner != current)
@@ -946,7 +946,6 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
 	}
 
 	debug_mutex_lock_common(lock, &waiter);
-	debug_mutex_add_waiter(lock, &waiter, current);
 
 	lock_contended(&lock->dep_map, ip);
 
-- 
2.18.0.rc1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] locking: Fix mutex debug call and ww_mutex doc
  2018-09-03 14:07 [PATCH] locking: Fix mutex debug call and ww_mutex doc Thomas Hellstrom
@ 2018-09-07 11:43 ` Peter Zijlstra
  2018-09-10 10:05 ` [tip:locking/core] locking/mutex: Fix mutex debug call and ww_mutex documentation tip-bot for Thomas Hellstrom
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2018-09-07 11:43 UTC (permalink / raw)
  To: Thomas Hellstrom; +Cc: dri-devel, linux-kernel

On Mon, Sep 03, 2018 at 04:07:08PM +0200, Thomas Hellstrom wrote:
> Commit 08295b3b5bee ("Implement an algorithm choice for Wound-Wait
> mutexes") introduced a reference in the documentation to a function
> that was removed in an earlier commit.
> 
> It also forgot to remove a call to debug_mutex_add_waiter() which is now
> unconditionally called by __mutex_add_waiter().
> 
> Fix those issues.
> 
> Fixes: 08295b3b5bee ("Implement an algorithm choice for Wound-Wait mutexes")
> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:locking/core] locking/mutex: Fix mutex debug call and ww_mutex documentation
  2018-09-03 14:07 [PATCH] locking: Fix mutex debug call and ww_mutex doc Thomas Hellstrom
  2018-09-07 11:43 ` Peter Zijlstra
@ 2018-09-10 10:05 ` tip-bot for Thomas Hellstrom
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Thomas Hellstrom @ 2018-09-10 10:05 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, mingo, hpa, tglx, thellstrom, peterz, torvalds

Commit-ID:  e13e2366d8415e029fe96a62502955083e272cef
Gitweb:     https://git.kernel.org/tip/e13e2366d8415e029fe96a62502955083e272cef
Author:     Thomas Hellstrom <thellstrom@vmware.com>
AuthorDate: Mon, 3 Sep 2018 16:07:08 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 10 Sep 2018 10:05:10 +0200

locking/mutex: Fix mutex debug call and ww_mutex documentation

The following commit:

  08295b3b5bee ("Implement an algorithm choice for Wound-Wait mutexes")

introduced a reference in the documentation to a function that was
removed in an earlier commit.

It also forgot to remove a call to debug_mutex_add_waiter() which is now
unconditionally called by __mutex_add_waiter().

Fix those bugs.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dri-devel@lists.freedesktop.org
Fixes: 08295b3b5bee ("Implement an algorithm choice for Wound-Wait mutexes")
Link: http://lkml.kernel.org/r/20180903140708.2401-1-thellstrom@vmware.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/locking/mutex.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 1a81a1257b3f..3f8a35104285 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -389,7 +389,7 @@ static bool __ww_mutex_wound(struct mutex *lock,
 		/*
 		 * wake_up_process() paired with set_current_state()
 		 * inserts sufficient barriers to make sure @owner either sees
-		 * it's wounded in __ww_mutex_lock_check_stamp() or has a
+		 * it's wounded in __ww_mutex_check_kill() or has a
 		 * wakeup pending to re-read the wounded state.
 		 */
 		if (owner != current)
@@ -946,7 +946,6 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
 	}
 
 	debug_mutex_lock_common(lock, &waiter);
-	debug_mutex_add_waiter(lock, &waiter, current);
 
 	lock_contended(&lock->dep_map, ip);
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-10 10:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03 14:07 [PATCH] locking: Fix mutex debug call and ww_mutex doc Thomas Hellstrom
2018-09-07 11:43 ` Peter Zijlstra
2018-09-10 10:05 ` [tip:locking/core] locking/mutex: Fix mutex debug call and ww_mutex documentation tip-bot for Thomas Hellstrom

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).