[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20090407181537.aca1364e.akpm@linux-foundation.org>
Date: Tue, 7 Apr 2009 18:15:37 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Robin Holt <holt@....com>
Cc: linux-kernel@...r.kernel.org, dcn@....com
Subject: Re: [Patch 2/3] Prevent false sgi-xpc heartbeat failures.
On Tue, 7 Apr 2009 20:04:49 -0500 Robin Holt <holt@....com> wrote:
> On Tue, Apr 07, 2009 at 12:49:33PM -0700, Andrew Morton wrote:
> > On Fri, 03 Apr 2009 11:04:42 -0500
> > holt@....com wrote:
> >
> > > +void (*xpc_allow_hb) (short partid);
> > > +void (*xpc_disallow_hb) (short partid);
> > > +void (*xpc_disallow_all_hbs) (void);
> > > void (*xpc_heartbeat_init) (void);
> > > void (*xpc_heartbeat_exit) (void);
> > > void (*xpc_increment_heartbeat) (void);
> >
> > The driver adds a huge number of globals.
> >
> > As a pointless cleanup it might be nice to convert all this:
>
>
> Andrew,
>
> Was this what you were thinking? I just slapped this together. It is not
> ready for inclusion yet. I need to review the patch and test it first.
>
> Index: 20090407-dcn-fixes/drivers/misc/sgi-xp/xpc.h
> ===================================================================
> --- 20090407-dcn-fixes.orig/drivers/misc/sgi-xp/xpc.h 2009-04-07 16:33:11.000000000 -0500
> +++ 20090407-dcn-fixes/drivers/misc/sgi-xp/xpc.h 2009-04-07 19:50:26.000000000 -0500
> @@ -780,6 +780,67 @@ struct xpc_partition {
>
> } ____cacheline_aligned;
>
> +struct xpc_arch_operations {
> ...
> +};
>
> ...
>
> +extern struct xpc_arch_operations *xpc_arch_ops;
That adds an extra pointer dereference for each call. I was thinking
extern struct xpc_arch_operations xpc_arch_ops;
static void
xpc_start_hb_beater(void)
{
xpc_heartbeat_init();
xpc_arch_ops.heartbeat_init();
which should generate the same code - it's just syntactic sugar.
--
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