Re: [PATCHES] update i386 spinlock for hyperthreading

From: ohp(at)pyrenet(dot)fr
To: Manfred Spraul <manfred(at)colorfullife(dot)com>
Cc: pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] update i386 spinlock for hyperthreading
Date: 2003-12-27 16:56:03
Message-ID: Pine.UW2.4.53.0312271753550.19309@server.pyrenet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

Hi Manfred,

I'm using unixware 7 but couldn't compile your source with native cc, I
had to compile it with gcc.

here are the results:

Script started on Sat Dec 27 17:50:49 2003
/tmp 17:50:50: ./a.out
MOVETEST called by non-superuser, running with normal priority.
zerotest: -1073736628 ticks;
zerotest: -4372 ticks;
zerotest: -52 ticks;
rep nop: 508 ticks;
rep nop: 88 ticks;
rep nop: 60 ticks;
nop: 256 ticks;
nop: 224 ticks;
nop: 92 ticks;
nop: 64 ticks;
nop: 12 ticks;
nop: 8 ticks;
nop: 0 ticks;
nop: -4 ticks;
rep nop: 56 ticks;
rep nop: 44 ticks;
rep nop: 40 ticks;
zerotest: -4 ticks;
rep nop: 24 ticks;
zerotest: -4 ticks;
nop: 0 ticks;
zerotest: -4 ticks;
nop: -8 ticks;
zerotest: -8 ticks;
rep nop: 32 ticks;
nop: -16 ticks;
zerotest: -4 ticks;
zerotest: -4 ticks;
rep nop: 24 ticks;
zerotest: -4 ticks;
nop: -12 ticks;
^?
/tmp 17:53:34: exit

script done on Sat Dec 27 17:53:38 2003

Regards
On Sat, 27 Dec 2003, Manfred Spraul wrote:

> Date: Sat, 27 Dec 2003 12:22:45 +0100
> From: Manfred Spraul <manfred(at)colorfullife(dot)com>
> To: ohp(at)pyrenet(dot)fr
> Subject: Re: [PATCHES] update i386 spinlock for hyperthreading
>
> Hi Olivier,
>
> I have attached rep_nop.cpp. It's a simple C program (unfortunately
> filled with linux specific gccisms) that benchmarks the time for a
> single rep;nop instruction, compared to a normal nop and nothing at all.
>
> Which OS do you use? I can try to build an app for FreeBSD, and it
> should be possible to compile it under Windows with cygwin as well.
>
> Under Linux:
> $ gcc -O2 -o rep_nop rep_nop.cpp
> $ ./rep_nop
>
> Just run in for a few seconds and send back the output. Please add the
> mailing list back into the cc list.
> --
> Manfred
>

--
Olivier PRENANT Tel: +33-5-61-50-97-00 (Work)
6, Chemin d'Harraud Turrou +33-5-61-50-97-01 (Fax)
31190 AUTERIVE +33-6-07-63-80-64 (GSM)
FRANCE Email: ohp(at)pyrenet(dot)fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Randal L. Schwartz 2003-12-27 17:51:32 Re: Is my MySQL Gaining ?
Previous Message Christopher Murtagh 2003-12-27 16:29:57 Re: Is my MySQL Gaining ?

Browse pgsql-hackers by date

  From Date Subject
Next Message Randal L. Schwartz 2003-12-27 17:51:32 Re: Is my MySQL Gaining ?
Previous Message Bruce Momjian 2003-12-27 16:39:56 Re: Quoting of psql \d output

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-12-27 18:13:55 Re: Quoting of psql \d output
Previous Message Bruce Momjian 2003-12-27 16:39:56 Re: Quoting of psql \d output