Re: [PATCH] zerocopy NFS updated

Jakob Østergaard (jakob@unthought.net)
Tue, 16 Apr 2002 03:41:20 +0200


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}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/