Linux: Use splice to speed up cache storeback
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Fri, 20 Nov 2009 15:08:25 +0000 (15:08 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 10 Dec 2009 19:45:36 +0000 (11:45 -0800)
commit34ffc9cd7d7eed62229704ad0e1d327f076ea7b6
tree06e70a1e1fd03195d611de82a0d90919712f587e
parent292ec075d2beea2d718caa3f50929e125b1b97c1
Linux: Use splice to speed up cache storeback

This patch adds a new cache store function for Linux, which uses
splice() and direct access to the page cache, rather than doing
data copies to a temporary buffer between rx and afs. It removes
one copy, and some context switching, from the write codepath.

One side-effect here is that it will delay storebehinds from
returning control to the user. Instead of returning once the first
4k has been successfully transfered, we will wait until a cache
chunk has been transmitted. This is currently unavoidable, as we
can't take the GLOCK within a splice actor.

Change-Id: I5b0284d67febccf099710589908fad18b808332c
Reviewed-on: http://gerrit.openafs.org/903
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
acinclude.m4
src/afs/LINUX/osi_fetchstore.c [new file with mode: 0644]
src/afs/afs_fetchstore.c
src/afs/afs_prototypes.h
src/cf/linux-test4.m4
src/libafs/Makefile.common.in
src/libafs/MakefileProto.LINUX.in