Skip to contentSkip to conversation

batman-adv: remove all rcu head initializations

PATCH Superseded Sven Eckelmann 2 participants 3 messages May 16, 2010 – May 17, 2010 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 batman-adv: remove all rcu head initializations

In reply to a message not in the archive

From: Paul E. McKenney <[email protected]>

Remove all rcu head inits. We don't care about the RCU head state before passing it to call_rcu() anyway. Only leave the "on_stack" variants so debugobjects can keep track of objects on stack.

---
I've tried to check if the initialisation was always done in call_rcu in all implementations since 2.6.21. This assumption seems to be correct. I've already applied it to the maint branch and it must only be applied to the trunk.

 hard-interface.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
hard-interface.c +0 -1
index c17ad85..bc2bd12 100644
@@ -341,7 +341,6 @@ static struct batman_if *hardif_add_interface(struct net_device *net_dev)
 	batman_if->if_num = -1;
 	batman_if->net_dev = net_dev;
 	batman_if->if_status = IF_NOT_IN_USE;
-	INIT_RCU_HEAD(&batman_if->rcu);
 	INIT_LIST_HEAD(&batman_if->list);
 
 	check_known_mac_addr(batman_if->net_dev->dev_addr);
Signature · 1 line
1.7.1
#2 lore raw

PATCH v2 1/1 batman-adv: remove all rcu head initializations

From: Paul E. McKenney <[email protected]>

Remove all rcu head inits. We don't care about the RCU head state before passing it to call_rcu() anyway. Only leave the "on_stack" variants so debugobjects can keep track of objects on stack.

---
I've tried to check if the initialisation was always done in call_rcu in all implementations since 2.6.21. This assumption seems to be correct. I've already applied it to the maint branch and it must only be applied to the trunk.

v2: I've accidently send the version of maint instead the version for trunk. There were no real differences, but the paths.

 batman-adv-kernelland/hard-interface.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
batman-adv-kernelland/hard-interface.c +0 -1
index 5123176..cc7fbae 100644
@@ -341,7 +341,6 @@ static struct batman_if *hardif_add_interface(struct net_device *net_dev)
 	batman_if->if_num = -1;
 	batman_if->net_dev = net_dev;
 	batman_if->if_status = IF_NOT_IN_USE;
-	INIT_RCU_HEAD(&batman_if->rcu);
 	INIT_LIST_HEAD(&batman_if->list);
 
 	check_known_mac_addr(batman_if->net_dev->dev_addr);
Signature · 1 line
1.7.1
#3 lore raw
Quoted 6 lines · On Monday 17 May 2010 17:58:50 Sven Eckelmann wrote:

From: Paul E. McKenney <[email protected]>

Remove all rcu head inits. We don't care about the RCU head state before passing it to call_rcu() anyway. Only leave the "on_stack" variants so debugobjects can keep track of objects on stack.

Quoted 8 lines

Ok, applied in revision 1659.

Thanks,
Marek