Re: [PATCH] zerocopy NFS updated

Jakob Østergaard
2002-04-16T01:41:23Z

On Tue, Apr 16, 2002 at 10:03:02AM +0900, Hirokazu Takahashi wrote:
> Hi, David
>
...
>
> Yes, it seems to be the most general way.
> OK, I'll do this way first of all.
>
> In the kernel, probaboly I'd impelement as following:
>
> put a RPC header and a NFS header on "bufferA";
> down(semaphore);
> sendmsg(bufferA, MSG_MORE);
> for (eache pages of fileC)
> sock->opt->sendpage(page, islastpage ? 0 : MSG_MORE)
> up(semaphore);
>
> the semaphore is required to serialize sending data as many knfsd kthreads
> use the same socket.

Won't this serialize too much ? I mean, consider the situation where we
have file-A and file-B completely in cache, while file-C needs to be
read from the physical disk.

Three different clients (A, B and C) request file-A, file-B and file-C
respectively. The send of file-C is started first, and the sends of files
A and B (which could commence immediately and complete at near wire-speed)
will now have to wait (leaving the NIC idle) until file-C is read from
the disks.

Even if it's not the entire file but only a single NFS request (probably 8kB),
one disk seek (7ms) is still around 85 kB, or 10 8kB NFS requests (at 100Mbit).

Or am I misunderstanding ? Will your UDP sendpage() queue the requests ?

--
................................................................
: jakob@unthought.net : And I see the elder races, :
:.........................: putrid forms of man :
: Jakob Østergaard : See him rise and claim the earth, :
: OZ9ABN : his downfall is at hand. :
:.........................:............{Konkhra}...............: