Staging
v0.5.1
https://github.com/torvalds/linux
Revision a634904a7de0d3a0bc606f608007a34e8c05bfee authored by ASANO Masahiro on 23 August 2006, 00:06:02 UTC, committed by Trond Myklebust on 24 August 2006, 19:49:14 UTC
I'm trying to speeding up mkdir(2) for network file systems.  A typical
mkdir(2) calls two inode_operations: lookup and mkdir.  The lookup
operation would fail with ENOENT in common case.  I think it is unnecessary
because the subsequent mkdir operation can check it.  In case of creat(2),
lookup operation is called with the LOOKUP_CREATE flag, so individual
filesystem can omit real lookup.  e.g.  nfs_lookup().

Here is a sample patch which uses LOOKUP_CREATE and O_EXCL on mkdir,
symlink and mknod.  This uses the gadget for creat(2).

And here is the result of a benchmark on NFSv3.
  mkdir(2) 10,000 times:
    original  50.5 sec
    patched   29.0 sec

Signed-off-by: ASANO Masahiro <masano@tnes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
(cherry picked from fab7bf44449b29f9d5572a5dd8adcf7c91d5bf0f commit)
1 parent ddeff52
History
Tip revision: a634904a7de0d3a0bc606f608007a34e8c05bfee authored by ASANO Masahiro on 23 August 2006, 00:06:02 UTC
VFS: add lookup hint for network file systems
Tip revision: a634904
File Mode Size
.gitignore -rw-r--r-- 94 bytes
Kconfig -rw-r--r-- 1.6 KB
Makefile -rw-r--r-- 1.8 KB
gen_init_cpio.c -rw-r--r-- 10.4 KB
initramfs_data.S -rw-r--r-- 1.0 KB

back to top