Re: 2.6.17-mm1: kernel/lockdep.c: write-only variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Ingo Molnar <[email protected]> wrote:

> 
> * Adrian Bunk <[email protected]> wrote:
> 
> > The following variables in kernel/lockdep.c are write-only:
> >   nr_hardirq_read_safe_locks
> >   nr_hardirq_read_unsafe_locks
> >   nr_hardirq_safe_locks
> >   nr_hardirq_unsafe_locks
> >   nr_softirq_read_safe_locks
> >   nr_softirq_read_unsafe_locks
> >   nr_softirq_safe_locks
> >   nr_softirq_unsafe_locks
> > 
> > Is a usage pending or should they be removed?
> 
> they are stale - i'll remove them. (there's a new calculation method 
> for them)

the patch is below. (Andrew, please dont apply this one - will be part 
of another patchset)

	Ingo

---
 kernel/lockdep.c           |   16 ----------------
 kernel/lockdep_internals.h |    8 --------
 2 files changed, 24 deletions(-)

Index: linux/kernel/lockdep.c
===================================================================
--- linux.orig/kernel/lockdep.c
+++ linux/kernel/lockdep.c
@@ -271,14 +271,6 @@ atomic_t softirqs_off_events;
 atomic_t redundant_softirqs_on;
 atomic_t redundant_softirqs_off;
 atomic_t nr_unused_locks;
-atomic_t nr_hardirq_safe_locks;
-atomic_t nr_softirq_safe_locks;
-atomic_t nr_hardirq_unsafe_locks;
-atomic_t nr_softirq_unsafe_locks;
-atomic_t nr_hardirq_read_safe_locks;
-atomic_t nr_softirq_read_safe_locks;
-atomic_t nr_hardirq_read_unsafe_locks;
-atomic_t nr_softirq_read_unsafe_locks;
 atomic_t nr_cyclic_checks;
 atomic_t nr_cyclic_check_recursions;
 atomic_t nr_find_usage_forwards_checks;
@@ -1640,7 +1632,6 @@ static int mark_lock(struct task_struct 
 				LOCK_ENABLED_HARDIRQS_READ, "hard-read"))
 			return 0;
 #endif
-		debug_atomic_inc(&nr_hardirq_safe_locks);
 		if (hardirq_verbose(this->type))
 			ret = 2;
 		break;
@@ -1666,7 +1657,6 @@ static int mark_lock(struct task_struct 
 				LOCK_ENABLED_SOFTIRQS_READ, "soft-read"))
 			return 0;
 #endif
-		debug_atomic_inc(&nr_softirq_safe_locks);
 		if (softirq_verbose(this->type))
 			ret = 2;
 		break;
@@ -1680,7 +1670,6 @@ static int mark_lock(struct task_struct 
 		if (!check_usage_forwards(curr, this,
 					  LOCK_ENABLED_HARDIRQS, "hard"))
 			return 0;
-		debug_atomic_inc(&nr_hardirq_read_safe_locks);
 		if (hardirq_verbose(this->type))
 			ret = 2;
 		break;
@@ -1694,7 +1683,6 @@ static int mark_lock(struct task_struct 
 		if (!check_usage_forwards(curr, this,
 					  LOCK_ENABLED_SOFTIRQS, "soft"))
 			return 0;
-		debug_atomic_inc(&nr_softirq_read_safe_locks);
 		if (softirq_verbose(this->type))
 			ret = 2;
 		break;
@@ -1721,7 +1709,6 @@ static int mark_lock(struct task_struct 
 				   LOCK_USED_IN_HARDIRQ_READ, "hard-read"))
 			return 0;
 #endif
-		debug_atomic_inc(&nr_hardirq_unsafe_locks);
 		if (hardirq_verbose(this->type))
 			ret = 2;
 		break;
@@ -1748,7 +1735,6 @@ static int mark_lock(struct task_struct 
 				   LOCK_USED_IN_SOFTIRQ_READ, "soft-read"))
 			return 0;
 #endif
-		debug_atomic_inc(&nr_softirq_unsafe_locks);
 		if (softirq_verbose(this->type))
 			ret = 2;
 		break;
@@ -1764,7 +1750,6 @@ static int mark_lock(struct task_struct 
 					   LOCK_USED_IN_HARDIRQ, "hard"))
 			return 0;
 #endif
-		debug_atomic_inc(&nr_hardirq_read_unsafe_locks);
 		if (hardirq_verbose(this->type))
 			ret = 2;
 		break;
@@ -1780,7 +1765,6 @@ static int mark_lock(struct task_struct 
 					   LOCK_USED_IN_SOFTIRQ, "soft"))
 			return 0;
 #endif
-		debug_atomic_inc(&nr_softirq_read_unsafe_locks);
 		if (softirq_verbose(this->type))
 			ret = 2;
 		break;
Index: linux/kernel/lockdep_internals.h
===================================================================
--- linux.orig/kernel/lockdep_internals.h
+++ linux/kernel/lockdep_internals.h
@@ -69,14 +69,6 @@ extern atomic_t softirqs_off_events;
 extern atomic_t redundant_softirqs_on;
 extern atomic_t redundant_softirqs_off;
 extern atomic_t nr_unused_locks;
-extern atomic_t nr_hardirq_safe_locks;
-extern atomic_t nr_softirq_safe_locks;
-extern atomic_t nr_hardirq_unsafe_locks;
-extern atomic_t nr_softirq_unsafe_locks;
-extern atomic_t nr_hardirq_read_safe_locks;
-extern atomic_t nr_softirq_read_safe_locks;
-extern atomic_t nr_hardirq_read_unsafe_locks;
-extern atomic_t nr_softirq_read_unsafe_locks;
 extern atomic_t nr_cyclic_checks;
 extern atomic_t nr_cyclic_check_recursions;
 extern atomic_t nr_find_usage_forwards_checks;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux