lkml.org 
[lkml]   [2009]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 2/3] Prevent false sgi-xpc heartbeat failures.
On Tue, 7 Apr 2009 20:04:49 -0500 Robin Holt <holt@sgi.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@sgi.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.



\
 
 \ /
  Last update: 2009-04-08 03:21    [W:0.123 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site