From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 27/36] perf,rcu: convert call_rcu(swevent_hlist_release_rcu) to kfree_rcu()
Date: Fri, 18 Mar 2011 10:35:35 +0100 [thread overview]
Message-ID: <1300440935.21794.30.camel@twins> (raw)
In-Reply-To: <4D82DABD.7050208@cn.fujitsu.com>
On Fri, 2011-03-18 at 12:08 +0800, Lai Jiangshan wrote:
>
> The rcu callback swevent_hlist_release_rcu() just calls a kfree(),
> so we use kfree_rcu() instead of the call_rcu(swevent_hlist_release_rcu).
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
> kernel/perf_event.c | 10 +---------
> 1 files changed, 1 insertions(+), 9 deletions(-)
>
> diff --git a/kernel/perf_event.c b/kernel/perf_event.c
> index b0581bd..43b0410 100644
> --- a/kernel/perf_event.c
> +++ b/kernel/perf_event.c
> @@ -5300,14 +5300,6 @@ swevent_hlist_deref(struct swevent_htable *swhash)
> lockdep_is_held(&swhash->hlist_mutex));
> }
>
> -static void swevent_hlist_release_rcu(struct rcu_head *rcu_head)
> -{
> - struct swevent_hlist *hlist;
> -
> - hlist = container_of(rcu_head, struct swevent_hlist, rcu_head);
> - kfree(hlist);
> -}
> -
> static void swevent_hlist_release(struct swevent_htable *swhash)
> {
> struct swevent_hlist *hlist = swevent_hlist_deref(swhash);
> @@ -5316,7 +5308,7 @@ static void swevent_hlist_release(struct swevent_htable *swhash)
> return;
>
> rcu_assign_pointer(swhash->swevent_hlist, NULL);
> - call_rcu(&hlist->rcu_head, swevent_hlist_release_rcu);
> + kfree_rcu(hlist, rcu_head);
> }
>
> static void swevent_hlist_put_cpu(struct perf_event *event, int cpu)
prev parent reply other threads:[~2011-03-18 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 4:08 [PATCH 27/36] perf,rcu: convert call_rcu(swevent_hlist_release_rcu) to kfree_rcu() Lai Jiangshan
2011-03-18 9:35 ` Peter Zijlstra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300440935.21794.30.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox