* [PATCH 0/17] rcu: covert call_rcu(simple_kfree_callbck) to kfree_rcu() (PART 1)
@ 2011-03-15 9:49 Lai Jiangshan
[not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
0 siblings, 1 reply; 32+ messages in thread
From: Lai Jiangshan @ 2011-03-15 9:49 UTC (permalink / raw)
To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust
There are many simple_kfree_callback() instances that just does
kfree(containerof(head,struct whatever_struct,rcu_member));
We convert them to kfree_rcu().
^ permalink raw reply [flat|nested] 32+ messages in thread[parent not found: <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* [PATCH 01/17] cgroup, rcu: convert call_rcu(free_css_set_rcu) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 9:53 ` Lai Jiangshan [not found] ` <4D7F372A.6050407-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 9:55 ` [PATCH 02/17] cgroup, rcu: convert call_rcu(free_cgroup_rcu) " Lai Jiangshan ` (15 subsequent siblings) 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 9:53 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback free_css_set_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(free_css_set_rcu). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- kernel/cgroup.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 95362d1..ad485d4 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -326,12 +326,6 @@ static struct hlist_head *css_set_hash(struct cgroup_subsys_state *css[]) return &css_set_table[index]; } -static void free_css_set_rcu(struct rcu_head *obj) -{ - struct css_set *cg = container_of(obj, struct css_set, rcu_head); - kfree(cg); -} - /* We don't maintain the lists running through each css_set to its * task until after the first call to cgroup_iter_start(). This * reduces the fork()/exit() overhead for people who have cgroups @@ -375,7 +369,7 @@ static void __put_css_set(struct css_set *cg, int taskexit) } write_unlock(&css_set_lock); - call_rcu(&cg->rcu_head, free_css_set_rcu); + kfree_rcu(cg, rcu_head); } /* -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F372A.6050407-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 01/17] cgroup, rcu: convert call_rcu(free_css_set_rcu) to kfree_rcu() [not found] ` <4D7F372A.6050407-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 20:03 ` Paul Menage 0 siblings, 0 replies; 32+ messages in thread From: Paul Menage @ 2011-03-15 20:03 UTC (permalink / raw) To: Lai Jiangshan Cc: Randy Dunlap, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond Myklebust, linux-sctp-u79uwXL29TY76Z2rM5mHXA, Pavel Emelyanov, Pekka Savola (ipv6), Eric Dumazet, Uwe Kleine-König, Alexey Kuznetsov, Ingo Molnar, Paul E. McKenney, Sridhar Samudrala, Vlad Yasevich, Hagen Paul Pfeifer, John W. Linville, Al Viro, Jens Axboe, linux-nfs-u79uwXL29TY76Z2rM5mHXA, Jiri Pirko 2011/3/15 Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>: > > The rcu callback free_css_set_rcu() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(free_css_set_rcu). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> Looks fine, assuming the main kfree_rcu() changes go through. Paul ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 02/17] cgroup, rcu: convert call_rcu(free_cgroup_rcu) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 9:53 ` [PATCH 01/17] cgroup, rcu: convert call_rcu(free_css_set_rcu) to kfree_rcu() Lai Jiangshan @ 2011-03-15 9:55 ` Lai Jiangshan [not found] ` <4D7F3784.6090307-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 9:56 ` [PATCH 03/17] cgroup, rcu: convert call_rcu(__free_css_id_cb) " Lai Jiangshan ` (14 subsequent siblings) 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 9:55 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback free_cgroup_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(free_cgroup_rcu). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- kernel/cgroup.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index ad485d4..5c83c91 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -806,13 +806,6 @@ static int cgroup_call_pre_destroy(struct cgroup *cgrp) return ret; } -static void free_cgroup_rcu(struct rcu_head *obj) -{ - struct cgroup *cgrp = container_of(obj, struct cgroup, rcu_head); - - kfree(cgrp); -} - static void cgroup_diput(struct dentry *dentry, struct inode *inode) { /* is dentry a directory ? if so, kfree() associated cgroup */ @@ -850,7 +843,7 @@ static void cgroup_diput(struct dentry *dentry, struct inode *inode) */ BUG_ON(!list_empty(&cgrp->pidlists)); - call_rcu(&cgrp->rcu_head, free_cgroup_rcu); + kfree_rcu(cgrp, rcu_head); } iput(inode); } -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F3784.6090307-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 02/17] cgroup, rcu: convert call_rcu(free_cgroup_rcu) to kfree_rcu() [not found] ` <4D7F3784.6090307-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 20:04 ` Paul Menage 0 siblings, 0 replies; 32+ messages in thread From: Paul Menage @ 2011-03-15 20:04 UTC (permalink / raw) To: Lai Jiangshan Cc: Randy Dunlap, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond Myklebust, linux-sctp-u79uwXL29TY76Z2rM5mHXA, Pavel Emelyanov, Pekka Savola (ipv6), Eric Dumazet, Uwe Kleine-König, Alexey Kuznetsov, Ingo Molnar, Paul E. McKenney, Sridhar Samudrala, Vlad Yasevich, Hagen Paul Pfeifer, John W. Linville, Al Viro, Jens Axboe, linux-nfs-u79uwXL29TY76Z2rM5mHXA, Jiri Pirko 2011/3/15 Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>: > > The rcu callback free_cgroup_rcu() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(free_cgroup_rcu). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > --- > kernel/cgroup.c | 9 +-------- > 1 files changed, 1 insertions(+), 8 deletions(-) > > diff --git a/kernel/cgroup.c b/kernel/cgroup.c > index ad485d4..5c83c91 100644 > --- a/kernel/cgroup.c > +++ b/kernel/cgroup.c > @@ -806,13 +806,6 @@ static int cgroup_call_pre_destroy(struct cgroup *cgrp) > return ret; > } > > -static void free_cgroup_rcu(struct rcu_head *obj) > -{ > - struct cgroup *cgrp = container_of(obj, struct cgroup, rcu_head); > - > - kfree(cgrp); > -} > - > static void cgroup_diput(struct dentry *dentry, struct inode *inode) > { > /* is dentry a directory ? if so, kfree() associated cgroup */ > @@ -850,7 +843,7 @@ static void cgroup_diput(struct dentry *dentry, struct inode *inode) > */ > BUG_ON(!list_empty(&cgrp->pidlists)); > > - call_rcu(&cgrp->rcu_head, free_cgroup_rcu); > + kfree_rcu(cgrp, rcu_head); > } > iput(inode); > } > -- > 1.7.4 > ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 03/17] cgroup, rcu: convert call_rcu(__free_css_id_cb) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 9:53 ` [PATCH 01/17] cgroup, rcu: convert call_rcu(free_css_set_rcu) to kfree_rcu() Lai Jiangshan 2011-03-15 9:55 ` [PATCH 02/17] cgroup, rcu: convert call_rcu(free_cgroup_rcu) " Lai Jiangshan @ 2011-03-15 9:56 ` Lai Jiangshan [not found] ` <4D7F37BA.5000308-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 9:57 ` [PATCH 04/17] net, rcu: convert call_rcu(tcf_common_free_rcu) " Lai Jiangshan ` (13 subsequent siblings) 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 9:56 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback __free_css_id_cb() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(__free_css_id_cb). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- kernel/cgroup.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 5c83c91..b7d3f6d 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -4612,14 +4612,6 @@ bool css_is_ancestor(struct cgroup_subsys_state *child, return ret; } -static void __free_css_id_cb(struct rcu_head *head) -{ - struct css_id *id; - - id = container_of(head, struct css_id, rcu_head); - kfree(id); -} - void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css) { struct css_id *id = css->id; @@ -4634,7 +4626,7 @@ void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css) spin_lock(&ss->id_lock); idr_remove(&ss->idr, id->id); spin_unlock(&ss->id_lock); - call_rcu(&id->rcu_head, __free_css_id_cb); + kfree_rcu(id, rcu_head); } EXPORT_SYMBOL_GPL(free_css_id); -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F37BA.5000308-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 03/17] cgroup, rcu: convert call_rcu(__free_css_id_cb) to kfree_rcu() [not found] ` <4D7F37BA.5000308-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 20:04 ` Paul Menage 0 siblings, 0 replies; 32+ messages in thread From: Paul Menage @ 2011-03-15 20:04 UTC (permalink / raw) To: Lai Jiangshan Cc: Randy Dunlap, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond Myklebust, linux-sctp-u79uwXL29TY76Z2rM5mHXA, Pavel Emelyanov, Pekka Savola (ipv6), Eric Dumazet, Uwe Kleine-König, Alexey Kuznetsov, Ingo Molnar, Paul E. McKenney, Sridhar Samudrala, Vlad Yasevich, Hagen Paul Pfeifer, John W. Linville, Al Viro, Jens Axboe, linux-nfs-u79uwXL29TY76Z2rM5mHXA, Jiri Pirko 2011/3/15 Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>: > > > The rcu callback __free_css_id_cb() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(__free_css_id_cb). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > --- > kernel/cgroup.c | 10 +--------- > 1 files changed, 1 insertions(+), 9 deletions(-) > > diff --git a/kernel/cgroup.c b/kernel/cgroup.c > index 5c83c91..b7d3f6d 100644 > --- a/kernel/cgroup.c > +++ b/kernel/cgroup.c > @@ -4612,14 +4612,6 @@ bool css_is_ancestor(struct cgroup_subsys_state *child, > return ret; > } > > -static void __free_css_id_cb(struct rcu_head *head) > -{ > - struct css_id *id; > - > - id = container_of(head, struct css_id, rcu_head); > - kfree(id); > -} > - > void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css) > { > struct css_id *id = css->id; > @@ -4634,7 +4626,7 @@ void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css) > spin_lock(&ss->id_lock); > idr_remove(&ss->idr, id->id); > spin_unlock(&ss->id_lock); > - call_rcu(&id->rcu_head, __free_css_id_cb); > + kfree_rcu(id, rcu_head); > } > EXPORT_SYMBOL_GPL(free_css_id); > > -- > 1.7.4 > ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 04/17] net, rcu: convert call_rcu(tcf_common_free_rcu) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (2 preceding siblings ...) 2011-03-15 9:56 ` [PATCH 03/17] cgroup, rcu: convert call_rcu(__free_css_id_cb) " Lai Jiangshan @ 2011-03-15 9:57 ` Lai Jiangshan [not found] ` <4D7F37F0.1050801-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 9:58 ` [PATCH 05/17] net, rcu: convert call_rcu(tcf_police_free_rcu) " Lai Jiangshan ` (12 subsequent siblings) 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 9:57 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback tcf_common_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(tcf_common_free_rcu). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/sched/act_api.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 23b25f8..c8e7390 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -26,11 +26,6 @@ #include <net/act_api.h> #include <net/netlink.h> -static void tcf_common_free_rcu(struct rcu_head *head) -{ - kfree(container_of(head, struct tcf_common, tcfc_rcu)); -} - void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo) { unsigned int h = tcf_hash(p->tcfc_index, hinfo->hmask); @@ -47,7 +42,7 @@ void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo) * gen_estimator est_timer() might access p->tcfc_lock * or bstats, wait a RCU grace period before freeing p */ - call_rcu(&p->tcfc_rcu, tcf_common_free_rcu); + kfree_rcu(p, tcfc_rcu); return; } } -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F37F0.1050801-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 04/17] net,rcu: convert call_rcu(tcf_common_free_rcu) to kfree_rcu() [not found] ` <4D7F37F0.1050801-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 21:02 ` David Miller 0 siblings, 0 replies; 32+ messages in thread From: David Miller @ 2011-03-15 21:02 UTC (permalink / raw) To: laijs-BthXqXjhjHXQFUHtdCDX3A Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA, linux-sctp-u79uwXL29TY76Z2rM5mHXA, xemul-GEFAQzZX7r8dnm+yROfE0A, pekkas-UjJjq++bwZ7HOG6cAo2yLw, eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, kuznet-v/Mj1YrvjDBInbfyfbPRSQ, mingo-X9Un+BFzKDI, paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, sri-r/Jw6+rmf7HQT0dZR+AlfA, vladislav.yasevich-VXdhtT5mjnY, hagen-GvnIQ6b/HdU, linville-2XuSBdqkA4R54TAoqtyWWQ, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn, menage-hpIqsD4AKlfQT0dZR+AlfA, axboe-tSWWG44O7X1aa/9Udqfwiw, linux-nfs-u79uwXL29TY76Z2rM5mHXA, jpirko-H+wXaHxf7aLQT0dZR+AlfA, yoshfuji-VfPWfsRibaP+Ru+s062T9g, jkosina-AlSwsSmVLrQ, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, gregkh-l3A5Bk7waGM, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, eparis-H+wXaHxf7aLQT0dZR+AlfA, linux-security-module-u79uwXL29TY76Z2rM5mHXA, ebiederm-aS9lmoZGLiVWk0Htik3J/w, netdev-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, johannes-cdvu00un1VgdHxzADdlk8Q From: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 15 Mar 2011 17:57:04 +0800 > > > The rcu callback tcf_common_free_rcu() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(tcf_common_free_rcu). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 05/17] net, rcu: convert call_rcu(tcf_police_free_rcu) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (3 preceding siblings ...) 2011-03-15 9:57 ` [PATCH 04/17] net, rcu: convert call_rcu(tcf_common_free_rcu) " Lai Jiangshan @ 2011-03-15 9:58 ` Lai Jiangshan [not found] ` <4D7F3828.4040403-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 9:59 ` [PATCH 06/17] net,rcu: convert call_rcu(in6_dev_finish_destroy_rcu) " Lai Jiangshan ` (11 subsequent siblings) 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 9:58 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust [PATCH 05/17] net,rcu: convert call_rcu(tcf_police_free_rcu) to kfree_rcu() The rcu callback tcf_police_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(tcf_police_free_rcu). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/sched/act_police.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/net/sched/act_police.c b/net/sched/act_police.c index e2f08b1..083b091 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -97,11 +97,6 @@ nla_put_failure: goto done; } -static void tcf_police_free_rcu(struct rcu_head *head) -{ - kfree(container_of(head, struct tcf_police, tcf_rcu)); -} - static void tcf_police_destroy(struct tcf_police *p) { unsigned int h = tcf_hash(p->tcf_index, POL_TAB_MASK); @@ -122,7 +117,7 @@ static void tcf_police_destroy(struct tcf_police *p) * gen_estimator est_timer() might access p->tcf_lock * or bstats, wait a RCU grace period before freeing p */ - call_rcu(&p->tcf_rcu, tcf_police_free_rcu); + kfree_rcu(p, tcf_rcu); return; } } -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F3828.4040403-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 05/17] net,rcu: convert call_rcu(tcf_police_free_rcu) to kfree_rcu() [not found] ` <4D7F3828.4040403-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 21:02 ` David Miller 0 siblings, 0 replies; 32+ messages in thread From: David Miller @ 2011-03-15 21:02 UTC (permalink / raw) To: laijs-BthXqXjhjHXQFUHtdCDX3A Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA, linux-sctp-u79uwXL29TY76Z2rM5mHXA, xemul-GEFAQzZX7r8dnm+yROfE0A, pekkas-UjJjq++bwZ7HOG6cAo2yLw, eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, kuznet-v/Mj1YrvjDBInbfyfbPRSQ, mingo-X9Un+BFzKDI, paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, sri-r/Jw6+rmf7HQT0dZR+AlfA, vladislav.yasevich-VXdhtT5mjnY, hagen-GvnIQ6b/HdU, linville-2XuSBdqkA4R54TAoqtyWWQ, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn, menage-hpIqsD4AKlfQT0dZR+AlfA, axboe-tSWWG44O7X1aa/9Udqfwiw, linux-nfs-u79uwXL29TY76Z2rM5mHXA, jpirko-H+wXaHxf7aLQT0dZR+AlfA, yoshfuji-VfPWfsRibaP+Ru+s062T9g, jkosina-AlSwsSmVLrQ, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, gregkh-l3A5Bk7waGM, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, eparis-H+wXaHxf7aLQT0dZR+AlfA, linux-security-module-u79uwXL29TY76Z2rM5mHXA, ebiederm-aS9lmoZGLiVWk0Htik3J/w, netdev-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, johannes-cdvu00un1VgdHxzADdlk8Q From: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 15 Mar 2011 17:58:00 +0800 > [PATCH 05/17] net,rcu: convert call_rcu(tcf_police_free_rcu) to kfree_rcu() > > The rcu callback tcf_police_free_rcu() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(tcf_police_free_rcu). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 06/17] net,rcu: convert call_rcu(in6_dev_finish_destroy_rcu) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (4 preceding siblings ...) 2011-03-15 9:58 ` [PATCH 05/17] net, rcu: convert call_rcu(tcf_police_free_rcu) " Lai Jiangshan @ 2011-03-15 9:59 ` Lai Jiangshan [not found] ` <4D7F3872.6090305-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 10:00 ` [PATCH 07/17] net, rcu: convert call_rcu(inet6_ifa_finish_destroy_rcu) " Lai Jiangshan ` (10 subsequent siblings) 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 9:59 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback in6_dev_finish_destroy_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(in6_dev_finish_destroy_rcu). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/ipv6/addrconf.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index fd6782e..f8c1a4c 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -317,12 +317,6 @@ static void snmp6_free_dev(struct inet6_dev *idev) /* Nobody refers to this device, we may destroy it. */ -static void in6_dev_finish_destroy_rcu(struct rcu_head *head) -{ - struct inet6_dev *idev = container_of(head, struct inet6_dev, rcu); - kfree(idev); -} - void in6_dev_finish_destroy(struct inet6_dev *idev) { struct net_device *dev = idev->dev; @@ -339,7 +333,7 @@ void in6_dev_finish_destroy(struct inet6_dev *idev) return; } snmp6_free_dev(idev); - call_rcu(&idev->rcu, in6_dev_finish_destroy_rcu); + kfree_rcu(idev, rcu); } EXPORT_SYMBOL(in6_dev_finish_destroy); -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F3872.6090305-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 06/17] net,rcu: convert call_rcu(in6_dev_finish_destroy_rcu) to kfree_rcu() [not found] ` <4D7F3872.6090305-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 21:03 ` David Miller 0 siblings, 0 replies; 32+ messages in thread From: David Miller @ 2011-03-15 21:03 UTC (permalink / raw) To: laijs-BthXqXjhjHXQFUHtdCDX3A Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA, linux-sctp-u79uwXL29TY76Z2rM5mHXA, xemul-GEFAQzZX7r8dnm+yROfE0A, pekkas-UjJjq++bwZ7HOG6cAo2yLw, eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, kuznet-v/Mj1YrvjDBInbfyfbPRSQ, mingo-X9Un+BFzKDI, paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, sri-r/Jw6+rmf7HQT0dZR+AlfA, vladislav.yasevich-VXdhtT5mjnY, hagen-GvnIQ6b/HdU, linville-2XuSBdqkA4R54TAoqtyWWQ, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn, menage-hpIqsD4AKlfQT0dZR+AlfA, axboe-tSWWG44O7X1aa/9Udqfwiw, linux-nfs-u79uwXL29TY76Z2rM5mHXA, jpirko-H+wXaHxf7aLQT0dZR+AlfA, yoshfuji-VfPWfsRibaP+Ru+s062T9g, jkosina-AlSwsSmVLrQ, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, gregkh-l3A5Bk7waGM, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, eparis-H+wXaHxf7aLQT0dZR+AlfA, linux-security-module-u79uwXL29TY76Z2rM5mHXA, ebiederm-aS9lmoZGLiVWk0Htik3J/w, netdev-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, johannes-cdvu00un1VgdHxzADdlk8Q From: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 15 Mar 2011 17:59:14 +0800 > > > The rcu callback in6_dev_finish_destroy_rcu() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(in6_dev_finish_destroy_rcu). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 07/17] net, rcu: convert call_rcu(inet6_ifa_finish_destroy_rcu) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (5 preceding siblings ...) 2011-03-15 9:59 ` [PATCH 06/17] net,rcu: convert call_rcu(in6_dev_finish_destroy_rcu) " Lai Jiangshan @ 2011-03-15 10:00 ` Lai Jiangshan [not found] ` <4D7F38AE.7060708-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 10:01 ` [PATCH 08/17] net, rcu: convert call_rcu(listeners_free_rcu) " Lai Jiangshan ` (9 subsequent siblings) 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:00 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback inet6_ifa_finish_destroy_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(inet6_ifa_finish_destroy_rcu). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/ipv6/addrconf.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index f8c1a4c..14ab6e8 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -529,12 +529,6 @@ static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) } #endif -static void inet6_ifa_finish_destroy_rcu(struct rcu_head *head) -{ - struct inet6_ifaddr *ifp = container_of(head, struct inet6_ifaddr, rcu); - kfree(ifp); -} - /* Nobody refers to this ifaddr, destroy it */ void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp) { @@ -555,7 +549,7 @@ void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp) } dst_release(&ifp->rt->dst); - call_rcu(&ifp->rcu, inet6_ifa_finish_destroy_rcu); + kfree_rcu(ifp, rcu); } static void -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F38AE.7060708-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 07/17] net,rcu: convert call_rcu(inet6_ifa_finish_destroy_rcu) to kfree_rcu() [not found] ` <4D7F38AE.7060708-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 21:03 ` David Miller 0 siblings, 0 replies; 32+ messages in thread From: David Miller @ 2011-03-15 21:03 UTC (permalink / raw) To: laijs-BthXqXjhjHXQFUHtdCDX3A Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA, linux-sctp-u79uwXL29TY76Z2rM5mHXA, xemul-GEFAQzZX7r8dnm+yROfE0A, pekkas-UjJjq++bwZ7HOG6cAo2yLw, eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, kuznet-v/Mj1YrvjDBInbfyfbPRSQ, mingo-X9Un+BFzKDI, paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, sri-r/Jw6+rmf7HQT0dZR+AlfA, vladislav.yasevich-VXdhtT5mjnY, hagen-GvnIQ6b/HdU, linville-2XuSBdqkA4R54TAoqtyWWQ, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn, menage-hpIqsD4AKlfQT0dZR+AlfA, axboe-tSWWG44O7X1aa/9Udqfwiw, linux-nfs-u79uwXL29TY76Z2rM5mHXA, jpirko-H+wXaHxf7aLQT0dZR+AlfA, yoshfuji-VfPWfsRibaP+Ru+s062T9g, jkosina-AlSwsSmVLrQ, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, gregkh-l3A5Bk7waGM, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, eparis-H+wXaHxf7aLQT0dZR+AlfA, linux-security-module-u79uwXL29TY76Z2rM5mHXA, ebiederm-aS9lmoZGLiVWk0Htik3J/w, netdev-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, johannes-cdvu00un1VgdHxzADdlk8Q From: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 15 Mar 2011 18:00:14 +0800 > > > The rcu callback inet6_ifa_finish_destroy_rcu() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(inet6_ifa_finish_destroy_rcu). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 08/17] net, rcu: convert call_rcu(listeners_free_rcu) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (6 preceding siblings ...) 2011-03-15 10:00 ` [PATCH 07/17] net, rcu: convert call_rcu(inet6_ifa_finish_destroy_rcu) " Lai Jiangshan @ 2011-03-15 10:01 ` Lai Jiangshan [not found] ` <4D7F3906.3090107-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 10:02 ` [PATCH 09/17] net,rcu: convert call_rcu(kfree_tid_tx) " Lai Jiangshan ` (8 subsequent siblings) 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:01 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback listeners_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(listeners_free_rcu). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/netlink/af_netlink.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 1f92459..7c7fd8b 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1575,12 +1575,6 @@ netlink_kernel_release(struct sock *sk) } EXPORT_SYMBOL(netlink_kernel_release); - -static void listeners_free_rcu(struct rcu_head *head) -{ - kfree(container_of(head, struct listeners, rcu)); -} - int __netlink_change_ngroups(struct sock *sk, unsigned int groups) { struct listeners *new, *old; @@ -1597,7 +1591,7 @@ int __netlink_change_ngroups(struct sock *sk, unsigned int groups) memcpy(new->masks, old->masks, NLGRPSZ(tbl->groups)); rcu_assign_pointer(tbl->listeners, new); - call_rcu(&old->rcu, listeners_free_rcu); + kfree_rcu(old, rcu); } tbl->groups = groups; -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F3906.3090107-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 08/17] net,rcu: convert call_rcu(listeners_free_rcu) to kfree_rcu() [not found] ` <4D7F3906.3090107-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 21:03 ` David Miller 0 siblings, 0 replies; 32+ messages in thread From: David Miller @ 2011-03-15 21:03 UTC (permalink / raw) To: laijs-BthXqXjhjHXQFUHtdCDX3A Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA, linux-sctp-u79uwXL29TY76Z2rM5mHXA, xemul-GEFAQzZX7r8dnm+yROfE0A, pekkas-UjJjq++bwZ7HOG6cAo2yLw, eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, kuznet-v/Mj1YrvjDBInbfyfbPRSQ, mingo-X9Un+BFzKDI, paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, sri-r/Jw6+rmf7HQT0dZR+AlfA, vladislav.yasevich-VXdhtT5mjnY, hagen-GvnIQ6b/HdU, linville-2XuSBdqkA4R54TAoqtyWWQ, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn, menage-hpIqsD4AKlfQT0dZR+AlfA, axboe-tSWWG44O7X1aa/9Udqfwiw, linux-nfs-u79uwXL29TY76Z2rM5mHXA, jpirko-H+wXaHxf7aLQT0dZR+AlfA, yoshfuji-VfPWfsRibaP+Ru+s062T9g, jkosina-AlSwsSmVLrQ, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, gregkh-l3A5Bk7waGM, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, eparis-H+wXaHxf7aLQT0dZR+AlfA, linux-security-module-u79uwXL29TY76Z2rM5mHXA, ebiederm-aS9lmoZGLiVWk0Htik3J/w, netdev-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, johannes-cdvu00un1VgdHxzADdlk8Q From: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 15 Mar 2011 18:01:42 +0800 > > > The rcu callback listeners_free_rcu() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(listeners_free_rcu). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 09/17] net,rcu: convert call_rcu(kfree_tid_tx) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (7 preceding siblings ...) 2011-03-15 10:01 ` [PATCH 08/17] net, rcu: convert call_rcu(listeners_free_rcu) " Lai Jiangshan @ 2011-03-15 10:02 ` Lai Jiangshan 2011-03-15 10:03 ` [PATCH 10/17] audit_tree, rcu: convert call_rcu(__put_tree) " Lai Jiangshan ` (7 subsequent siblings) 16 siblings, 0 replies; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:02 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback kfree_tid_tx() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(kfree_tid_tx). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/mac80211/agg-tx.c | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index 9cc472c..7f25f20 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c @@ -136,14 +136,6 @@ void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u1 ieee80211_tx_skb(sdata, skb); } -static void kfree_tid_tx(struct rcu_head *rcu_head) -{ - struct tid_ampdu_tx *tid_tx = - container_of(rcu_head, struct tid_ampdu_tx, rcu_head); - - kfree(tid_tx); -} - int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, enum ieee80211_back_parties initiator, bool tx) @@ -163,7 +155,7 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, /* not even started yet! */ rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], NULL); spin_unlock_bh(&sta->lock); - call_rcu(&tid_tx->rcu_head, kfree_tid_tx); + kfree_rcu(tid_tx, rcu_head); return 0; } @@ -322,7 +314,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) spin_unlock_bh(&sta->lock); ieee80211_wake_queue_agg(local, tid); - call_rcu(&tid_tx->rcu_head, kfree_tid_tx); + kfree_rcu(tid_tx, rcu_head); return; } @@ -699,7 +691,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid) ieee80211_agg_splice_finish(local, tid); - call_rcu(&tid_tx->rcu_head, kfree_tid_tx); + kfree_rcu(tid_tx, rcu_head); unlock_sta: spin_unlock_bh(&sta->lock); -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 10/17] audit_tree, rcu: convert call_rcu(__put_tree) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (8 preceding siblings ...) 2011-03-15 10:02 ` [PATCH 09/17] net,rcu: convert call_rcu(kfree_tid_tx) " Lai Jiangshan @ 2011-03-15 10:03 ` Lai Jiangshan 2011-03-15 10:05 ` [PATCH 11/17] net,rcu: convert call_rcu(sctp_local_addr_free) " Lai Jiangshan ` (6 subsequent siblings) 16 siblings, 0 replies; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:03 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback __put_tree() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(__put_tree). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- kernel/audit_tree.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 37b2bea..ae216a3 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c @@ -93,16 +93,10 @@ static inline void get_tree(struct audit_tree *tree) atomic_inc(&tree->count); } -static void __put_tree(struct rcu_head *rcu) -{ - struct audit_tree *tree = container_of(rcu, struct audit_tree, head); - kfree(tree); -} - static inline void put_tree(struct audit_tree *tree) { if (atomic_dec_and_test(&tree->count)) - call_rcu(&tree->head, __put_tree); + kfree_rcu(tree, head); } /* to avoid bringing the entire thing in audit.h */ -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 11/17] net,rcu: convert call_rcu(sctp_local_addr_free) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (9 preceding siblings ...) 2011-03-15 10:03 ` [PATCH 10/17] audit_tree, rcu: convert call_rcu(__put_tree) " Lai Jiangshan @ 2011-03-15 10:05 ` Lai Jiangshan [not found] ` <4D7F39CE.80403-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 10:06 ` [PATCH 12/17] block, rcu: convert call_rcu(cfq_cfqd_free) " Lai Jiangshan ` (5 subsequent siblings) 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:05 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback sctp_local_addr_free() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(sctp_local_addr_free). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- include/net/sctp/sctp.h | 1 - net/sctp/bind_addr.c | 2 +- net/sctp/ipv6.c | 2 +- net/sctp/protocol.c | 9 +-------- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 505845d..01e094c 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -115,7 +115,6 @@ * sctp/protocol.c */ extern struct sock *sctp_get_ctl_sock(void); -extern void sctp_local_addr_free(struct rcu_head *head); extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, sctp_scope_t, gfp_t gfp, int flags); diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index faf71d1..3c06c87 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c @@ -219,7 +219,7 @@ int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr) } if (found) { - call_rcu(&addr->rcu, sctp_local_addr_free); + kfree_rcu(addr, rcu); SCTP_DBG_OBJCNT_DEC(addr); return 0; } diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 95e0c8e..1960234 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -123,7 +123,7 @@ static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev, } spin_unlock_bh(&sctp_local_addr_lock); if (found) - call_rcu(&addr->rcu, sctp_local_addr_free); + kfree_rcu(addr, rcu); break; } diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index e58f947..26c7697 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -230,13 +230,6 @@ static void sctp_free_local_addr_list(void) } } -void sctp_local_addr_free(struct rcu_head *head) -{ - struct sctp_sockaddr_entry *e = container_of(head, - struct sctp_sockaddr_entry, rcu); - kfree(e); -} - /* Copy the local addresses which are valid for 'scope' into 'bp'. */ int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope, gfp_t gfp, int copy_flags) @@ -680,7 +673,7 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, } spin_unlock_bh(&sctp_local_addr_lock); if (found) - call_rcu(&addr->rcu, sctp_local_addr_free); + kfree_rcu(addr, rcu); break; } -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F39CE.80403-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 11/17] net,rcu: convert call_rcu(sctp_local_addr_free) to kfree_rcu() [not found] ` <4D7F39CE.80403-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 21:03 ` David Miller 0 siblings, 0 replies; 32+ messages in thread From: David Miller @ 2011-03-15 21:03 UTC (permalink / raw) To: laijs-BthXqXjhjHXQFUHtdCDX3A Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA, linux-sctp-u79uwXL29TY76Z2rM5mHXA, xemul-GEFAQzZX7r8dnm+yROfE0A, pekkas-UjJjq++bwZ7HOG6cAo2yLw, eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, kuznet-v/Mj1YrvjDBInbfyfbPRSQ, mingo-X9Un+BFzKDI, paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, sri-r/Jw6+rmf7HQT0dZR+AlfA, vladislav.yasevich-VXdhtT5mjnY, hagen-GvnIQ6b/HdU, linville-2XuSBdqkA4R54TAoqtyWWQ, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn, menage-hpIqsD4AKlfQT0dZR+AlfA, axboe-tSWWG44O7X1aa/9Udqfwiw, linux-nfs-u79uwXL29TY76Z2rM5mHXA, jpirko-H+wXaHxf7aLQT0dZR+AlfA, yoshfuji-VfPWfsRibaP+Ru+s062T9g, jkosina-AlSwsSmVLrQ, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, gregkh-l3A5Bk7waGM, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, eparis-H+wXaHxf7aLQT0dZR+AlfA, linux-security-module-u79uwXL29TY76Z2rM5mHXA, ebiederm-aS9lmoZGLiVWk0Htik3J/w, netdev-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, johannes-cdvu00un1VgdHxzADdlk8Q From: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 15 Mar 2011 18:05:02 +0800 > > > The rcu callback sctp_local_addr_free() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(sctp_local_addr_free). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 12/17] block, rcu: convert call_rcu(cfq_cfqd_free) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (10 preceding siblings ...) 2011-03-15 10:05 ` [PATCH 11/17] net,rcu: convert call_rcu(sctp_local_addr_free) " Lai Jiangshan @ 2011-03-15 10:06 ` Lai Jiangshan 2011-03-15 10:07 ` [PATCH 13/17] nfs, rcu: convert call_rcu(nfs_free_delegation_callback) " Lai Jiangshan ` (4 subsequent siblings) 16 siblings, 0 replies; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:06 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback cfq_cfqd_free() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(cfq_cfqd_free). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- block/cfq-iosched.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index ea83a4f..32fe43e 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -3812,11 +3812,6 @@ static void cfq_put_async_queues(struct cfq_data *cfqd) cfq_put_queue(cfqd->async_idle_cfqq); } -static void cfq_cfqd_free(struct rcu_head *head) -{ - kfree(container_of(head, struct cfq_data, rcu)); -} - static void cfq_exit_queue(struct elevator_queue *e) { struct cfq_data *cfqd = e->elevator_data; @@ -3850,7 +3845,7 @@ static void cfq_exit_queue(struct elevator_queue *e) spin_unlock(&cic_index_lock); /* Wait for cfqg->blkg->key accessors to exit their grace periods. */ - call_rcu(&cfqd->rcu, cfq_cfqd_free); + kfree_rcu(cfqd, rcu); } static int cfq_alloc_cic_index(void) -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 13/17] nfs, rcu: convert call_rcu(nfs_free_delegation_callback) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (11 preceding siblings ...) 2011-03-15 10:06 ` [PATCH 12/17] block, rcu: convert call_rcu(cfq_cfqd_free) " Lai Jiangshan @ 2011-03-15 10:07 ` Lai Jiangshan 2011-03-15 10:07 ` [PATCH 14/17] security,rcu: convert call_rcu(whitelist_item_free) " Lai Jiangshan ` (3 subsequent siblings) 16 siblings, 0 replies; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:07 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback nfs_free_delegation_callback() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(nfs_free_delegation_callback). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- fs/nfs/delegation.c | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index bbbc6bf..dd25c2a 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -21,25 +21,13 @@ #include "delegation.h" #include "internal.h" -static void nfs_do_free_delegation(struct nfs_delegation *delegation) -{ - kfree(delegation); -} - -static void nfs_free_delegation_callback(struct rcu_head *head) -{ - struct nfs_delegation *delegation = container_of(head, struct nfs_delegation, rcu); - - nfs_do_free_delegation(delegation); -} - static void nfs_free_delegation(struct nfs_delegation *delegation) { if (delegation->cred) { put_rpccred(delegation->cred); delegation->cred = NULL; } - call_rcu(&delegation->rcu, nfs_free_delegation_callback); + kfree_rcu(delegation, rcu); } /** -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 14/17] security,rcu: convert call_rcu(whitelist_item_free) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (12 preceding siblings ...) 2011-03-15 10:07 ` [PATCH 13/17] nfs, rcu: convert call_rcu(nfs_free_delegation_callback) " Lai Jiangshan @ 2011-03-15 10:07 ` Lai Jiangshan 2011-03-15 10:08 ` [PATCH 15/17] net,rcu: convert call_rcu(ha_rcu_free) " Lai Jiangshan ` (2 subsequent siblings) 16 siblings, 0 replies; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:07 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback whitelist_item_free() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(whitelist_item_free). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- security/device_cgroup.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/security/device_cgroup.c b/security/device_cgroup.c index 8d9c48f..e886ab5 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c @@ -126,14 +126,6 @@ static int dev_whitelist_add(struct dev_cgroup *dev_cgroup, return 0; } -static void whitelist_item_free(struct rcu_head *rcu) -{ - struct dev_whitelist_item *item; - - item = container_of(rcu, struct dev_whitelist_item, rcu); - kfree(item); -} - /* * called under devcgroup_mutex */ @@ -156,7 +148,7 @@ remove: walk->access &= ~wh->access; if (!walk->access) { list_del_rcu(&walk->list); - call_rcu(&walk->rcu, whitelist_item_free); + kfree_rcu(walk, rcu); } } } -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 15/17] net,rcu: convert call_rcu(ha_rcu_free) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (13 preceding siblings ...) 2011-03-15 10:07 ` [PATCH 14/17] security,rcu: convert call_rcu(whitelist_item_free) " Lai Jiangshan @ 2011-03-15 10:08 ` Lai Jiangshan [not found] ` <4D7F3ABA.7020709-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 10:10 ` [PATCH 16/17] net, rcu: convert call_rcu(dn_dev_free_ifa_rcu) " Lai Jiangshan 2011-03-15 10:11 ` [PATCH 17/17] net,act_police,rcu: remove rcu_barrier() Lai Jiangshan 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:08 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback ha_rcu_free() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(ha_rcu_free). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/core/dev_addr_lists.c | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c index 133fd22..4062355 100644 --- a/net/core/dev_addr_lists.c +++ b/net/core/dev_addr_lists.c @@ -68,14 +68,6 @@ static int __hw_addr_add(struct netdev_hw_addr_list *list, unsigned char *addr, return __hw_addr_add_ex(list, addr, addr_len, addr_type, false); } -static void ha_rcu_free(struct rcu_head *head) -{ - struct netdev_hw_addr *ha; - - ha = container_of(head, struct netdev_hw_addr, rcu_head); - kfree(ha); -} - static int __hw_addr_del_ex(struct netdev_hw_addr_list *list, unsigned char *addr, int addr_len, unsigned char addr_type, bool global) @@ -94,7 +86,7 @@ static int __hw_addr_del_ex(struct netdev_hw_addr_list *list, if (--ha->refcount) return 0; list_del_rcu(&ha->list); - call_rcu(&ha->rcu_head, ha_rcu_free); + kfree_rcu(ha, rcu_head); list->count--; return 0; } @@ -197,7 +189,7 @@ void __hw_addr_flush(struct netdev_hw_addr_list *list) list_for_each_entry_safe(ha, tmp, &list->list, list) { list_del_rcu(&ha->list); - call_rcu(&ha->rcu_head, ha_rcu_free); + kfree_rcu(ha, rcu_head); } list->count = 0; } -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F3ABA.7020709-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 15/17] net,rcu: convert call_rcu(ha_rcu_free) to kfree_rcu() [not found] ` <4D7F3ABA.7020709-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 21:04 ` David Miller 0 siblings, 0 replies; 32+ messages in thread From: David Miller @ 2011-03-15 21:04 UTC (permalink / raw) To: laijs-BthXqXjhjHXQFUHtdCDX3A Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA, linux-sctp-u79uwXL29TY76Z2rM5mHXA, xemul-GEFAQzZX7r8dnm+yROfE0A, pekkas-UjJjq++bwZ7HOG6cAo2yLw, eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, kuznet-v/Mj1YrvjDBInbfyfbPRSQ, mingo-X9Un+BFzKDI, paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, sri-r/Jw6+rmf7HQT0dZR+AlfA, vladislav.yasevich-VXdhtT5mjnY, hagen-GvnIQ6b/HdU, linville-2XuSBdqkA4R54TAoqtyWWQ, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn, menage-hpIqsD4AKlfQT0dZR+AlfA, axboe-tSWWG44O7X1aa/9Udqfwiw, linux-nfs-u79uwXL29TY76Z2rM5mHXA, jpirko-H+wXaHxf7aLQT0dZR+AlfA, yoshfuji-VfPWfsRibaP+Ru+s062T9g, jkosina-AlSwsSmVLrQ, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, gregkh-l3A5Bk7waGM, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, eparis-H+wXaHxf7aLQT0dZR+AlfA, linux-security-module-u79uwXL29TY76Z2rM5mHXA, ebiederm-aS9lmoZGLiVWk0Htik3J/w, netdev-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, johannes-cdvu00un1VgdHxzADdlk8Q From: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 15 Mar 2011 18:08:58 +0800 > > > The rcu callback ha_rcu_free() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(ha_rcu_free). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 16/17] net, rcu: convert call_rcu(dn_dev_free_ifa_rcu) to kfree_rcu() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (14 preceding siblings ...) 2011-03-15 10:08 ` [PATCH 15/17] net,rcu: convert call_rcu(ha_rcu_free) " Lai Jiangshan @ 2011-03-15 10:10 ` Lai Jiangshan [not found] ` <4D7F3B04.9080504-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 10:11 ` [PATCH 17/17] net,act_police,rcu: remove rcu_barrier() Lai Jiangshan 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:10 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust The rcu callback dn_dev_free_ifa_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(dn_dev_free_ifa_rcu). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/decnet/dn_dev.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 0dcaa90..4c27615 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -332,14 +332,9 @@ static struct dn_ifaddr *dn_dev_alloc_ifa(void) return ifa; } -static void dn_dev_free_ifa_rcu(struct rcu_head *head) -{ - kfree(container_of(head, struct dn_ifaddr, rcu)); -} - static void dn_dev_free_ifa(struct dn_ifaddr *ifa) { - call_rcu(&ifa->rcu, dn_dev_free_ifa_rcu); + kfree_rcu(ifa, rcu); } static void dn_dev_del_ifa(struct dn_dev *dn_db, struct dn_ifaddr __rcu **ifap, int destroy) -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F3B04.9080504-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 16/17] net,rcu: convert call_rcu(dn_dev_free_ifa_rcu) to kfree_rcu() [not found] ` <4D7F3B04.9080504-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 21:04 ` David Miller 0 siblings, 0 replies; 32+ messages in thread From: David Miller @ 2011-03-15 21:04 UTC (permalink / raw) To: laijs-BthXqXjhjHXQFUHtdCDX3A Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA, linux-sctp-u79uwXL29TY76Z2rM5mHXA, xemul-GEFAQzZX7r8dnm+yROfE0A, pekkas-UjJjq++bwZ7HOG6cAo2yLw, eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, kuznet-v/Mj1YrvjDBInbfyfbPRSQ, mingo-X9Un+BFzKDI, paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, sri-r/Jw6+rmf7HQT0dZR+AlfA, vladislav.yasevich-VXdhtT5mjnY, hagen-GvnIQ6b/HdU, linville-2XuSBdqkA4R54TAoqtyWWQ, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn, menage-hpIqsD4AKlfQT0dZR+AlfA, axboe-tSWWG44O7X1aa/9Udqfwiw, linux-nfs-u79uwXL29TY76Z2rM5mHXA, jpirko-H+wXaHxf7aLQT0dZR+AlfA, yoshfuji-VfPWfsRibaP+Ru+s062T9g, jkosina-AlSwsSmVLrQ, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, gregkh-l3A5Bk7waGM, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, eparis-H+wXaHxf7aLQT0dZR+AlfA, linux-security-module-u79uwXL29TY76Z2rM5mHXA, ebiederm-aS9lmoZGLiVWk0Htik3J/w, netdev-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, johannes-cdvu00un1VgdHxzADdlk8Q From: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 15 Mar 2011 18:10:12 +0800 > > The rcu callback dn_dev_free_ifa_rcu() just calls a kfree(), > so we use kfree_rcu() instead of the call_rcu(dn_dev_free_ifa_rcu). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 17/17] net,act_police,rcu: remove rcu_barrier() [not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> ` (15 preceding siblings ...) 2011-03-15 10:10 ` [PATCH 16/17] net, rcu: convert call_rcu(dn_dev_free_ifa_rcu) " Lai Jiangshan @ 2011-03-15 10:11 ` Lai Jiangshan [not found] ` <4D7F3B62.6000005-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 16 siblings, 1 reply; 32+ messages in thread From: Lai Jiangshan @ 2011-03-15 10:11 UTC (permalink / raw) To: Ingo Molnar, Paul E. McKenney, Jens Axboe, Trond Myklebust There is no callback of this module maybe queued since we use kfree_rcu(), we can safely remove the rcu_barrier(). Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/sched/act_police.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 083b091..22e3f9b 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -397,7 +397,6 @@ static void __exit police_cleanup_module(void) { tcf_unregister_action(&act_police_ops); - rcu_barrier(); /* Wait for completion of call_rcu()'s (tcf_police_free_rcu) */ } module_init(police_init_module); -- 1.7.4 ^ permalink raw reply related [flat|nested] 32+ messages in thread
[parent not found: <4D7F3B62.6000005-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 17/17] net,act_police,rcu: remove rcu_barrier() [not found] ` <4D7F3B62.6000005-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2011-03-15 11:04 ` Eric Dumazet 2011-03-16 3:13 ` Lai Jiangshan 2011-03-15 21:04 ` David Miller 1 sibling, 1 reply; 32+ messages in thread From: Eric Dumazet @ 2011-03-15 11:04 UTC (permalink / raw) To: Lai Jiangshan Cc: Randy Dunlap, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond Myklebust, linux-sctp-u79uwXL29TY76Z2rM5mHXA, Pavel Emelyanov, Pekka Savola (ipv6), Uwe Kleine-König, Alexey Kuznetsov, Ingo Molnar, Paul E. McKenney, Sridhar Samudrala, Vlad Yasevich, Hagen Paul Pfeifer, John W. Linville, Al Viro, Johannes Berg, Jens Axboe, linux-nfs-u79uwXL29TY76Z2rM5mHXA, Jiri Pirko Le mardi 15 mars 2011 à 18:11 +0800, Lai Jiangshan a écrit : > > There is no callback of this module maybe queued > since we use kfree_rcu(), we can safely remove the rcu_barrier(). > > Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> > --- > net/sched/act_police.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/net/sched/act_police.c b/net/sched/act_police.c > index 083b091..22e3f9b 100644 > --- a/net/sched/act_police.c > +++ b/net/sched/act_police.c > @@ -397,7 +397,6 @@ static void __exit > police_cleanup_module(void) > { > tcf_unregister_action(&act_police_ops); > - rcu_barrier(); /* Wait for completion of call_rcu()'s (tcf_police_free_rcu) */ > } > > module_init(police_init_module); Why is it a separate patch, and not included in patch 5/17 ? _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 17/17] net,act_police,rcu: remove rcu_barrier() 2011-03-15 11:04 ` Eric Dumazet @ 2011-03-16 3:13 ` Lai Jiangshan 0 siblings, 0 replies; 32+ messages in thread From: Lai Jiangshan @ 2011-03-16 3:13 UTC (permalink / raw) To: Eric Dumazet Cc: Randy Dunlap, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond Myklebust, linux-sctp-u79uwXL29TY76Z2rM5mHXA, Pavel Emelyanov, Pekka Savola (ipv6), Uwe Kleine-König, Alexey Kuznetsov, Ingo Molnar, Paul E. McKenney, Sridhar Samudrala, Vlad Yasevich, Hagen Paul Pfeifer, John W. Linville, Al Viro, Johannes Berg, Jens Axboe, linux-nfs-u79uwXL29TY76Z2rM5mHXA, Jiri Pirko On 03/15/2011 07:04 PM, Eric Dumazet wrote: > Le mardi 15 mars 2011 à 18:11 +0800, Lai Jiangshan a écrit : >> >> There is no callback of this module maybe queued >> since we use kfree_rcu(), we can safely remove the rcu_barrier(). >> >> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> >> --- >> net/sched/act_police.c | 1 - >> 1 files changed, 0 insertions(+), 1 deletions(-) >> >> diff --git a/net/sched/act_police.c b/net/sched/act_police.c >> index 083b091..22e3f9b 100644 >> --- a/net/sched/act_police.c >> +++ b/net/sched/act_police.c >> @@ -397,7 +397,6 @@ static void __exit >> police_cleanup_module(void) >> { >> tcf_unregister_action(&act_police_ops); >> - rcu_barrier(); /* Wait for completion of call_rcu()'s (tcf_police_free_rcu) */ >> } >> >> module_init(police_init_module); > > > Why is it a separate patch, and not included in patch 5/17 ? > A simple_kfree_callback() a patch, if a module has multiple simple_kfree_callback()s, "rcu_barrier()" in module_exit function should only be removed after all callback()s are converted to kfree_rcu(). Separate patches makes things clearer. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 17/17] net,act_police,rcu: remove rcu_barrier() [not found] ` <4D7F3B62.6000005-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2011-03-15 11:04 ` Eric Dumazet @ 2011-03-15 21:04 ` David Miller 1 sibling, 0 replies; 32+ messages in thread From: David Miller @ 2011-03-15 21:04 UTC (permalink / raw) To: laijs-BthXqXjhjHXQFUHtdCDX3A Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, linux-decnet-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA, linux-sctp-u79uwXL29TY76Z2rM5mHXA, xemul-GEFAQzZX7r8dnm+yROfE0A, pekkas-UjJjq++bwZ7HOG6cAo2yLw, eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w, u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ, kuznet-v/Mj1YrvjDBInbfyfbPRSQ, mingo-X9Un+BFzKDI, paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, sri-r/Jw6+rmf7HQT0dZR+AlfA, vladislav.yasevich-VXdhtT5mjnY, hagen-GvnIQ6b/HdU, linville-2XuSBdqkA4R54TAoqtyWWQ, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn, menage-hpIqsD4AKlfQT0dZR+AlfA, axboe-tSWWG44O7X1aa/9Udqfwiw, linux-nfs-u79uwXL29TY76Z2rM5mHXA, jpirko-H+wXaHxf7aLQT0dZR+AlfA, yoshfuji-VfPWfsRibaP+Ru+s062T9g, jkosina-AlSwsSmVLrQ, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, gregkh-l3A5Bk7waGM, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, eparis-H+wXaHxf7aLQT0dZR+AlfA, linux-security-module-u79uwXL29TY76Z2rM5mHXA, ebiederm-aS9lmoZGLiVWk0Htik3J/w, netdev-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ, johannes-cdvu00un1VgdHxzADdlk8Q From: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 15 Mar 2011 18:11:46 +0800 > > > There is no callback of this module maybe queued > since we use kfree_rcu(), we can safely remove the rcu_barrier(). > > Signed-off-by: Lai Jiangshan <laijs-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> ^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2011-03-16 3:13 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15 9:49 [PATCH 0/17] rcu: covert call_rcu(simple_kfree_callbck) to kfree_rcu() (PART 1) Lai Jiangshan
[not found] ` <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 9:53 ` [PATCH 01/17] cgroup, rcu: convert call_rcu(free_css_set_rcu) to kfree_rcu() Lai Jiangshan
[not found] ` <4D7F372A.6050407-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 20:03 ` Paul Menage
2011-03-15 9:55 ` [PATCH 02/17] cgroup, rcu: convert call_rcu(free_cgroup_rcu) " Lai Jiangshan
[not found] ` <4D7F3784.6090307-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 20:04 ` Paul Menage
2011-03-15 9:56 ` [PATCH 03/17] cgroup, rcu: convert call_rcu(__free_css_id_cb) " Lai Jiangshan
[not found] ` <4D7F37BA.5000308-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 20:04 ` Paul Menage
2011-03-15 9:57 ` [PATCH 04/17] net, rcu: convert call_rcu(tcf_common_free_rcu) " Lai Jiangshan
[not found] ` <4D7F37F0.1050801-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 21:02 ` [PATCH 04/17] net,rcu: " David Miller
2011-03-15 9:58 ` [PATCH 05/17] net, rcu: convert call_rcu(tcf_police_free_rcu) " Lai Jiangshan
[not found] ` <4D7F3828.4040403-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 21:02 ` [PATCH 05/17] net,rcu: " David Miller
2011-03-15 9:59 ` [PATCH 06/17] net,rcu: convert call_rcu(in6_dev_finish_destroy_rcu) " Lai Jiangshan
[not found] ` <4D7F3872.6090305-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 21:03 ` David Miller
2011-03-15 10:00 ` [PATCH 07/17] net, rcu: convert call_rcu(inet6_ifa_finish_destroy_rcu) " Lai Jiangshan
[not found] ` <4D7F38AE.7060708-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 21:03 ` [PATCH 07/17] net,rcu: " David Miller
2011-03-15 10:01 ` [PATCH 08/17] net, rcu: convert call_rcu(listeners_free_rcu) " Lai Jiangshan
[not found] ` <4D7F3906.3090107-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 21:03 ` [PATCH 08/17] net,rcu: " David Miller
2011-03-15 10:02 ` [PATCH 09/17] net,rcu: convert call_rcu(kfree_tid_tx) " Lai Jiangshan
2011-03-15 10:03 ` [PATCH 10/17] audit_tree, rcu: convert call_rcu(__put_tree) " Lai Jiangshan
2011-03-15 10:05 ` [PATCH 11/17] net,rcu: convert call_rcu(sctp_local_addr_free) " Lai Jiangshan
[not found] ` <4D7F39CE.80403-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 21:03 ` David Miller
2011-03-15 10:06 ` [PATCH 12/17] block, rcu: convert call_rcu(cfq_cfqd_free) " Lai Jiangshan
2011-03-15 10:07 ` [PATCH 13/17] nfs, rcu: convert call_rcu(nfs_free_delegation_callback) " Lai Jiangshan
2011-03-15 10:07 ` [PATCH 14/17] security,rcu: convert call_rcu(whitelist_item_free) " Lai Jiangshan
2011-03-15 10:08 ` [PATCH 15/17] net,rcu: convert call_rcu(ha_rcu_free) " Lai Jiangshan
[not found] ` <4D7F3ABA.7020709-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 21:04 ` David Miller
2011-03-15 10:10 ` [PATCH 16/17] net, rcu: convert call_rcu(dn_dev_free_ifa_rcu) " Lai Jiangshan
[not found] ` <4D7F3B04.9080504-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 21:04 ` [PATCH 16/17] net,rcu: " David Miller
2011-03-15 10:11 ` [PATCH 17/17] net,act_police,rcu: remove rcu_barrier() Lai Jiangshan
[not found] ` <4D7F3B62.6000005-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-03-15 11:04 ` Eric Dumazet
2011-03-16 3:13 ` Lai Jiangshan
2011-03-15 21:04 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox