Quoting r. Roland Dreier <[EMAIL PROTECTED]>:
> Subject: Re: [PATCH] use mmiowb after doorbell ring
>
> Michael> kernel code does rmb rather than mb there.
>
> OK, but that's an optimization rather than a correctness issue: mb is
> stronger than rmb.
Very strange. Let's consider amd64: libibverbs has
#elif defined(__x86_64__)
#define mb() asm volatile("" ::: "memory")
So its just a compiler barrier there.
While linux has asm-x86_64/system.h
#define rmb() asm volatile("lfence":::"memory")
So rmb seems to be stronger than mb: it will prevent the CPU from reordering
reads while mb won't.
Hmm?
--
MST
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general