[openib-general] Re: ANNOUNCE: First usable version of userspace verbs

Michael S. Tsirkin mst at mellanox.co.il
Thu Mar 10 10:42:30 PST 2005


Quoting r. Roland Dreier <roland at topspin.com>:
> Subject: Re: ANNOUNCE: First usable version of userspace verbs
> 
>     Michael> I think I have discovered the problem. It seems that with
>     Michael> -O3 my compiler may reorder the WQE (and possibly CQE)
>     Michael> write with respect to the doorbell.  This wont happen on
>     Michael> i386 with consistent i/o ordering since the doorbell is
>     Michael> done in assembly, and probably not on other 32 bit
>     Michael> architectures since the mutex is likely to include a
>     Michael> memory barrier.
> 
>     Michael> Applying the folowing patch fixes the problem for me for
>     Michael> x86_64.
> 
> Thanks for diagnosing this.  I think I want to work on a more general
> fix though.
> 
>  - R.
> 

Generally I think you'll need to implement a write memory barrier,
and use it before each doorbell.
I didnt find an efficient portable way to do this.

I suggest implementing it for ppc with eioio, and simply
use a spinlock instead of a barrier for anything else.

-- 
MST - Michael S. Tsirkin



More information about the general mailing list