RE: [NFS] What is the current zerocopy status?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Trond,

Thank you for your help.

When I was reading
http://marc.merlins.org/linux/linux.conf.au_2001/Day3/ZeroCopyNet.html 

I had the feeling that NFS client side was completed. It says:
"... Now that the NFS client side has been fixed, the server side
(knfsd) still needs to be worked on.  ....". This is why I thought it
should be somewhere.

In regards to the receiving side and NFS header splitting, you right
that to do it for each possible RPC command will be hard, however the
idea is just to do it for the RPC write request and RPC read respond and
I hope it should not be that hard. 

For example, for FreeBSD, they came up with a model that works. They
have modified several components in the kernel including sockets and
RPC/NFS to allow the *smart* Ethernet chip and its *smart* driver to DMA
the NFS payload for jumbo frames into special buffers that can be used
by the file system cache. By doing it, they avoid the copy of the data.
I think it only works for UDP jumbo frames.
Here is the link that talks about it.
http://people.freebsd.org/~ken/zero_copy 

I am interested to know if there is an interest in the LINUX community
to build support for such stuff too.

I have couple of more questions if I may; I hope it will benefit
everyone as well.

1. How is zerocopy sock->ops->sendpage operation related to Ethernet
cards that support fragments? I understand that scatter/gather
capabilities let you avoid copies in general in the outbound direction.
2. If the Ethernet chip is not *smart* to do header split on upper layer
protocol such as RPC/NFS, what is the benefit of having scatter/gather
on the inbound? If the Ethernet chip knows at least where the IP and TCP
headers are and DMA them to different buffers, I can see some benefit.

Thanks so much for your help,

Cheers,
Ephi



-----Original Message-----
From: Trond Myklebust [mailto:trond.myklebust@fys.uio.no] 
Sent: Wednesday, March 13, 2002 3:02 AM
To: Ephi Dror
Cc: nfs@lists.sourceforge.net; kernelnewbies@nl.linux.org
Subject: Re: [NFS] What is the current zerocopy status?

>>>>> " " == Ephi Dror <edror@silverbacksystems.com> writes:

     > Dear list members,

     > I am a bit confused about the state of the zerocopy support in
     > LINUX and will appreciate any info on that subject.

     > In particular: Does NFS client use zerocopy? if yes how? From
     > what version Does NFS Server use zerocopy? If yes, how? From
     > what version Does Sendfile system call use zerocopy? I have
     > seen that this is maybe the only place it is really in use.

No. Neither the NFS client nor the server uses the TCP zero copy
interface (a.k.a.sock->ops->sendpage).

For the former, I simply haven't had the time yet, although
I am planning some RPC changes for 2.5.x that will make zero copy
possible.
As for the latter: basic NFS over TCP server has just barely made it
into 2.5.x...

     > Does zerocopy for LINUX mean only support for the transmit side
     > for "scatter/gather + checksum" capable NIC cards?

We've had support for hardware checksumming on the UDP receive side
since before the zero copy patch. When the latter is available, it is
used by both the NFS client & server.
Scatter/gather is used when supported by the driver.

     > Can someone point me to documentation on what has been changed
     > in sockets in this regards?

Use the source, Luke...

     > What about the receive side, there are smart chips that can
     > split NFS headers from payloads for example, so payload
     > theoretically can go directly into file system buffers if they
     > pre assigned and the Ethernet driver knows when to use them?

     > I have seen interesting support on FreeBSD for those next
     > generation hardware and I am wondering what the LINUX position
     > on it is.

I'm not aware of the particular hardware you are referring to, but
unless these chips are *really* smart, I doubt the above is of much
interest for NFS. There is quite a bit of overhead involved in
interpreting the XDR code (see RFC1831 and RFC1832 for details). It is
not a simple case of stripping off a header and then jamming a load of
bytes into a buffer...

Cheers,
  Trond

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux