lkml.org 
[lkml]   [2006]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs : reorder some 'struct inode' fields to speedup i_size manipulations
On Thu, 23 Nov 2006 11:57:29 +0100
Eric Dumazet <dada1@cosmosbay.com> wrote:

> 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).

I didn't understand that paragraph at all, really, so I took it out.

At present an i_size change will dirty one, two or three cachelines, most
likely one or two.

After your patch an i_size change will dirty one or two cachelines, most
likely one.

yes?

> 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@cosmosbay.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-11-27 22:41    [W:0.093 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site