Re: Poor condvar performance
Luke Elliott <[email protected]> Wed, 26 Nov 2003 18:32:29 -0600
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2003-11-26 at 17:53, Jamie Lokier wrote: > Ulrich Drepper wrote: > > Requeue cannot work with pshared. requeue needs the virtual address of > > the mutex but this cannot be determined when using pshared since it > > might be different in different processes. It would be necessary to > > have a process-local part of the condvar structure to remember the mutex > > address for each process separately. There is no such functionality > > which is sufficiently fast. > > (I haven't looked at the NPTL code, I just know the futex code well). > > Why do you need to remember the mutex address in each process, if it's > in shared memory? Is it because the requeue operation would have to > move a waiter from a shared memory futex to a process-local memory futex? > > -- Jamie Ok I'm now getting out of my depth, but doesn't using a pshared condvar imply the associated mutex is also pshared? I understand that a single mutex can be associated with many condvars, but to associate a condvar with different local mutexes in different processes doesn't seem to make sense. Essentially then the current pshared NPTL condvars are unusable, at least on UP? What alternatives are there to condvars? Using the futex API directly? Regards Luke.