Subject: Re: [PATCH] net: make sure struct dst_entry refcount is aligned on 64 bytes

From: Eric Dumazet <[email-masked]>
Date: Fri, 14 Nov 2008 14:37:38 +0100

Alexey Dobriyan a écrit :

> Hmm, indeed.
> 
> I tried moving __refcnt et al to the very beginning, but it seems to make
> things worse (on x86_64, almost within statistical error).
> 
> And there is no way to use offset_of() inside struct definition. :-(

Yes, it is important that the beginning of structure contain read mostly fields.

refcnt being the most written field (incremented / decremented for each packet),
it is really important to move it outside of the first 128 bytes 
(192 bytes on 64 bit arches) of dst_entry

I wonder if some real hot dst_entries could be splitted (one copy for each stream),
to reduce ping-pongs.