Re: [PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-02 Thread Michael S. Tsirkin
On Wed, Jan 02, 2019 at 01:00:24PM -0800, Matthew Wilcox wrote: > On Wed, Jan 02, 2019 at 03:57:58PM -0500, Michael S. Tsirkin wrote: > > @@ -875,6 +893,8 @@ to the CPU containing it. See the section on > > "Multicopy atomicity" > > for more information. > > > > > > + > > + > > In summary:

Re: [PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-02 Thread Matthew Wilcox
On Wed, Jan 02, 2019 at 03:57:58PM -0500, Michael S. Tsirkin wrote: > @@ -875,6 +893,8 @@ to the CPU containing it. See the section on "Multicopy > atomicity" > for more information. > > > + > + > In summary: > >(*) Control dependencies can order prior loads against later stores.

[PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-02 Thread Michael S. Tsirkin
It's not uncommon to have two access two unrelated memory locations in a specific order. At the moment one has to use a memory barrier for this. However, if the first access was a read and the second used an address depending on the first one we would have a data dependency and no barrier would