Re: Does NFS bypass lower layers?

Olaf Kirch (okir@monad.swb.de)
Wed, 11 Nov 1998 14:00:44 +0100


On Tue, Nov 10, 1998 at 07:38:23PM -0500, Albert D. Cahalan wrote:
> Does Linux let NFS bypass lower layers like some other systems do?
> Other systems have a fast path for NFS packets. For example, the
> checksum is handled by the NFS code for cache reasons. For outgoing
> packets, the NFS code creates the whole UDP/IP packet by itself.

No, it doesn't do that. One optimization in that vein which would not
be too hard is to perform the defrag/checksum/copy-to-page-cache step
on READ responses received from the server, provided you can hook into
the ip defragmentation code without too much hassle.

You can also combine defragmentation/checksumming in knfsd, but the
performance win may not be that big because on write requests you
still have an extra memory access (checksum), since you have to pass
the data into VFS functions rather than scribbling into the page cache
directly as some OSs do.

Assembling the UDP/IP packet in the NFS code may not prove to be a big
win, either, because you normally get the data for your write request
from the page cache and have to copy it anyway in order to tack on
a UDP/IP header. Now, if we were supporting network cards that do
scatter/gather DMA and compute UDP checksums on-board, that would be a
different story altogether...

Olaf

-- 
Olaf Kirch         |
okir@monad.swb.de  |               I'm a lucky man
okir@caldera.de    |

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/