• Eric Dumazet's avatar
    inet: shrink netns_ipv4 by another cache line · 490f33c4
    Eric Dumazet authored
    By shuffling around some fields to remove 8 bytes of hole,
    we can save one cache line.
    
    pahole result before/after the patch :
    
    /* size: 768, cachelines: 12, members: 139 */
    /* sum members: 673, holes: 11, sum holes: 39 */
    /* padding: 56 */
    /* paddings: 2, sum paddings: 7 */
    /* forced alignments: 1 */
    
    ->
    
    /* size: 704, cachelines: 11, members: 139 */
    /* sum members: 673, holes: 10, sum holes: 31 */
    /* paddings: 2, sum paddings: 7 */
    /* forced alignments: 1 */
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    490f33c4
ipv4.h 5.87 KB