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: <200611231157.30056.dada1@cosmosbay.com>
Date:	Thu, 23 Nov 2006 11:57:29 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Daniel McNeil <daniel@...l.org>
Subject: [PATCH] fs : reorder some 'struct inode' fields to speedup i_size manipulations

On 32bits SMP platforms, 64bits i_size is protected by a seqcount 
(i_size_seqcount).

When i_size is read or written, i_size_seqcount is read/written as well, so it 
make sense to group these two fields together in the same cache line.

Before this patch, accessing i_size needed 3 cache lines (2 for i_size, one 
for i_size_seqcount). After, only one cache line is needed/ (dirtied on a 
i_size change).

This patch moves i_size_seqcount next to i_size, and also moves i_version to 
let offsetof(struct inode, i_size) being 0x40 instead of 0x3c (for 32bits 
platforms). 

For 64 bits platforms, i_size_seqcount doesnt exist, and the move of a 'long 
i_version' should not introduce a new hole because of padding.

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

View attachment "move_i_size_seqcount.patch" of type "text/plain" (817 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ