All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu: Remove debug_object_active_state() from debug_rcu_head_queue/unqueue()
@ 2022-05-10  3:07 Zqiang
  2022-05-13  0:49 ` Paul E. McKenney
  0 siblings, 1 reply; 12+ messages in thread
From: Zqiang @ 2022-05-10  3:07 UTC (permalink / raw)
  To: paulmck, frederic; +Cc: rcu, linux-kernel

Currently, the double call_rcu() detected only need call
debug_object_activate() to check whether the rcu head object is
activated, the rcu head object usage state check is not necessary
and when call rcu_test_debug_objects() the debug_object_active_state()
will output same callstack as debug_object_activate(). so remove
debug_object_active_state() to reduce the output of repeated callstack.

Signed-off-by: Zqiang <qiang1.zhang@intel.com>
---
 kernel/rcu/rcu.h | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index 15b96f990774..0604ecd16627 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -179,27 +179,16 @@ static inline unsigned long rcu_seq_diff(unsigned long new, unsigned long old)
  */
 
 #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD
-# define STATE_RCU_HEAD_READY	0
-# define STATE_RCU_HEAD_QUEUED	1
 
 extern const struct debug_obj_descr rcuhead_debug_descr;
 
 static inline int debug_rcu_head_queue(struct rcu_head *head)
 {
-	int r1;
-
-	r1 = debug_object_activate(head, &rcuhead_debug_descr);
-	debug_object_active_state(head, &rcuhead_debug_descr,
-				  STATE_RCU_HEAD_READY,
-				  STATE_RCU_HEAD_QUEUED);
-	return r1;
+	return debug_object_activate(head, &rcuhead_debug_descr);
 }
 
 static inline void debug_rcu_head_unqueue(struct rcu_head *head)
 {
-	debug_object_active_state(head, &rcuhead_debug_descr,
-				  STATE_RCU_HEAD_QUEUED,
-				  STATE_RCU_HEAD_READY);
 	debug_object_deactivate(head, &rcuhead_debug_descr);
 }
 #else	/* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-06-17  2:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10  3:07 [PATCH] rcu: Remove debug_object_active_state() from debug_rcu_head_queue/unqueue() Zqiang
2022-05-13  0:49 ` Paul E. McKenney
2022-05-13  1:03   ` Zhang, Qiang1
2022-05-13 22:26     ` Paul E. McKenney
2022-05-14  0:02       ` Zhang, Qiang1
2022-05-18  4:21         ` Zhang, Qiang1
2022-05-25 23:33           ` Zhang, Qiang1
2022-05-26 18:17             ` Paul E. McKenney
2022-05-27  8:29               ` Zhang, Qiang1
2022-05-27  8:34                 ` Zhang, Qiang1
2022-06-16 23:08                   ` Paul E. McKenney
2022-06-17  2:29                     ` Zhang, Qiang1

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.