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>] [day] [month] [year] [list]
Date:	Tue, 11 Dec 2007 05:50:46 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Dipankar Sarma <dipankar@...ibm.com>,
	Linux kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] RCU : move three variables to __read_mostly to save space

I noticed this vmlinux layout on i686 (where CONFIG_X86_L1_CACHE_SHIFT = 7) :

c06cdab4 d pid_caches_lh
c06cdb00 d qlowmark
c06cdb04 d qhimark
c06cdb08 d blimit
c06cdb80 d rcu_ctrlblk
c06cdc80 d rcu_bh_ctrlblk

This means that qlowmark, qhimark and blimit use a whole 128 bytes cache line. 
Linker is not smart enough for us.

Moving these three variables to read_mostly section saves 116 (128-12) bytes.

# size vmlinux vmlinux.before_patch
    text    data     bss     dec     hex filename
6343966  490818  630784 7465568  71ea60 vmlinux
6343966  490930  630784 7465680  71ead0 vmlinux.before_patch

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

View attachment "rcu.patch" of type "text/plain" (611 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ