Re: Improving spin-lock implementation on ARM.
От | Heikki Linnakangas |
---|---|
Тема | Re: Improving spin-lock implementation on ARM. |
Дата | |
Msg-id | 16697830-4e15-5b4e-9698-f5be30eec363@iki.fi обсуждение исходный текст |
Ответ на | Improving spin-lock implementation on ARM. (Krunal Bauskar <krunalbauskar@gmail.com>) |
Ответы |
Re: Improving spin-lock implementation on ARM.
Re: Improving spin-lock implementation on ARM. |
Список | pgsql-hackers |
On 26/11/2020 06:30, Krunal Bauskar wrote: > Improving spin-lock implementation on ARM. > ------------------------------------------------------------ > > * Spin-Lock is known to have a significant effect on performance > with increasing scalability. > > * Existing Spin-Lock implementation for ARM is sub-optimal due to > use of TAS (test and swap) > > * TAS is implemented on ARM as load-store so even if the lock is not free, > store operation will execute to replace the same value. > This redundant operation (mainly store) is costly. > > * CAS is implemented on ARM as load-check-store-check that means if the > lock is not free, check operation, post-load will cause the loop to > return there-by saving on costlier store operation. [1] Can you add some code comments to explain that why CAS is cheaper than TAS on ARM? Is there some official ARM documentation, like a programmer's reference manual or something like that, that would show a reference implementation of a spinlock on ARM? It would be good to refer to an authoritative source on this. - Heikki
В списке pgsql-hackers по дате отправления: