[openib-general] [PATCH 5 of 5] IB/mthca: give reserved MTTs a separate cache line

Roland Dreier rdreier at cisco.com
Sun Jan 7 21:04:20 PST 2007


 > +	if (mthca_is_memfree(dev))
 > +		dev_lim->reserved_mtts = ALIGN(1 << (field >> 4),
 > +					       MTHCA_MTT_SEG_SIZE / sizeof(u64));
 > +	else
 > +		dev_lim->reserved_mtts = 1 << (field >> 4);

this still seems screwed up.  mem-free is reporting the number of
reserved MTT entries, so I think we want (1 << log_rsvd_mtts) /
(MTHCA_MTT_SEG_SIZE / sizeof (u64)) in that case (rounded up of
course), rather than just aligned to something.

 - R.




More information about the general mailing list