Track spinlock delay in microsecond granularity.
Track spinlock delay in microsecond granularity.

On many platforms the OS will round the sleep time to millisecond
resolution, but there is no reason for us to pre-emptively round the
argument to pg_usleep.

When the delay was measured in milliseconds and started from 1 ms, it
sometimes took many attempts until the logic that increases the delay by
multiplying with a random value between 1 and 2 actually managed to bump it
from 1 ms to 2 ms. That lead to a sequence of 1 ms waits until the delay
started to increase. This wasn't really a problem but it looked odd if you
observed the waits. There is no measurable difference in performance, but
it's more readable this way.

Jeff Janes

adam8157/gpdb,zeroae/postgres-xl,greenplum-db/gpdb,zeroae/postgres-xl,xinzweb/gpdb,pavanvd/postgres-xl,yazun/postgres-xl,yazun/postgres-xl,Postgres-XL/Postgres-XL,Postgres-XL/Postgres-XL,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,greenplum-db/gpdb,xinzweb/gpdb,pavanvd/postgres-xl,lisakowen/gpdb,50wu/gpdb,adam8157/gpdb,jmcatamney/gpdb,lisakowen/gpdb,ashwinstar/gpdb,ovr/postgres-xl,jmcatamney/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,adam8157/gpdb,oberstet/postgres-xl,50wu/gpdb,pavanvd/postgres-xl,adam8157/gpdb,jmcatamney/gpdb,xinzweb/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,zeroae/postgres-xl,50wu/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,yazun/postgres-xl,jmcatamney/gpdb,ashwinstar/gpdb,lisakowen/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,oberstet/postgres-xl,ashwinstar/gpdb,oberstet/postgres-xl,greenplum-db/gpdb,oberstet/postgres-xl,xinzweb/gpdb,ashwinstar/gpdb,ovr/postgres-xl,greenplum-db/gpdb,50wu/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,lisakowen/gpdb,xinzweb/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,ovr/postgres-xl,xinzweb/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,oberstet/postgres-xl,greenplum-db/gpdb,yazun/postgres-xl,pavanvd/postgres-xl,adam8157/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb,yazun/postgres-xl,ovr/postgres-xl,ashwinstar/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,Postgres-XL/Postgres-XL,zeroae/postgres-xl,xinzweb/gpdb,ovr/postgres-xl,zeroae/postgres-xl,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb