Re: memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, <pgsql-hackers(at)postgresql(dot)org>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: memory barriers (was: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs)
Date: 2011-09-21 19:39:48
Message-ID: 4E79F7340200002500041587@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Sep 21, 2011 at 2:48 PM, Kevin Grittner
> <Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> But even a full explanation of that case seems like almost too
>>> much for the comment of a header file, and there are certainly
>>> far more complex cases. I think anyone who is using these
>>> primitives is going to have to do some independent reading...
>>
>> Maybe a URL or two in the header comments, pointing to relevant
>> papers for the techniques used? After all, years from now
>> someone might be familiar with other techniques from newer papers
>> and wonder what the techniques in the code are based on.
>
> If there are any academic papers on this topic, I haven't found
> them. Mostly, I've found lots of articles written by people who
> were coding for the Linux kernel, and a lot of those articles are
> extremely Linux-specific (you could use the smb_rb() macro here,
> but it's better to instead use this RCU-related macro, because
> it'll do it for you, blah blah). I'm happy to link to any sources
> anyone thinks we ought to link to, but I've mostly had to piece
> this together bit by bit from blog posts and (sometimes buggy)
> examples. It hasn't been a particularly thrilling exercise.

Well, if it really is that hard to piece together the relevant
techniques, it seems cruel not to check in the results of your
efforts to work it out somewhere. Perhaps a README file?

On the other hand, a search turned up these two papers (which I
haven't yet read, but will):

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.97.2397&rep=rep1&type=pdf

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.153.6657&rep=rep1&type=pdf

On a quick scan, they both look promising in themselves, and
reference a lot of other promising-sounding papers.

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2011-09-21 19:47:43 Re: unaccent contrib
Previous Message Heikki Linnakangas 2011-09-21 19:38:22 Re: WIP: SP-GiST, Space-Partitioned GiST