[openib-general] [PATCH] use mmiowb after doorbell ring

Michael S. Tsirkin mst at mellanox.co.il
Tue Oct 17 21:15:56 PDT 2006


Quoting r. Roland Dreier <rdreier at cisco.com>:
> Subject: Re: [PATCH] use mmiowb after doorbell ring
> 
>     Roland> For now I just used lock; addl %0 to implement rmb on
>     Roland> i386.  I'm really not comfortable making libmthca depend
>     Roland> on sse2, and I don't see a good way to detect and use sse2
>     Roland> at runtime.
> 
>     Jason> I think the typical way this is done would be to use
>     Jason> ld.so's 'hwcap' handling and stick an optimized library in
>     Jason> /usr/lib/sse2.
> 
> It's a good suggestion, but the problem is that the CPU-dependent code
> is in the mthca.so driver-dependent plugin, which libibverbs dlopen()s
> at runtime.  Do you know how to use the hwcap stuff with dlopen()?
> I'm not thrilled about creating an sse2 special case in libibverbs
> just to handle libmthca on i386.

Off the top of my head, an easy way seems to be to split sse2-dependent code in
a separate library, which can then be installed on ld path, have mthca pull that
in.

-- 
MST




More information about the general mailing list