Subject: Proposed new syscalls: pread and pwrite
To: None <tech-kern@NetBSD.ORG>
From: J.T. Conklin <jtc@cygnus.com>
List: tech-kern
Date: 12/04/1995 13:01:30
My officemate Stu was reading the Solaris manual last Friday and
noticed the syscalls pread() and pwrite().  Those calls are like
read() and write() but also take an offset argument like lseek().
He mentioned that TOPS-20 had something similar, and it resulted 
in a 10-15% performance improvement on database like applications.

Being a performance junkie, I thought it would be interesting to
provide those syscalls for NetBSD.  They were easy to implement, and
my naive test program measured between 5-10% performance improvement.
My program randomly read and wrote data blocks instead of using an
access pattern more typical of a database program.  I suspect the
improvement would be slightly better with a more realistic access
pattern.

Although the type of applications that benefit from this new syscall
is small, I think the performance improvement warrants the inclusion
of these new syscalls in NetBSD.  Even such things as mundane as DB
would seem to benefit from the new functionality.

I can post the diffs for the new syscalls later tonight (I'm currently
updating my source tree back to the development branch).

	--jtc