Re: [NFS] nfs or autofs related hangs

From: Rusty Russell
Date: Tue Feb 17 2004 - 19:19:09 EST


On Mon, 16 Feb 2004 09:13:55 +0800 (WST)
Ian Kent <raven@xxxxxxxxxx> wrote:

> On Sun, 15 Feb 2004, Rusty Russell wrote:
> > Is this __cacheline_aligned_in_smp really required?
>
> I must admit I put this together without much thought with a "cut and
> paste".
>
> But, please tell me. I'm not entirely clear on what conditions I
> should be concerned about blowing the cache.

You should usually try to declare the spinlock near the things it protects, in
the hope that they'll be in the same cacheline. If we blow 128 bytes for
every spinlock, things will get slower, not faster.

ie. like any optimization, the default should be not to do it unless there's
a reason[1]

Cheers,
Rusty.
[1] An optimization being defined here as something with tradeoffs.
Doing the obviously superior thing is not an optimization, it's simply
being a decent coder.
--
there are those who do and those who hang on and you don't see too
many doers quoting their contemporaries. -- Larry McVoy
-
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/