> From: Neil Conway [mailto:[EMAIL PROTECTED] wrote
> Simon Riggs wrote:
> > Setting MAX_SIMUL_LWLOCKS to this fairly high number doesn't seem to
> > match the optimistic use of the O(N) algorithm.
...
> Perhaps some data on the average value of num_held_locks and
> the number
> of entries we nee
"Simon Riggs" <[EMAIL PROTECTED]> writes:
> A few thoughts on LWLock data structures...
> In lwlock.c we hold a list of lwlocks held:
> held_lwlocks[MAX_SIMUL_LWLOCKS]
> where
> #define MAX_SIMUL_LWLOCKS 100
> The code for LWLockRelease assumes that the last acquired lock will
> always be the
Simon Riggs wrote:
Setting MAX_SIMUL_LWLOCKS to this fairly high number doesn't seem to
match the optimistic use of the O(N) algorithm.
How so? The algorithm is O(n) for the number of locks _currently held_,
not the maximum number of locks we might be able to hold. In other
words, in LWLockReleas
A few thoughts on LWLock data structures...
In lwlock.c we hold a list of lwlocks held:
held_lwlocks[MAX_SIMUL_LWLOCKS]
where
#define MAX_SIMUL_LWLOCKS 100
The code for LWLockRelease assumes that the last acquired lock will
always be the first one to be released, and uses an O(N) loop to s