Re: Spinlocks, yet again: analysis and proposed patches - Mailing list pgsql-hackers

From Qingqing Zhou
Subject Re: Spinlocks, yet again: analysis and proposed patches
Date
Msg-id e6qfqa$jne$1@news.hub.org
Whole thread Raw
In response to Re: Spinlocks, yet again: analysis and proposed patches  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Spinlocks, yet again: analysis and proposed patches  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Spinlocks, yet again: analysis and proposed patches  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Bruce Momjian" <pgman@candle.pha.pa.us> wrote
>
> Added to TODO list.
>
> > One thing we tried in February was padding out the statically defined
> > locks with dummy lock definitions in the enum. This has the effect of
> > ensuring that the most contested locks are very definitely in their own
> > cache line and not shared with others.
> > That showed a noticeable improvement in performance, probably because it
> > costs very little to implement, even if the code would require some
> > explanatory documentation.
> >

Has this been done? See the LWLOCK_PADDED_SIZE macro in code.

Regards,
Qingqing




pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Re-thing PG_MODULE_MAGIC
Next
From: Bruce Momjian
Date:
Subject: Re: Spinlocks, yet again: analysis and proposed patches