[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:30:59 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.
> 
> OK, I finally see what you mean. We must also make sure that mtt_base is
> cache line aligned, I forgot this might not be the case.

Or might it? Sorry for thinking aloud, but won't other things break
if memfree allocator base isn't page aligned?
For example we are allocating full pages of ICM space in each table,
are we not?

-- 
MST




More information about the general mailing list