lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <457DCC60.3050006@cosmosbay.com>
Date:	Mon, 11 Dec 2006 22:23:44 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	akpm@...l.org
Cc:	Linux kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] reorder struct pipe_buf_operations

Fields of struct pipe_buf_operations have not a precise layout (ie not 
optimized to fit cache lines nor reduce cache line ping pongs)

The bufs[] array is *large* and is placed near the beginning of the structure, 
so all following fields have a large offset. This is unfortunate because many 
archs have smaller instructions when using small offsets relative to a base 
register. On x86 for example, 7 bits offsets have smaller instruction lengths.

Moving bufs[] at the end of pipe_buf_operations permits all fields to have 
small offsets, and reduce text size, and icache pressure.

# size vmlinux.pre vmlinux
    text    data     bss     dec     hex filename
3268989  664356  492196 4425541  438745 vmlinux.pre
3268765  664356  492196 4425317  438665 vmlinux

So this patch reduces text size by 224 bytes on my x86_64 machine. Similar 
results on ia32.


Signed-off-by: Eric Dumazet <dada1@...mosbay.com>

View attachment "reorder_pipe_inode_info.patch" of type "text/plain" (671 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ