Skip to contentSkip to conversation

kernel lock contention and scalability

DISCUSSION Rajagopal Ananthanarayanan 2 participants 2 messages Mar 7, 2001 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Jeff Dike wrote:

	[ ... ]
Quoted 9 lines
Quoted 5 lines

Another synchronization method popular with database peeps is "post/ wait" for which SGI have a patch available for Linux. I understand that this is relatively "light weight" and might be a better choice for PG.

URL?

Jeff

Here it is:

http://oss.sgi.com/projects/postwait/

Check out the download section for a 2.4.0 patch.

cheers,

ananth.

--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------

#2 lore raw
Quoted 3 lines · [email protected] said:

Here it is:
http://oss.sgi.com/projects/postwait/
Check out the download section for a 2.4.0 patch.

After having thought about this a bit more, I don't see why pw_post and pw_wait can't be implemented in userspace as:

int pw_post(uid_t uid)
{
return(kill(uid, SIGHUP)) /* Or signal of the waiter's choice */
}

int pw_wait(struct timespec *t)

{
	return(nanosleep(t, t));
}

In the case of UML, there would be a uid field in its lock structure and the spin code would look like:

	lock->uid = getpid();
	pw_wait(NULL);

and the lock release code would be:

	pw_post(lock->uid);

Obviously, sending signals to processes from the outside could massively confuse matters, but I don't see that being a big problem, since I think you can do that now, and no one is complaining about it.

Is there anything that I'm missing?

Jeff