Re: Internal vs. external barriers (was: Re: Interesting LKMM litmus test)

Alan Stern
2023-01-04T20:59:00Z

On Wed, Jan 04, 2023 at 04:37:14PM +0100, Andrea Parri wrote:
> Sounds good to me too. I'm trying to remember why we went for the LKW
> event to model smp_mb__after_unlock_lock() (as opposed to the LKR event,
> as suggested above/in po-unlock-lock-po).

I don't remember either, but with the LKR event it would be awkward to
include the co part of (co | po) in the smp_mb__after_unlock_lock()
definition. You'd have to write something like ((co? ; rf) | po).

Aside from that, I don't think using LKR vs. LKW makes any difference.

> Anyway, I currently see no
> issue with the above (we know that LKW and LKR come paired), and I think
> it's good to merge the two notions of "unlock-lock pair" if possible.

Indeed. It also would eliminate questions about why po-unlock-lock-po
doesn't include the co term.

Alan