linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -mm 0/6] rcu: introduce kfree_rcu V2
@ 2009-03-03 13:44 Lai Jiangshan
  2009-03-03 14:09 ` Ingo Molnar
  2009-03-03 15:11 ` [PATCH -mm 0/6] rcu: introduce kfree_rcu V2 Nick Piggin
  0 siblings, 2 replies; 8+ messages in thread
From: Lai Jiangshan @ 2009-03-03 13:44 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Pekka Enberg, Christoph Lameter, Nick Piggin, Paul E. McKenney,
	Manfred Spraul, Ingo Molnar, Peter Zijlstra, linux-kernel


There are 23 instances where the rcu callback just does

	kfree(containerof(head,struct whatever_struct,rcu_member));

The 23 instances exist because there are 23 'struct whatever_struct' with
their individual rcu_member. These patches creates a generic kfree_rcu()
function that removes the need for these 23 helpers.

The number of this kind of rcu callback will increase, for this is the
most common way to use rcu and define rcu callback.

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.)

Changed from V1:
1) Implement kfree_rcu() in slab layer.
   In V1, the offset from the container struct to the rcu member
   is calculated at compile time and stored in head->func instead of the
   function pointer. This disarrange rcu's algorithm a little, there is
   no bad side effect when we implement kfree_rcu() in slab layer.

2) kfree_rcu() API is changed, use the version that Manfred Spraul designed.
   This one allows compiler do more checking.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---








^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-03-07  5:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-03 13:44 [PATCH -mm 0/6] rcu: introduce kfree_rcu V2 Lai Jiangshan
2009-03-03 14:09 ` Ingo Molnar
2009-03-04  9:22   ` Lai Jiangshan
2009-03-04 11:45     ` Ingo Molnar
2009-03-04 12:00       ` Pekka Enberg
2009-03-06 10:23         ` [PATCH] rcu: introduce kfree_rcu V3 Lai Jiangshan
2009-03-07  5:31           ` Paul E. McKenney
2009-03-03 15:11 ` [PATCH -mm 0/6] rcu: introduce kfree_rcu V2 Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).