Re: Wait free LW_SHARED acquisition - v0.2 - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Wait free LW_SHARED acquisition - v0.2
Date
Msg-id 20141008172344.GV7043@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: Wait free LW_SHARED acquisition - v0.2  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Wait free LW_SHARED acquisition - v0.2
List pgsql-hackers
Robert Haas wrote:
> On Wed, Oct 8, 2014 at 8:47 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> > I don't see that as being relevant. The difference is an instruction or
> > two - in the slow path we'll enter the kernel and sleep. This doesn't
> > matter in comparison.
> > And the code is *so* much more readable.
> 
> I find the slist/dlist stuff actually quite difficult to get right
> compared to a hand-rolled linked list.  But the really big problem is
> that the debugger can't do anything useful with it.  You have to work
> out the structure-member offset in order to walk the list and manually
> cast to char *, adjust the pointer, and cast back.  That sucks.

As far as I recall you can get gdb to understand those pointer games
by defining some structs or macros.  Maybe we can improve by documenting
this.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Wait free LW_SHARED acquisition - v0.2
Next
From: Andrew Dunstan
Date:
Subject: Re: Context lenses to set/get values in json values.