Re: Spinlock backoff algorithm

From: Steve Atkins <steve(at)blighty(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Spinlock backoff algorithm
Date: 2007-11-15 03:19:20
Message-ID: 78E5748A-C1A0-4C3A-9CC6-AC5B34E1AEDD@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Nov 14, 2007, at 6:57 PM, Josh Berkus wrote:

> Tom,
>
>> I've got one upstairs (HPPA), and I believe that it's actually a
>> pretty
>> common situation in scientifically-oriented workstations from a few
>> years back.
>
> Last I checked, scientific workstations aren't exactly a common
> platform for
> PostgreSQL servers.
>
> The question is, for our most common platforms (like AMD and Intel)
> is the FPU
> notably slower/more contended than integer division? I'd the
> impression that
> it was, but my knowledge of chip architectures is liable to be out
> of date.
>
> Can we have a hardware geek speak up?

Somewhat. The last version of K7 I looked at had three integer
execution units versus one floating point unit.

They're also scheduled fairly independently, meaning that casts from
double to integer or back again will have some minor negative effects
on the pipeline or the scheduler more than the use of floating point
itself.

In the grand scheme of things, though, I don't believe it's a big
deal for typical code on most modern desktop CPUs, certainly not
compared to memory starvation, use of less than optimal compilers and
all the other reasons the pipeline might stall. I might care in the
innermost of inner loops, but possibly not even then unless a
profiler told me differently.

Cheers,
Steve

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Maxwell 2007-11-15 03:22:20 Re: Spinlock backoff algorithm
Previous Message Joshua D. Drake 2007-11-15 03:12:48 Re: Spinlock backoff algorithm