Subject: Re: [PATCH net-next v2 2/2] Re-check for a VIO_DESC_READY data descriptor after short udelay()

From: Sowmini Varadhan <[email-masked]>
Date: Tue, 2 Sep 2014 12:32:38 -0400

On (09/02/14 12:27), David L Stevens wrote:
> Sowmini,
> 	One of the things I found while looking at the code is that the
> write memory barrier is in the wrong place. I have a patch to fix it, but
> it means the last descriptor will NOT be marked as ready until the cache
> is flushed, which may be delayed.

I see.

I can certainly try that (could you please share that patch offline?)
But this fudge-factored delay (which, fwiw, I too cringed to add)
was actually motivated by some observations on other non-linux OS-es.

> 	That fix may make this one moot. Maybe not, but certainly there is
> an unnecessary delay in notifying the peer because of that bug. The fix is
> simply to move the "wmb()" after, instead of before, setting VIO_DESC_READY.
> I mentioned it in our stand-up last week, which you couldn't attend, because
> I pointed it out for the VDC driver, which also has the same problem.
> 
> 	You may want to retry with that change to see if the delay still
> helps.