aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Piggin <npiggin@kernel.dk>2011-01-07 01:50:08 -0500
committerNick Piggin <npiggin@kernel.dk>2011-01-07 01:50:32 -0500
commite1bb57826381199cc79fbf44e9dfeee58fc7b339 (patch)
treeb2f5edeebc568c3fff4afd799801e9e605b99efc
parent4b936885ab04dc6e0bb0ef35e0e23c1a7364d9e5 (diff)
fs: prefetch inode data in dcache lookup
This makes single threaded git diff -1.25% +/- 0.05% elapsed time on my 2s12c24t Westmere system, and -0.86% +/- 0.05% on my 2s8c Barcelona, by prefetching the important first cacheline of the inode in while we do the actual name compare and other operations on the dentry. There was no measurable slowdown in the single file stat case, or the creat case (where negative dentries would be common). Signed-off-by: Nick Piggin <npiggin@kernel.dk>
-rw-r--r--fs/dcache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 9e6e6db76869..2a4ce7dc2306 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1793,6 +1793,9 @@ seqretry:
1793 tlen = dentry->d_name.len; 1793 tlen = dentry->d_name.len;
1794 tname = dentry->d_name.name; 1794 tname = dentry->d_name.name;
1795 i = dentry->d_inode; 1795 i = dentry->d_inode;
1796 prefetch(tname);
1797 if (i)
1798 prefetch(i);
1796 /* 1799 /*
1797 * This seqcount check is required to ensure name and 1800 * This seqcount check is required to ensure name and
1798 * len are loaded atomically, so as not to walk off the 1801 * len are loaded atomically, so as not to walk off the