Re: First cut of PowerPC support in NPTL
Paul Mackerras <[email protected]>
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Message-ID | <[email protected]> |
Jakub Jelinek writes: > Is there any gain on PPC (or s390) to have separate lll_mutex_* and lll_* > implementations instead of using just one (lll_mutex_*) for both? > > On IA-32 lll_lock is one insn faster than lll_mutex_lock, which is why I > believe Ulrich did this, but on s390 with compare_and_swap it > really doesn't matter if you increment or decrement and what the > unlocked value is. My implementation on PPC has the same number of instructions for lll_mutex_lock and lll_lock. The underlying __lll_mutex_add uses one more register than __lll_add, but we have plenty of registers on PPC so that shouldn't matter. I'll change the lll_lock/unlock implementation to be the same as lll_mutex_lock/unlock. Paul.