Re: 2.6.9 PageAnon bug

From: Hugh Dickins
Date: Wed Oct 20 2004 - 15:08:37 EST


On 20 Oct 2004, Andi Kleen wrote:
> Hugh Dickins <hugh@xxxxxxxxxxx> writes:
>
> > But what does "aligned(2)" or "aligned(4)" do on 64-bit machines -
> > any danger of it aligning stupidly? I think not, but know little.
>
> It will align stupidly.

I was imagining not in this case, where the i_data follows immediately
after the struct address_space *i_mapping. But let's not rely on that.

> This means on x86-64 i don't care too much because the misalignment
> penalty on K8 is only 1 cycle and not that much worse on P4, but
> others may care more.

I would care: not so much the penalty, as the danger of surprise.

Would __attribute__((aligned((sizeof(long))))) seem better to you?

Do you think it would be better on the declaration of struct
address_space itself, than on the struct address_space i_data?

Thanks for the feedback,
Hugh

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