Remove useless calls to INIT_RCU_HEAD in the idr code (was Scalability requirements for sysv ipc - v3)
Subsystems (2)
PATCH 1/1 Remove useless calls to INIT_RCU_HEAD in the idr code (was Scalability requirements for sysv ipc - v3)
In reply to a message not in the archiveSince I didn't get any answer yesterday, (see http://lkml.org/lkml/2008/6/2/20)
here's the patch after Paul's review.
Regards,
Nadia
[ PATCH 01/01 ]
This is a trivial patch that removes unneeded calls to INIT_RCU_HEAD() in the idr api code.
This patch applies to 2.6.26-rc2-mm1.
--- lib/idr.c | 3 --- 1 file changed, 3 deletions(-)
lib/idr.c +0 -3
@@ -185,7 +185,6 @@ static int sub_alloc(struct idr *idp, in new =get_from_free_list (idp);if (!new)return -1 ; -INIT_RCU_HEAD (&new->rcu_head);rcu_assign_pointer (p->ary[m], new); p->count++; }
@@ -211,7 +210,6 @@ build_up:if (unlikely (!p)) {if (!(p =get_from_free_list (idp)))return -1 ; -INIT_RCU_HEAD (&p->rcu_head); layers =1 ; }/*
@@ -239,7 +237,6 @@ build_up: } new->ary[0 ] = p; new->count =1 ; -INIT_RCU_HEAD (&new->rcu_head);if (p->bitmap ==IDR_FULL )__set_bit (0 , &new->bitmap); p = new;
--
Quoted 7 lines · On Tue, Jun 03, 2008 at 08:56:34AM +0200, [email protected] wrote:
Since I didn't get any answer yesterday, (see http://lkml.org/lkml/2008/6/2/20)
here's the patch after Paul's review.Regards,
Nadia
Quoted 6 lines
[ PATCH 01/01 ]
This is a trivial patch that removes unneeded calls to
INIT_RCU_HEAD()in the idr api code.This patch applies to 2.6.26-rc2-mm1.
Looks good to me!
Quoted 36 lines
Signed-off-by Nadia Derbey <[email protected]>--- lib/idr.c | 3 --- 1 file changed, 3 deletions(-)Index:
linux-2.6.26-rc2-mm1/lib/idr.c
===================================================================lib/idr.c +0
-4@@ -185,7 +185,6 @@ static int sub_alloc(struct idr *idp, in new =get_from_free_list (idp);if (!new)return -1 ; -INIT_RCU_HEAD (&new->rcu_head);rcu_assign_pointer (p->ary[m], new); p->count++; }@@ -211,7 +210,6 @@ build_up:if (unlikely (!p)) {if (!(p =get_from_free_list (idp)))return -1 ; -INIT_RCU_HEAD (&p->rcu_head); layers =1 ; }/* @@ -239,7 +237,6 @@ build_up: } new->ary[0 ] = p; new->count =1 ; -INIT_RCU_HEAD (&new->rcu_head);if (p->bitmap ==IDR_FULL )__set_bit (0 , &new->bitmap); p = new; --