lkml.org 
[lkml]   [2014]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] lockdep: Kill held_lock->check and "int check" arg of __lock_acquire()
On 01/12, Oleg Nesterov wrote:
>
> The "int check" argument of lock_acquire() and held_lock->check
> are misleading and unneeded. This is only used as a boolean, 2
> denotes "true", everything else is "false". And this boolean is
> always equal to prove_locking.
>
> The only exception is __lockdep_no_validate__ which should make
> this condition "false" in validate_chain().

And I missed mark_irqflags(),

> @@ -3136,7 +3130,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
> hlock->holdtime_stamp = lockstat_clock();
> #endif
>
> - if (check == 2 && !mark_irqflags(curr, hlock))
> + if (prove_locking && !mark_irqflags(curr, hlock))
> return 0;

This change is not right, at least it is not equivalent.

And I just realized that rcu_lock_acquire() does lock_acquire(check => 1).
Probably we can mark rcu_lock_map's as __lockdep_no_validate__.

Anything else I missed?

Oleg.



\
 
 \ /
  Last update: 2014-01-13 18:41    [W:0.153 / U:25.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site