[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140515130435.24132d1b@gandalf.local.home>
Date: Thu, 15 May 2014 13:04:35 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Lai Jiangshan <laijs@...fujitsu.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [patch 2/2] rtmutex: Avoid pointless requeueing in the deadlock
detection chain walk
On Wed, 14 May 2014 20:03:27 -0000
Thomas Gleixner <tglx@...utronix.de> wrote:
> In case the dead lock detector is enabled we follow the lock chain to
> the end in rt_mutex_adjust_prio_chain, even if we could stop earlier
> due to the priority/waiter constellation.
I'm assuming that we want to detect deadlocks for all futex calls
even when CONFIG_DEBUG_RT_MUTEXES is set?
In kernel/locking/rtmutex_common.h:
#ifdef CONFIG_DEBUG_RT_MUTEXES
# include "rtmutex-debug.h"
#else
# include "rtmutex.h"
#endif
In kernel/locking/rtmutex.h:
#define debug_rt_mutex_detect_deadlock(w,d) (d)
In kernel/locking/rtmutex.h:
static inline int debug_rt_mutex_detect_deadlock(struct rt_mutex_waiter *waiter,
int detect)
{
return (waiter != NULL);
}
Shouldn't that be: return detect || waiter != NULL;
?
I know this a separate issue from this patch series, but it's
something that I just noticed.
>
> But once we are not longer the top priority waiter in a certain step
"we are no longer the top"
> or the task holding the lock has already the same priority then there
> is no point in dequeing and enqueing along the lock chain as there is
> no change at all.
>
> So stop the queueing at this point.
I'll continue reviewing the patch.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists