All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Robin Holt <holt@sgi.com>
Cc: linux-kernel@vger.kernel.org, dcn@sgi.com
Subject: Re: [Patch 2/3] Prevent false sgi-xpc heartbeat failures.
Date: Tue, 7 Apr 2009 18:15:37 -0700	[thread overview]
Message-ID: <20090407181537.aca1364e.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090408010449.GC10768@sgi.com>

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.


  reply	other threads:[~2009-04-08  1:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03 16:04 [Patch 0/3] Some SGI XPC Updates holt
2009-04-03 16:04 ` [Patch 1/3] Update SGI XP/XPC/XPNET maintainer holt
2009-04-03 16:04 ` [Patch 2/3] Prevent false sgi-xpc heartbeat failures holt
2009-04-07 19:49   ` Andrew Morton
2009-04-08  1:04     ` Robin Holt
2009-04-08  1:15       ` Andrew Morton [this message]
2009-04-03 16:04 ` [Patch 3/3] Implement sgi-xpc opencomplete messaging holt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090407181537.aca1364e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dcn@sgi.com \
    --cc=holt@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.