Re: Spinlocks, yet again: analysis and proposed patches

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gavin Sherry <swm@linuxworld.com.au>
Cc: Marko Kreen <marko@l-t.ee>, pgsql-hackers@postgresql.org, Michael Paesold <mpaesold@gmx.at>
Date: 2005-09-16T00:05:53Z
Lists: pgsql-hackers
Gavin Sherry <swm@linuxworld.com.au> writes:
> What about padding the LWLock to 64 bytes on these architectures. Both P4
> and Opteron have 64 byte cache lines, IIRC. This would ensure that a
> cacheline doesn't hold two LWLocks.

I tried that first, actually, but it was a net loss.  I guess enlarging
the array that much wastes too much cache space.

			regards, tom lane