Re: [RFC PATCH] rcu: introduce kfree_rcu()

From: Paul E. McKenney
Date: Thu Sep 18 2008 - 13:43:47 EST


On Thu, Sep 18, 2008 at 04:59:33PM +0800, Lai Jiangshan wrote:

[ . . . ]

> 1) unloadable modules:
> A) use my_struct_release_rcu():
> when we unload this modules, we need call rcu_barrier() to wait
> all my_struct_release_rcu() had called.
> B) use kfree_rcu():
> if all trivial callback are removed and kfree_rcu() are used instead,
> we do not need to wait anything. just quick finish unloading.

OK, so the trick is that the module -never- uses call_rcu()
directly, instead using -only- kfree_rcu(), along perhaps also with
synchronize_rcu(). Because kfree_rcu() does not reference module text,
you then don't need to wait at all. Good point!

Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/