Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1353437

[PATCH 4/3] rtmutex: Avoid barrier in rt_mutex_handle_deadlock

From Davidlohr Bueso <dave@stgolabs.net>
Newsgroups linux.kernel
Subject [PATCH 4/3] rtmutex: Avoid barrier in rt_mutex_handle_deadlock
Date 2016-03-08 23:10 +0100
Message-ID <raxZg-730-5@gated-at.bofh.it> (permalink)
References <rauym-4FV-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The very nature of rt_mutex_handle_deadlock() implies that this
patch is merely a formality, as in practice the saved barrier
is of little use. That said, we can relax setting the task state
and be done with it; blocking unconditionally... this is a deadlock!

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
  kernel/locking/rtmutex.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 8eb99b7f1ac8..c3d3c8e8ea5c 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -1216,7 +1216,7 @@ static void rt_mutex_handle_deadlock(int res, int detect_deadlock,
  	 */
  	rt_mutex_print_deadlock(w);
  	while (1) {
-		set_current_state(TASK_INTERRUPTIBLE);
+		__set_current_state(TASK_INTERRUPTIBLE);
  		schedule();
  	}
  }
-- 
2.1.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH -tip 0/3] locking/rtmutex: Another crack at spin on owner Davidlohr Bueso <dave@stgolabs.net> - 2016-03-08 19:30 +0100
  [PATCH 4/3] rtmutex: Avoid barrier in rt_mutex_handle_deadlock Davidlohr Bueso <dave@stgolabs.net> - 2016-03-08 23:10 +0100
    Re: [PATCH 4/3] rtmutex: Avoid barrier in rt_mutex_handle_deadlock Peter Zijlstra <peterz@infradead.org> - 2016-03-14 14:50 +0100

csiph-web