Re: [RFC][PATCH] net drivers and cache alignment

From: Jeff Garzik (jgarzik@pobox.com)
Date: Sat Dec 07 2002 - 18:36:48 EST


Andrew Morton wrote:
> It needs padding _only_ on SMP. ____cacheline_aligned_in_smp.
[...]
> So your patch will do what you want it to do. You should just tag the
> first member of a group with ____cacheline_aligned_in_smp, and keep an
> eye on things with offsetof().

thanks.

For this case, though, I want to align on cacheline bounaries even on
UP, right? That's why I picked ____cacheline_aligned. It uses
L1_CACHE_BYTES when !CONFIG_SMP. Other uses of ____cacheline_aligned in
the kernel seem to relate to irq matters, just like my groupings in tg3.h.

[obviously benchmarking can answer some of this, but I want to hammer
out silliness first]

        Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 07 2002 - 22:00:31 EST