But it's not quite that simple, either. If we say dirty cachelines
cost twice as much as read-only ones (ie. read + write vs. read +
discard), it gives some guide. In particular, if a structure has
parts:
struct foo {
readonly R;
writeable W;
};
And it normally fits in one cacheline, but you set the alignment of W
to a cacheline, now it fits in two, you've lost. (Note, struct
tcp_hashinfo is not such a structure, this is just talking to the
gallery).
> You really don't understand what I'm trying to accomplish.
No. Thanks for the explanation.
> I want alignment on cache line boundary, and I don't want anything
> else in that cacheline.
A "read-mostly" section might be appropriate, then. Of course, you'd
have to split the structure, in that case, and it's not worth it if
there are only a few of these.
Have I finally got it through my thick skull now?
Rusty.
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - 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/