Re: [PATCHES] Try again: S_LOCK reduced contention - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [PATCHES] Try again: S_LOCK reduced contention
Date
Msg-id 199806100439.AAA16010@candle.pha.pa.us
Whole thread Raw
In response to Re: [PATCHES] Try again: S_LOCK reduced contention  (dg@illustra.com (David Gould))
Responses Re: [PATCHES] Try again: S_LOCK reduced contention
Re: [HACKERS] Re: [PATCHES] Try again: S_LOCK reduced contention
List pgsql-hackers
> 1.6. New patch to follow.
>
>    The current S_LOCK and TAS() implementations (my patch of late May) are
>    slower than they need to be and cause more code bloat than they need to.
>    The bloat is caused by using a macro to inline a relatively complex bit
>    of code that is only used in the blocked lock case. I suspect the slowness
>    is caused at least partly by the macro as it requires more registers.
>
>    I have developed a new patch that separates out the lock available case
>    from the busywaiting case and that uses the GCC _inline_ facilty to make
>    the asm interface still look as clean as a function while not costing
>    anything. For a preview, see

Quite and analysis.  I want to comment on the code more, but I just want
to point out now that many of our i386 platforms are not GNU.  I think
we have to use macros.  I can't think of any GNU-specific code in the
source tree at this point, and I don't think it makes sense add it now
just to make the code look a litter cleaner.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-hackers by date:

Previous
From: Brandon Ibach
Date:
Subject: Re: [HACKERS] Table corrupt?
Next
From: dg@illustra.com (David Gould)
Date:
Subject: Re: [PATCHES] Try again: S_LOCK reduced contention