On Monday 05 November 2012 19:58:54 Marek Lindner wrote: > On Sunday, November 04, 2012 06:41:48 Sven Eckelmann wrote: > > - struct batadv_neigh_node __rcu *router; /* rcu protected pointer > > */ > > > > #ifdef CONFIG_BATMAN_ADV_DAT > > > > batadv_dat_addr_t dat_addr; > > > > #endif > > > > + uint8_t flags; > > + uint8_t gw_flags; > > + struct batadv_neigh_node __rcu *router; /* rcu protected pointer > > */ > > Shouldn't we move batadv_dat_addr_t to the end of the struct to achieve the > smallest possible struct regardless of whether DAT is compiled in or not ? > Or does it have no effect ?
More or less. It is hard to optimize it for both situation. Just moving to the
end will not fix the problem because it will create an 1 byte whole which has
to filled using something else. And optimizing it for all architectures is
even harder.
But this RFC is not really important. It was just a small fun test of pahole
for me.
Kind regards,
Sven
signature.asc
Description: This is a digitally signed message part.
