[openib-general] Re: [PATCH][16/26] IB/mthca: mem-free doorbell record writing

Jeff Garzik jgarzik at pobox.com
Thu Mar 3 16:04:22 PST 2005


Roland Dreier wrote:
> Add a mthca_write_db_rec() to wrap writing doorbell records.  On
> 64-bit archs, this is just a 64-bit write, while on 32-bit archs it
> splits the write into two 32-bit writes with a memory barrier to make
> sure the two halves of the record are written in the correct order.

> +static inline void mthca_write_db_rec(u32 val[2], u32 *db)
> +{
> +	db[0] = val[0];
> +	wmb();
> +	db[1] = val[1];
> +}
> +


Are you concerned about ordering, or write-combining?

I am unaware of a situation where writes are re-ordered into a reversed, 
descending order for no apparent reason.

	Jeff





More information about the general mailing list