]> git.neil.brown.name Git - history.git/commit
[PATCH] Make nfs_find_request() scale
authorTrond Myklebust <trond.myklebust@fys.uio.no>
Fri, 8 Nov 2002 05:47:55 +0000 (21:47 -0800)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Fri, 8 Nov 2002 05:47:55 +0000 (21:47 -0800)
commitca738a2b4d3aeb26c141b804beaf713fe81bbe20
tree2c8b116772395c2d3c873eb3517c3a822415a64e
parentdf43f01520c88fff8f2e3c7986f86cda0cd0362b
[PATCH] Make nfs_find_request() scale

nfs_find_request() needs to be called every time we schedule a write
on the page cache. Currently it is implemented as a linked list which
needs to be traversed completely in the case where we don't already
have a pending write request on the page in question.

The following patch adopts the new radix tree, as is already used in
the page cache. Performance change is more or less negligeable with
the current hard limit of 256 outstanding write requests per mount.

However when I remove this limit then the old nfs_find_request()
actually results in a 50% reduction in speed on my benchmark test
(iozone with 4 threads each writing a 512Mb file on a 512Mb Linux
client against a Solaris server on 100Mbit switched net). With this
patch, the result for the same benchmark is a 50% increase in speed.
fs/nfs/inode.c
fs/nfs/pagelist.c
fs/nfs/write.c
include/linux/nfs_fs.h
include/linux/nfs_page.h