Re: [patch] generic rwsems

David Howells
2007-04-13T11:44:50Z

Nick Piggin <npiggin@suse.de> wrote:

> I think I should put wait_lock after wait_list, so as to get a better
> packing on most 64-bit architectures.

It makes no difference. struct lockdep_map contains at least one pointer and
so is going to be 8-byte aligned (assuming it's there at all). struct
rw_semaphore contains at least one pointer/long, so it will be padded out to
8-byte size.

If you want to make a difference, you'd need to add __attribute__((packed))
but you would need to be very careful with that.

David