[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201103180914.31464.arnd@arndb.de>
Date: Fri, 18 Mar 2011 09:14:31 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Lai Jiangshan <laijs@...fujitsu.com>
Cc: paulmck@...ux.vnet.ibm.com, Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>,
Manfred Spraul <manfred@...orfullife.com>
Subject: Re: [PATCH V5 1/1] rcu: introduce kfree_rcu()
On Friday 18 March 2011, Lai Jiangshan wrote:
> kfree_rcu() which was original proposed by Lai 2.5 years ago is one of
> the most important RCU TODO list entries, Lai and Manfred have worked on
> patches for this. This V4 patch is based on the Manfred's patch and
> the V1 of Lai's patch. (These two patches are almost the same
> in implementation, and this patch is mainly based on the Manfred's).
>
> Lai's V1 patch: http://lkml.org/lkml/2008/9/18/1
> Manfred's patch: http://lkml.org/lkml/2009/1/2/115
> RCU TODO list: http://www.kernel.org/pub/linux/kernel/people/paulmck/rcutodo.html
>
> This new introduced API kfree_rcu() primitive kfree()s the specified memory
> after a RCU grace period elapses.
>
> It replaces many simple "call_rcu(head, simple_kfree_callback)";
> These many simple_kfree_callback() instances just does
>
> kfree(containerof(head,struct whatever_struct,rcu_member));
>
> These simple_kfree_callback() instances are just duplicate code, we need
> a generic function for them.
>
> And kfree_rcu() is also help for unloadable modules, kfree_rcu() does not
> queue any function which belong to the module, so a rcu_barrier() can
> be avoid when module exit. (If we queue any other function by call_rcu(),
> rcu_barrier() is still needed.)
>
> Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> Signed-off-by: Manfred Spraul <manfred@...orfullife.com>
Acked-by: Arnd Bergmann <arnd@...db.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists