[openib-general] [PATCH 5 of 5] IB/mthca: give reserved MTTs a separate cache line
Michael S. Tsirkin
mst at mellanox.co.il
Fri Jan 5 00:08:48 PST 2007
> > + /* CPU writes to non-reserved MTTs, while HCA might DMA to reserved mtts */
> > + mdev->limits.reserved_mtts = max(dma_get_cache_alignment() / (int)sizeof(u64),
> > + mdev->limits.reserved_mtts);
>
> I don't follow this -- first of all, what guarantee is there that the
> reserved MTTs end on a cacheline boundary just because they take up
> more than a single cacheline? It seems this should really be using
> ALIGN() somehow.
I thought our buddy allocator algorithm guarantees size alignment.
It seems to me we rely on this in other places, no?
> Second, isn't reserved_mtts in units of 64 bytes, not sizeof(u64)?
I thought this is just the number of reserved MTTs, and
each MTT is 64 bit of course. what's wrong here?
--
MST
More information about the general
mailing list