Re: Better LWLocks with compare-and-swap (9.4)
| От | Merlin Moncure | 
|---|---|
| Тема | Re: Better LWLocks with compare-and-swap (9.4) | 
| Дата | |
| Msg-id | CAHyXU0x+oYbf1=wYX_=DdsgmmDdQ9yQTm2A469DZRJqs1u-BvQ@mail.gmail.com обсуждение исходный текст | 
| Ответ на | Better LWLocks with compare-and-swap (9.4) (Heikki Linnakangas <hlinnakangas@vmware.com>) | 
| Ответы | Re: Better LWLocks with compare-and-swap (9.4) | 
| Список | pgsql-hackers | 
On Mon, May 13, 2013 at 7:50 AM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote: > The attached patch is still work-in-progress. There needs to be a configure > test and fallback to spinlock if a CAS instruction is not available. I used > the gcc __sync_val_compare_and_swap() builtin directly, that needs to be > abstracted. Also, in the case that the wait queue needs to be manipulated, > the code spins on the CAS instruction, but there is no delay mechanism like > there is on a regular spinlock; that needs to be added in somehow. These are really interesting results. Why is the CAS method so much faster then TAS? Did you see any contention? merlin
В списке pgsql-hackers по дате отправления: