Re: [RFC patch 2/3] tree/tiny rcu: Add debug RCU head objects (v3)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Lai Jiangshan
Date: Sunday, March 21, 2010 - 8:33 pm

Very nice you do not touch struct rcu_head.

Mathieu Desnoyers wrote:


I'm a little foolish. I don't know why we need
STATE_RCU_HEAD_READY/QUEUED.

1) obj->astate does not be set to STATE_RCU_HEAD_READY in
debug_object_activate/init().

Maybe you need to add a function:
debug_object_activate_with_astate(head, descr, init_astate);
(the same as debug_object_activate(), but init obj->astate also)

Or you need:
@debugobjects.h
# define DEBUG_OBJECT_ASTATE_INIT 0
@rcupdate.c
# define STATE_RCU_HEAD_READY	DEBUG_OBJECT_ASTATE_INIT
# define STATE_RCU_HEAD_QUEUED	(STATE_RCU_HEAD_READY + 1)

2) In debug_rcu_head_queue(), debug_object_active_state()
   is always success when debug_object_activate() is success.

   In debug_rcu_head_unqueue(), debug_object_active_state()
   is always success if RCU subsystem is running correctly.

(Correct me if I'm wrong) So we don't need debug_object_active_state()
here if we just find racy users of call_rcu().


preempt_count() != 0 ??? What happen when !CONFIG_PREEMPT?


We may need call rcu_barrier(), rcu_barrier_sched(), rcu_barrier_bh() together?
rcu_barrier() does not ensure to flush callbacks of RCU_BH, RCU_SCHED.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC patch 0/3] RCU head debug objects, Mathieu Desnoyers, (Fri Mar 19, 1:47 pm)
[RFC patch 1/3] Debugobjects transition check, Mathieu Desnoyers, (Fri Mar 19, 1:47 pm)
[RFC patch 2/3] tree/tiny rcu: Add debug RCU head objects (v3), Mathieu Desnoyers, (Fri Mar 19, 1:47 pm)
Re: [RFC patch 2/3] tree/tiny rcu: Add debug RCU head obje ..., Lai Jiangshan, (Sun Mar 21, 8:33 pm)
Re: [RFC patch 2/3] tree/tiny rcu: Add debug RCU head obje ..., Mathieu Desnoyers, (Mon Mar 22, 7:22 am)