Re: spin_delay() for ARM
| От | Tom Lane |
|---|---|
| Тема | Re: spin_delay() for ARM |
| Дата | |
| Msg-id | 31850.1586550129@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: spin_delay() for ARM (Andres Freund <andres@anarazel.de>) |
| Ответы |
Re: spin_delay() for ARM
|
| Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> writes:
> On 2020-04-10 13:09:13 +0530, Amit Khandekar wrote:
>> On my Intel Xeon machine with 8 cores, I tried to test PAUSE also
>> using a sample C program (attached spin.c).
> PAUSE doesn't operate on the level of the CPU scheduler. So the OS won't
> just schedule another process - you won't see different CPU usage if you
> measure it purely as the time running. You should be able to see a
> difference if you measure with a profiler that shows you data from the
> CPUs performance monitoring unit.
A more useful test would be to directly experiment with contended
spinlocks. As I recall, we had some test cases laying about when
we were fooling with the spin delay stuff on Intel --- maybe
resurrecting one of those would be useful?
regards, tom lane
В списке pgsql-hackers по дате отправления: