lkml.org 
[lkml]   [2018]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question:Lockdep
On Fri, Jan 19, 2018 at 12:49:04PM +0000, yangerkun wrote:
> Hi,
> There is a problem confuses me while reading the soure code about lockdep:
> If thread get a lock first time, kernel will add a hash node in chainhash_table, then
> Copy and paste the lock chain and add the new one to tail. But, while checking deadlock,
> I have never seen the effects about the lock chain, instead, kernel will build the
> dependency graph for the checking. Does there some problems about this?

I'm not sure I fully understand your question. But the purpose of the
lock chain hash is to avoid work, its an optimization.

If we've already observed this lock chain before (hash hit), we'll not
do all the dependency checking.

Without this lockdep would be terribly slow.

\
 
 \ /
  Last update: 2018-01-19 17:45    [W:0.029 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site