[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <492DDC99.5060106@cosmosbay.com>
Date: Thu, 27 Nov 2008 00:32:41 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: Ingo Molnar <mingo@...e.hu>
CC: David Miller <davem@...emloft.net>,
"Rafael J. Wysocki" <rjw@...k.pl>, linux-kernel@...r.kernel.org,
kernel-testers@...r.kernel.org, Mike Galbraith <efault@....de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Linux Netdev List <netdev@...r.kernel.org>,
Christoph Lameter <cl@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>
Subject: [PATCH 5/6] fs: Introduce special inodes
Goal of this patch is to not touch inode_lock for socket/pipes/anonfd
inodes allocation/freeing.
In new_inode(), we test if super block has MS_SPECIAL flag set.
If yes, we dont put inode in "inode_in_use" list nor "sb->s_inodes" list
As inode_lock was taken only to protect these lists, we avoid it as well
Using iput_special() from dput_special() avoids taking inode_lock
at freeing time.
This patch has a very noticeable effect, because we avoid dirtying
of three contended cache lines in new_inode(), and five cache lines
in iput()
Note: Not sure if we can use MS_SPECIAL=MS_NOUSER, or if we
really need a different flag.
(socket8 bench result : from 20.5s to 2.94s)
Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
---
fs/anon_inodes.c | 1 +
fs/dcache.c | 2 +-
fs/inode.c | 25 ++++++++++++++++++-------
fs/pipe.c | 3 ++-
include/linux/fs.h | 2 ++
net/socket.c | 1 +
6 files changed, 25 insertions(+), 9 deletions(-)
View attachment "special_inodes.patch" of type "text/plain" (3552 bytes)
Powered by blists - more mailing lists