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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200612151851.58741.dada1@cosmosbay.com>
Date:	Fri, 15 Dec 2006 18:51:58 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] struct vfsmount : keep mnt_count & mnt_expiry_mark away from mnt_flags

I noticed cache misses in touch_atime() that can be avoided if we keep 
mnt_count & mnt_expiry_mark in a different cache line than mnt_flags (mostly 
read)

mnt_count & mnt_expiry_mark are modified each time a file is opened/closed in 
a file system.

touch_atime() is called each time a file is read, and generally needs to read 
mnt_flags.

Other fields of struct vfsmount are mostly read so I chose to move mnt_count & 
mnt_expiry_mark at the end of struct vfsmount. And adding a comment so that 
nobody tries to re-arrange fields to fill the holes :)

On 64bits platforms, the new offsetof(mnt_count) is 0xC0
On 32bits platforms, it is 0x60, so I didnot add a 
____cacheline_aligned_in_smp because it would have a too big impact on the 
size of this object (in particular if CONFIG_X86_L1_CACHE_SHIFT=7)

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


View attachment "vfsmount.patch" of type "text/plain" (1235 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ