Re: [PATCH] reduce rcu_head size [2/2]

From: Dipankar Sarma
Date: Tue Jun 22 2004 - 13:33:39 EST


On Sun, Jun 20, 2004 at 11:42:24AM +0530, Dipankar Sarma wrote:
> On Sat, Jun 19, 2004 at 12:04:14PM -0700, Andrew Morton wrote:
> > Dipankar Sarma <dipankar@xxxxxxxxxx> wrote:
> > >
> > > This patch changes the call_rcu() API and avoids passing an
> > > argument to the callback function as suggested by Rusty.
> >
> > This breaks the bridge driver:
> >
> >
> > static void destroy_nbp(struct rcu_head *head)
> >
> > int br_add_if(struct net_bridge *br, struct net_device *dev)
> > {
> > struct net_bridge_port *p;
> >
> > ...
> > destroy_nbp(p);
>
> Crap. New patch that compiles fine.
>

Applies on top of the earlier patches.

Thanks
Dipankar


OK, yet another mistake. Add fastcall directive to call_rcu().

Signed-off-by: Dipankar Sarma <dipankar@xxxxxxxxxx>


kernel/rcupdate.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN kernel/rcupdate.c~rcu-no-arg-fastcall-fix kernel/rcupdate.c
--- linux-2.6.6-rcu/kernel/rcupdate.c~rcu-no-arg-fastcall-fix 2004-06-22 23:14:22.000000000 +0530
+++ linux-2.6.6-rcu-dipankar/kernel/rcupdate.c 2004-06-22 23:19:26.000000000 +0530
@@ -65,7 +65,8 @@ static DEFINE_PER_CPU(struct tasklet_str
* The read-side of critical section that use call_rcu() for updation must
* be protected by rcu_read_lock()/rcu_read_unlock().
*/
-void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
+void fastcall call_rcu(struct rcu_head *head,
+ void (*func)(struct rcu_head *rcu))
{
int cpu;
unsigned long flags;

_
-
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/